Requests and Responses
Secure (HTTPS) communication is required when using the API and requesting information is simple and intuitive.
API Tokens are required for every request and will be discussed in the next section.
All GET methods return detailed JSON objects containing either single objects or lists of objects.
POST and PATCH methods require either query parameters or JSON payload to deliver the instructions to perform the specified action. Simple success / fail responses are returned from these methods and in some instances information regarding the requested action.
Error responses contain standard HTTP error codes along with a message indicating what went wrong. The following table describes the typical error handling.
Error Range | Descriptioon |
---|---|
200 | Indicates successful request. |
400 | Indicates there was a problem with the incoming request. These errors occur when information is missing from a request, the user is not authorized to make the request, etc. |
500 | Indicates a server side error has occurred. While these errors are rare and should never be returned, they occasionally occur and should be reported. |
Managing List Data
Query parameters allow you to fine tune requests for a list of objects.
Parameter | Usage |
---|---|
sortby | Name of key on which to sort. |
direction | Sort direction. |
limit | Limits the number of returned objects. |
offset | Designates the start index of the object list. |
offset + limit | Achieve pagination by using limit and offset together. |
filters (i.e filter, status) | Filters allow you to limit your results based on a value. Parameter name and values on which you can filter will be indicated in the API reference below. |