Errors
For all operations, a successful call will result in an HTTP 20X response code. Refer to the Swagger definition for the specifics of the responses for each API endpoint.
Any valid HTTP response code may be returned and should be interpreted as per the HTTP standard. For example, a "404 Entity Not Found" response may be returned in response to a GET request for a non-existent query. The response body will be empty for these response codes. The Swagger definition does not list all standard HTTP response codes for all endpoints.
Certain operations may also include a response body which contains a JSON structure with further details about the error that occurred. These are usually useful to client implementers to understand what went wrong with a particular API call but are not suitable messages for displaying to end-customers. Examples of when a response body might be returned are when the client receives a 4XX response due to posting and unparseable JSON entity, or when the client receives a 422 response due to providing an entity that fails business validation.
A simple example follows:
422 Unprocessable Entity
Content-Type: application/json; charset=utf-8
{
"errors": [
"locale may not be empty"
]
}
Updated over 6 years ago