Getting Started with daisyBill API

The daisyBill API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

This page will help you get started with the daisyBill API.

Authentication

To access the daisyBIll API, API Tokens are used for authentication. All API requests must include the API Token in the authorization header.

Obtaining an API Token

To obtain an API Token, please follow these steps:

  1. Log in to your daisyBIll account at https://www.daisybill.com.
  2. Navigate and click on the Integration dropdown on the right side of the top nav bar and click API Tokens.
  3. Generate a new API Token by clicking the "Create API Token" button.
  4. Copy the generated API Token securely.

Including the API Token in API Requests

To authorize your API requests, you can include the API Token in either the authorization header

Authorization Header

Include the API Token in the authorization header using the "Bearer" scheme.

Example using cURL:

curl --request GET \
  --url 'https://go.daisybill.com/api/v1/billing_providers' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {API_TOKEN}'

Replace {API_TOKEN} with your actual API Token.

Error Handling

If you receive an authentication error, please ensure the API Token is correctly included in the authorization header. Also, verify that the API Key is valid and has not expired.

Security Recommendations

To maintain the security of your API Token, follow these best practices:

  1. Keep your API Token confidential and do not share it with unauthorized individuals.
  2. Regularly rotate your API Tokens to minimize the risk of unauthorized access.
  3. Use secure methods to store and transmit your API Tokens, such as environment variables or secure credential storage systems.

Ruby Client

For Ruby developers, we offer a Ruby client library that simplifies making API requests and handling authentication. You can find the daisyBIll Ruby client on our GitHub repository: https://github.com/daisybill/daisybill_api. The client provides convenient methods for including the API Token in requests and handling everyday tasks.

See the daisybill_api gem docs for more information

Examples