Getting Started with Cloud Accounting Integration API
The Accounting Integration API exposes accounting and other related functions of the Cloud Accounting web application that can be used for various purposes such as viewing records and creating transactions.
Create API Key
To begin, navigate to the "Settings" page in the Cloud Accounting web application, select the "API Keys" tab and click "Create API Key".
This creates and API Key. The Key ID
and API Key
fields are auto generated upon key creation. The API Key
string is kept hidden but can be revealed if the user wishes to view it.
Be careful with your API-Key string, if your API Key string value has been exposed unintentionally, you may want to re-generate it for security purposes.
Once, the API Key has been created, users will be able to see an options menu on the right side of each API Key row. With this options menu, users are able to edit, delete and re-generate API Key.
Edit API Key
Clicking the edit button for an API Key will open up a dialog where users can configure said API Key.
The purpose of the Description
field is to make it easier for users to manage any API Keys created. It is recommended to indicate usage context of the API Key in this field.
The User ID
field is used to assign the API Key to a specific account book user. This helps identify which user has created or made changes to certain documents.
When API calls are made using an API Key assigned to a user, that user's user ID will be used to populate fields like "CreatedUserID" and "LastModifiedUserID" in the database tables.
If the User ID
field is left empty, "ADMIN" user's user ID will be used to populate the fields.
Under the Permissions
field, users can choose which API methods the generated API Key will have access to.
The Permissions
are set to "All Permissions" by default upon key creation, if you wish to limit the permissions of an API Key, remember to edit the Permissions
values after key creation.
The Partner Application
field is used to grant predefined permissions for an API based on a partner application. If a partner application is assigned to an API Key, users are not able to manually
choose API method permissions for the API Key. Instead, the generated API Key will have permissions assigned based on the permissions granted to
the selected partner application.
HTTP Request Header
Before using the API, the following HTTP request headers need to be attached.
Request Header | Description |
---|---|
API-Key | The API Key string generated in API Key record. This header is mandatory. |
Key-ID | The Key ID string generated in API Key record. This header is mandatory. |
The values for these headers can be copied from the "API Keys" tab of the "Settings" page in the Cloud Accounting web application.
HTTP Request Body
Please note that body objects required in any requests are JSON objects.
In addition, all requests containing a body object should have the "Content-Type" header present with value "application/json".
Request Header | Description |
---|---|
Content-Type | "application/json". This header is required when a request contains a body object. |
All requests with parameters in the body are required to pass an empty object in JSON string at the very least. Meaning in order to return an empty body object in the request, your request body would look like this:
{}