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/
NOTE: Right now API keys won’t work in the interface shown below, but we will be making that functionality available soon. Until then, you can still use the interface to explore the API and use it to create queries and mutations that you can then paste into another tool such as Postman.
Digit’s API GraphQL Documentation: https://api-staging.digit-software.com/
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.
Sample API Calls
An item needs the following IDs to be created:
clerkOrganizationId
defaultStockUomId
(pull from the uoms query. The ID for pairs is listed in the sample below)
An order needs the following IDs to be created:
clerkOrganizationId
customerId
shippingAddressId
item
id
s
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.