Skip to main content

Using the API

Explore the developer documentation to integrate, extend, and customize the Accounting software according to your organization's needs.

API Documentation

Full API documentation can be found on: https://docs.accounting.sh/category/api

1. Getting Started Guide:

1.1 Prerequisites:

1.2 Create API Token:

  • Navigate to the Accounting software dashboard at https://dashboard.accounting.sh.
  • In the dashboard, go to the Credentials section.
  • Create a new API token, specifying the necessary permissions required for the API requests you intend to make.
  • Store the generated token securely. Best practice is to store it in an environment variable to prevent inadvertent exposure.
  • The API token is essential for authentication when making API requests.
export ACCOUNTING_API_TOKEN="your_generated_token"

1.3 Set Up Development Environment:

  • Choose your preferred programming language.
  • Install any necessary libraries or SDKs to facilitate API integration.
  • Use the provided API token to authenticate your requests.

1.4 Make Your First API Call:

  • Access the API at https://api.accounting.sh.
  • Explore available endpoints and review the API documentation for detailed information.
  • Make a sample API call to retrieve basic information, such as account details or user information.

Example: List Customers (GET Request)

curl -X GET https://api.accounting.sh/contacts \
-H "Authorization: Bearer your_generated_token"

2. API Integration:

2.1 RESTful API:

  • The Accounting software API follows a RESTful architecture.
  • Interact with the API using standard HTTP methods (GET, POST, PUT, DELETE).

2.2 Authentication:

  • Include the API token generated in the dashboard as an authentication header in your requests.
  • Ensure the token is kept confidential to prevent unauthorized access.

2.3 Endpoints and Resources:

  • Explore various API endpoints to perform actions such as managing invoices, retrieving financial data, and updating account information.
  • Understand the structure of resources and how they map to different functionalities within the Accounting software.

2.4 Request/Response Format:

  • The Accounting software API supports JSON as the sole format for both requests and responses.
  • Ensure that your requests and responses are formatted as JSON objects.

2.5 Rate Limits:

  • Be aware of rate limits imposed on API requests to optimize your application's performance.
  • Monitor the response headers for rate limit information.

2.6 Error Handling:

  • Implement robust error handling mechanisms to gracefully manage API errors.
  • Reference the API documentation for detailed error codes and messages.

By following these steps, you'll be on your way to integrating seamlessly with the Accounting software API. Refer to the API documentation for in-depth details on available endpoints, request/response formats, and additional functionalities.