API Reference

Status codes

Like all RESTful APIs, we use HTTP status codes to indicate the success or failure of each request made. The codes we use are the standard ones, as documented on for example httpstatus.es.

Here’s a quick reference of some of the more important codes you might see.

Code Description
200 Success. Request completed. The response body will in many cases contain the updated resource.
201 Success. A new resource was created. The response body will in many cases contain the created resource.
204 Success. No content to return.
400 Bad Request. The request could not be parsed or had contradictory or invalid data.
401 Unauthorized. User is not logged in or not allowed to access resource or affect the resource.
404 Not Found. Resource doesn’t exist.
409 Conflict. Resource already exists.
429 Rate limit exceeded. Try again later.
500 Server error.

Content type

We both accept and respond with JSON for all calls made to the API (except shipping documents, which uses multipart/form-data requests for file uploading).