Based on simple REST principles, our API endpoints return data in JSON format for products, pricing, stock information, orders, payments and contacts.
The base address of the API is https://api.cin7.com/api. There are several endpoints at that address, each with its own path.
You will need to have access to a Cin7 Omni account and be logged in to setup an API connection before you can make API calls.
You can access our Swagger page here (BETA).
You can view our OpenAPI specification (JSON) here (BETA).
Getting started
Authentication
Cin7 Omni API uses "Basic Authentication" over HTTPS.
The service will check the credentials on each request and return the response accordingly;
in case of invalid credentials, the service responds with 401 error code i.e. unauthorized.
To authorize your requests, include a header with the key "Authorization" and the value being your credentials.
Example
| Key | Value |
| Authorization |
Basic dGVzdGFwaXVzZXJuYW1lOnRlc3RhcGlrZXk= |
Rate limits
Calls are limited to 3 per second, 60 per minute and 5000 per day. If you exceed this rate limit, you will receive an HTTP 429 (Too Many Requests) response.
We recommend saving data to a database and only making requests for records whose modified date is higher than the last poll time. Note that it may take some time to extract large amounts of data.
Therefore, we recommended that an application is structured to schedule or queue this function, so there is no expectation of an immediate response.
Dates
All dates are UTC format "yyyy-MM-ddTHH:mm:ssZ". Example: 2010-12-04T11:58:00Z
GET parameters
All parameter values should be URL encoded.
| Parameter | Description |
| fields |
Comma separated list of fields to return. By default all fields are returned.
The fields parameter filters the API response so that it only includes a specific set of fields.
For example, if you want to retrieve sales order ID, InvoiceDate and SKU for each line item in a sales order, append the following fields parameter to the URL ?fields=id,invoicedate,lineitems(code)
|
| where |
Where statement to filter the records. Any field in a parent object can be used in the where statement.
Operands: (=|<>|>|<|<=|>=|IS|IS NOT|LIKE|NOT LIKE|IN)
Example: SalesOrders?where=modifieddate>='2020-12-31T00:00:00Z'
In the URL, encode '%' as '%25'. Example: Products/?where=categoryIdArray LIKE '%25363%25'
|
| order |
Comma separated list of fields to order the returned records
Sort Direction: By default fields are sorted highest to lowest. To reverse append "ASC" to the end of the field
Example: CreatedDate ASC
|
| page |
To utilise paging, append a page parameter to the URL e.g. ?page=1.
If there are 50 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned.
Recent records appear first, to change the sort order, append an order by parameter e.g. ?order=createddate asc
|
| rows |
The number of rows to return in a page. |
Response codes
A summary of HTTP Response Codes returned by the Cin7 Omni API is shown below.
| HTTP Code |
Summary |
Description |
| 200 |
OK |
Successful API call. |
| 400 |
Bad Request |
A bad request or a validation exception has occurred. |
| 401 |
Unauthorized |
Invalid authorization credentials. |
| 403 |
Forbidden |
Connection doesn't have permission to access the resource. |
| 404 |
Not Found |
The resource you have specified cannot be found. |
| 429 |
Too Many Requests |
The API rate limit for your application has been exceeded. |
| 500 |
Internal Server Error |
An unhandled error with the Cin7 Omni API. Contact the Cin7 Omni API team if problems persist. |
| 503 |
Service Unavailable |
API is currently unavailable, typically due to a scheduled outage, try again soon. |