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…"
  }
}
FieldMeaning
codeA stable, machine-readable code. Branch on this, never on the message.
messageA human-readable sentence. Its wording can change.
requestIdThe 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.
detailsOptional. 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.

StatusCodeWhat to do
400BAD_REQUEST, VALIDATION_FAILEDFix the request. A few routes return VALIDATION_FAILED with 422.
400IDEMPOTENCY_KEY_REQUIREDSend an Idempotency-Key header (8 to 255 characters) on this route.
401UNAUTHORIZEDSign in, or get a new ticketing token and retry once.
403FORBIDDENYou are signed in but not allowed to do this. Retrying will not help.
404NOT_FOUNDThe route or the resource does not exist, or you cannot see it.
409CONFLICT, IDEMPOTENCY_KEY_REUSEDThe resource changed, or the idempotency key was already used with a different request.
429RATE_LIMITEDWait for the number of seconds in the retry-after header.
503SERVICE_UNAVAILABLEA dependency is down. Retry later with backoff.
500INTERNAL_ERROROur 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.