Errors
Every failure under /api/v1/*, on both services, has the same shape.
{
"error": {
"code": "TICKET_ALREADY_USED",
"message": "This ticket has already been scanned.",
"requestId": "01JD…"
}
}
| Field | Meaning |
|---|---|
code | A stable, machine-readable code. Branch on this, never on the message. |
message | A human-readable sentence. Its wording can change. |
requestId | The id of this request. It is also sent in the x-request-id response header. Quote it when you report a problem. If you send your own x-request-id, it is used instead. |
details | Optional. Structured data for a few codes. Today only RESULTS_INVALID uses it, for its list of bad rows. |
There is no success field. A response never contains a stack trace, a database error, internal service details or infrastructure information.
Common codes
Most routes also have their own codes, listed in each route's responses in the core and ticketing references.
| Status | Code | What to do |
|---|---|---|
| 400 | BAD_REQUEST, VALIDATION_FAILED | Fix the request. A few routes return VALIDATION_FAILED with 422. |
| 400 | IDEMPOTENCY_KEY_REQUIRED | Send an Idempotency-Key header (8 to 255 characters) on this route. |
| 401 | UNAUTHORIZED | Sign in, or get a new ticketing token and retry once. |
| 403 | FORBIDDEN | You are signed in but not allowed to do this. Retrying will not help. |
| 404 | NOT_FOUND | The route or the resource does not exist, or you cannot see it. |
| 409 | CONFLICT, IDEMPOTENCY_KEY_REUSED | The resource changed, or the idempotency key was already used with a different request. |
| 429 | RATE_LIMITED | Wait for the number of seconds in the retry-after header. |
| 503 | SERVICE_UNAVAILABLE | A dependency is down. Retry later with backoff. |
| 500 | INTERNAL_ERROR | Our fault. Retry later and quote the requestId if it persists. |
Sign-in routes are different
Routes under /api/auth/* on core return { "code", "message" }, with no error wrapper and no requestId. A client that calls both must handle both shapes. See Authentication.