The Base API uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx indicate an error with the provided information (errors with the information provided), and codes in the 5xx range indicate a server-side error.
An error response should specify the Content-Language of the response and have Content-Type set to the application/json; charset=utf-8 value.
The general format of an error’s envelope includes two fields: errors and meta. They are described below in a separate subsection.
The errors attribute is a JSON collection of objects that holds error information and related metadata, such as links to related documentation. Each error object can hold additional metadata in the meta object.
Error object represent either an invalid request error or a resource error.
The error fields are described below:
The error code.
Human readable error description in a language specified by the Content-Language header.
An optional detailed descriptive text targeted at the client developer in English.
An optional resource name the error relates to. Present only if the error represents a resource error.
An optional field name of the resource the error relates to, in the JSON Pointer format. Present only if the error represents a resource error.
HTTP status code of the response plus HTTP response status message.
Unique id of the request. This is the same value as the X-Request-Id header.
An optional link to resources that can be helpful in solving the issue.
Invalid request error codes summary
Resource you are looking for was not found.
Requested path was not found.
Required access token is missing, malformed, expired, or invalid.
The request requires higher access privileges than those provided by the access token.
The api rate limit was exceeded. Contact Base Support in order to change the rate limits for your account.
A request query parameter is malformed, missing, or has an invalid value
A header is malformed, missing, or has an invalid value.
Unexpected token found when parsing the request body.
The request envelope is malformed, missing, or has an invalid value.
The authorization server encountered an unexpected condition which prevented it from fulfilling the request.
The authorization server is currently unable to handle the request due to maintenance or temporary overload.
Resource error codes summary
An attribute is not a known attribute for the resource.
A required attribute must be present in the request.
A resource with an attribute value already exists.
An attribute can’t be blank (neither null nor empty).
An attribute has an invalid type.
An attribute value is incorrect e.g. is too long, has an invalid format etc.
Everything worked as expected. The response includes a non empty body.
Everything worked as expected. Returned instead of 200 if your operation creates a new resource.
Everything worked as expected. The request has been accepted for future processing. Used by asynchronous APIs.
Everything worked as expected. The response includes an empty body.
The resource you are looking for has been moved somewhere else.
The requested resource has not changed. Returned only if If-None-Match or If-Modified-Since headers were used in the request.
Returned whenever the request is missing required information or is malformed in another way, e.g. the payload is malformed.
The API consumer credentials are invalid, e.g. the API key is revoked or the username or password is invalid.
Subscription payment is required.
The request has been refused because of insufficient user access privileges.
The requested resource could not be found.
Method Not Allowed
The API consumer tried to access an endpoint with an invalid HTTP method, e.g. using PUT on a read-only resource.
The API consumer requested a format that the server cannot produce - an invalid Accept header.
The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in situations where it is expected the user might be able to resolve the conflict and resubmit the request.
Unsupported Media Type
The API consumer used an unsupported media type in the Content-Type or Content-Encoding headers.
The request is well-formed but cannot be processed due to semantic issues with the payload, e.g. some required fields are missing.
Too Many Requests
The rate limit was exceeded and access is temporarily blocked.