Whenever something goes wrong with a request to the api or when the request was invalid an HTTP error response code will be returned.
In most cases an error response will have an HTTP error code and the following json syntax:
{ "success": false, "error": { "message": "A description of the error", "uuid": "dfe70935-f0b4-406e-b523-03d6c95a3521" // Can be also null } }
Some requests has their specific error codes which are described at the request documentation while there are some global error codes that can be returned by all requests:
401 – Invalid or no token has been specified
Returned for both Private and Public API’s when the token provided is invalid or when not present at the request at all.
403 – Account has been suspended
Returned if the account was suspended. the date and reason for the suspension will be provided at the ‘message’ property of the JSON response.
404 – Resource wasn’t found
Returned when a resource looked for was not found or the supplied id was invalid.
405 – method not allowed
Returned whenever trying to make a GET request to a POST endpoint or vice versa.
429 – Too many requests
Returned when too many requests has been made to a throttled endpoint.
503 – SYstem is down for maintenance
Returned if the API system is down for maintenance