The API uses HTTP status codes to indicate an error has occurred while processing a request. There are four main error status codes used by the API:
Code | Description |
---|---|
402 | The request could not be processed due to account payment issues. |
403 | The request could not be authenticated or the authenticated user is not authorized to access the requested resource. |
404 | The requested resource does not exist. |
422 | The request could not be processed, usually due to a missing or invalid parameter. |
429 | The user has sent too many requests in a given amount of time ("rate limiting") - contact support or account manager for more details. |
In the case of 422 errors the response will also include an error object with an explanation of fields that are missing or invalid. Here is an example:
HTTP/1.1 422 Unprocessable Entity
{
"errors": [
{
"title": "The connection service was not provided."
},
{
"title": "The connection externalid was not provided."
}
]
}
In the case of 401 errors the response includes an error object such as:
{"message":"No Result found for CustomerAccount with id 2"}