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

🚧

Providing the API Token in the query parameters will no longer be accepted on Monday, December 4, 2023. Instead, include the API Token in the authorization header.

To avoid any disruptions in service, we kindly request all users complete this change and include the API token in the header of each request before Monday, December 4, 2023

To access the daisyBIll API, API Tokens are used for authentication. All API requests must include the API Token in the authorization header. Additionally, you have the option to include the API Token in the query parameters of the request URL.

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 to your username found on the right side of the top nav bar and click Edit User.
  3. Generate a new API Token by clicking the "Generate 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 or the query parameters.

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.

Query Parameters

Alternatively, you can include the API Token in the query parameters of the request URL.

Example using cURL:

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

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 or the query parameters. 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