Errors
Every error has the same shape and a stable code.
Errors use HTTP status codes and always return the same body:
{
"error": {
"type": "invalid_request_error",
"code": "sold_out",
"message": "Not enough tickets left for this ticket type.",
"param": "quantity"
}
}typegroups errors:authentication_error,permission_error,invalid_request_error,rate_limit_errororapi_error.codeis stable and meant for your code. Branch on it, not onmessage.messageis for humans and may change.paramnames the related parameter, when there is one.- Validation errors (
422, codevalidation_failed) also includeerrorswith every invalid field.
Common codes
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_token | Missing, unknown or expired token, or the owner left the organisation |
| 403 | insufficient_scope | The token lacks the scope for this endpoint |
| 403 | permission_denied | The token's owner lacks the permission |
| 403 | api_access_revoked | The owner may no longer use the API |
| 403 | ip_not_allowed | The request came from an IP address outside the allowlist |
| 403 | billing_mandate_required | Creating orders needs an active direct debit mandate |
| 404 | resource_missing | The object does not exist or is outside the token's reach |
| 409 | duplicate_external_reference | An order with this external_reference already exists |
| 409 | request_in_progress | A request with the same Idempotency-Key is still running |
| 422 | validation_failed | The request is invalid; see param and errors |
| 422 | sold_out | Not enough stock or day capacity |
| 422 | idempotency_key_reused | The Idempotency-Key was used for a different request |
| 429 | rate_limited | Too many requests; wait Retry-After seconds |