Appearance
Errors & validation
Error response codes
We are in the process of moving towards 400 (Bad Request) as the primary response code if something is wrong with your request.
Until then, you can consider 400 and 422 as being the same: something in the payload is invalid or missing.
| Context | Response code | Response code name | Explanation | Example |
|---|---|---|---|---|
| Query String | 400 | Bad Request | Your query string contains unknown fields or contains invalid or missing data | sport_type is an enum and you sent an unknown value |
| Query String | 422 | Unprocessable Entity | Your query string contains fields which are not allowed | foo=bar is sent but not accepted |
| Payload | 400 | Bad Request | Your payload contains invalid or missing data | ticket_id is required but not sent |
| Payload | 422 | Unprocessable Entity | Your payload contains invalid or missing data | ticket_id is required but not sent |
| Request | 401 | Unauthorized | The API key is invalid or does not have the required permissions | Missing or mistyped X-Api-Key header |
| Request | 403 | Forbidden | The API key is valid but does not have the required permissions | Your key has no access to this endpoint |
| Request | 404 | Resource not found | The URL points to a resource that does not exist | /v1/tickets/999999999 does not exist |
| Request | 409 | Conflict | The request conflicts with the state on our server | Double create booking from a reservation |
| Request | 429 | Too Many Requests | You exceeded the rate limit, see Rate limits & caching | Too many requests in a short time |
| Request | 503 | Server Exception | An error occurred in our system | You ran into a bug |
Input validation
The API input is validated against the allowed query and URI parameters.
In case invalid data is sent to us (for example, not a valid date) or invalid query parameters, we return a 422 or 400 response. If available, a message is included in the body with an explanation.
If the resource is not available, we return a standard 404 message.
If the user has a wrong API key, we return a 401.
If the user does not have access to an endpoint due to their role, we return a 403.
Next steps
- Filtering & sorting: valid query parameters and operators
- Authentication & access