Seats.io uses standard HTTP response codes to indicate problems and errors.
- 400 Bad Request, e.g. when you didn't pass in a required parameter
- 401 Unauthorized, e.g. when you didn't pass in your secret key through a basic auth header, or the key is invalid
- 403 Forbidden, e.g. you passed in a valid secret key through the basic auth header, but your user account has been disabled
- 404 Not Found, e.g. when you're looking up a chart, but no chart with that key was found
Have a look at the response body to see what went wrong exactly (except in case of 401 or 403 errors, in that case the response body is empty).
Here is an example of the response body of a failed request. The request in this example failed because the event, specified in the request, does not exist.
"messages": [ "Event not found: event-key-123" ],
"message": "Event not found: event-key-123",
// optional data associated with the specific error
In general, the response body contains:
- status the http status code. 400 for Bad Request, 404 for Not Found, etc.
- errors: the reason(s) why the API call failed. Usually there's just a single error. However, in some cases there might be more than one, e.g. when a request results in multiple validation errors. That's why errors is always an array of objects. Each error has a code, a message in English, and optional data associated with the error.
- warnings: an optional list of warnings. A warning has the same structure as an error, i.e. a code, a message and optional data.
- messages: an array containing all messages of errors and warnings combined.
- requestId: the identifier of the request you sent. This is useful for us to debug any errors you encounter. Please mention it when contacting us.