If an API endpoint fails for any reason, it will return an HTTP status code outside of the 2xx
range.
The body of the response will contain detailed information regarding the issue, in the form of an array of api_error
entities. Every API error entity offers:
a code
attribute, with the specific error code;
a details
attribute, with additional information about the specific cause.
This is an example response for a request that tries to create a new model, but the provided api_key
is already used by another model:
{"data": [{"id": "ce9dcb","type": "api_error","attributes": {"code": "INVALID_FIELD","details": {"field": "api_key","code": "VALIDATION_UNIQUENESS","record_type": "ItemType"}}}]}