Generating API Tokens
Once your account has been approved for API access, you can generate new API tokens from Settings > API Tokens:
Be sure to expand the Permissions and select the correct ones - we recommend starting with the “read” options:
When you generate the token be sure to copy the value and store it somewhere safe - you won’t be able to access it again later. If you forget it you can Revoke it and generate a new one:
Getting Started
👉 Send API requests to https://api.digit-software.com/
Digit’s API GraphQL documentation and interactive environment: https://api.digit-software.com/docs
To make API calls, you need to add the authorization to the Headers near the bottom of the page:
authorization |
|
This should allow you to make query requests (Read) using the above syntax. If you want to call mutations (CreateUpdateDelete), you need to switch to the variables tab and provide the inputs required to make the request.
⚠️ WARNING: This interactive environment will make real API calls to whichever account you have entered your credentials for. Always check that you are using credentials from your SANDBOX account unless you are absolutely confident about testing directly against your primary account.
Sample API Calls
An item needs the following IDs to be created:
clerkOrganizationIddefaultStockUomId(pull from the uoms query. The ID for pairs is listed in the sample below)
An order needs the following IDs to be created:
clerkOrganizationIdcustomerIdshippingAddressIditem
ids
You either need to create these customers & addresses as you create the order or fetch them by their name before you create the order.
Some sample mutations with their minimum data input:
Mutation | Input |
|
|
|
|
Pro Tip: Install the GraphQL Network Inspector on your browser. Then go to the Digit Staging instance and open the dev console. Observe the requests Digit makes when creating an item or an order to better understand how everything fits together.
