Welcome to the Sandwai API, this documentation contains instructions on how you can interact with the Sandwai system in order to read, create, update or delete resources. The Sandwai API is organized around REST. Our API has predictable resource-oriented URLs, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
As the endpoints are connected directly to your database, Update and Archive endpoints have the possibility to be destructive.
Ensure when testing endpoints that the data you have entered is correct and confirm you are editing the correct object before selecting try functionality
The Sandwai API now supports the use of internal Sandwai IDs when Getting, Updating and Archiving objects. The default behaviour is to use custom ids.
When making a request to a relevant endpoint, you can include the following header below:
useinternalid: true
When the header is not included or set to false, requests will be resolved by matching objects with their customids. When set to true, objects will be matched using their internal Sandwai IDs.
The Sandwai API uses a number of safeguards against bursts of incoming traffic to help maximise its stability. Users who send many requests in quick succession might see error responses that show up as status code 429. Sandwai's current rate limiting default is:
The new Sandwai API has removed restrictions on a number of previous endpoints. Results will now be paginated with a limit of:
Each request method can return several different response codes which can be used to determine the success of the call:
https://api.sandwai.com/v1/
Authorization: Bearer YOUR_TOKEN
Accept: application/json
Content-Type: application/json
In addition to providing an API token on every request to the API, you must also provide your assigned Company ID.
This is used to verify the organisation sending the request.
The Company ID can be sent as Header:
companyid: YOUR_COMPANY_ID
Note that the Company ID parameter must be all lowercase with no spaces.