Skip to main content

Error Reference

All errors from the Ticket Buyback Partner API follow a standard response envelope. This page lists every error code, its HTTP status, and how to handle it.


Error Response Format​

Every error response returns "success": false with an error object:

{
"success": false,
"error": {
"code": "QUOTE_EXPIRED",
"message": "The requested quote has expired. Please create a new quote.",
"details": {
"quote_id": "qt_abc123",
"expired_at": "2026-02-26T09:00:00Z"
}
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-02-26T10:30:00Z"
}
}
FieldDescription
error.codeMachine-readable error code β€” use this in your error handling logic
error.messageHuman-readable description of the error
error.detailsOptional object with additional context β€” fields vary by error type
meta.request_idInclude this in any support requests to Ticket Buyback

Authentication Errors​

CodeHTTP StatusDescriptionHow to Handle
INVALID_CREDENTIALS401client_id or client_secret is incorrectVerify your credentials β€” contact support if correct credentials fail
UNAUTHORIZED401Missing or invalid Bearer token on a protected endpointInclude a valid Authorization: Bearer <token> header
TOKEN_EXPIRED401Access token has expiredRe-authenticate via POST /v1/auth/token to get a new token
ACCOUNT_SUSPENDED403Partner account has been deactivatedContact Ticket Buyback support
UNSUPPORTED_GRANT_TYPE400grant_type value is not client_credentialsSet grant_type to client_credentials

Authorization Errors​

CodeHTTP StatusDescriptionHow to Handle
FORBIDDEN403Token is valid but you do not have permission to access this resourceVerify the resource belongs to your partner account
PAYMENT_NOT_CONFIGURED403Partner has not configured Routable payment methodsComplete Routable Setup before creating quotes or orders

Validation Errors​

CodeHTTP StatusDescriptionHow to Handle
VALIDATION_ERROR400Request body fails schema validationCheck error.details for the specific field that failed validation

Example β€” Validation Error Response​

{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Request body validation failed.",
"details": {
"field": "delivery_type",
"issue": "Value 'email' is not a valid delivery_type. Accepted values: mobile_transfer, mobile_qr, pdf"
}
},
"meta": {
"request_id": "abc123",
"timestamp": "2026-02-26T10:30:00Z"
}
}

Event Errors​

CodeHTTP StatusDescriptionHow to Handle
EVENT_NOT_FOUND404Event ID does not exist in the TBB catalogVerify the event_id from the Discovery API
EVENT_EXPIRED422Event date has already passedDo not allow quotes or orders for past events

Inventory Errors​

CodeHTTP StatusDescriptionHow to Handle
SECTION_NOT_FOUND404Section not found for this eventVerify section_name from the Sections API
NO_INVENTORY_AVAILABLE422No tickets available for the requested seat configurationTry a different section, row, or quantity
INSUFFICIENT_QUANTITY422Requested quantity exceeds available inventoryReduce quantity or try a different section/row

Quote Errors​

CodeHTTP StatusDescriptionHow to Handle
QUOTE_NOT_FOUND404Quote ID does not existVerify the quote_id from the Create Quote response
QUOTE_EXPIRED422Quote TTL has elapsedRequest a new quote via POST /v1/quotes
QUOTE_ALREADY_CONSUMED422Quote was already used to create an orderEach quote can only be used once β€” create a new quote if needed

Example β€” Quote Expired Response​

{
"success": false,
"error": {
"code": "QUOTE_EXPIRED",
"message": "The requested quote has expired. Please create a new quote.",
"details": {
"quote_id": "qt_abc123",
"expired_at": "2026-02-26T09:00:00Z"
}
},
"meta": {
"request_id": "abc123",
"timestamp": "2026-02-26T10:30:00Z"
}
}

Order Errors​

CodeHTTP StatusDescriptionHow to Handle
INVALID_DELIVERY_DEADLINE422delivery_deadline is after or too close to the event start timeSet delivery_deadline to a datetime before the event starts

Rate Limit Errors​

CodeHTTP StatusDescriptionHow to Handle
RATE_LIMIT_EXCEEDED429Too many requests in a short periodWait for the duration in the Retry-After response header before retrying

Handling Rate Limits in Code​

JavaScript β€” Retry with backoff
async function fetchWithRetry(url, options, retries = 3) {
const response = await fetch(url, options);

if (response.status === 429 && retries > 0) {
const retryAfter = response.headers.get("Retry-After") || 5;
await new Promise((resolve) => setTimeout(resolve, retryAfter * 1000));
return fetchWithRetry(url, options, retries - 1);
}

return response;
}

Server Errors​

CodeHTTP StatusDescriptionHow to Handle
INTERNAL_ERROR500Unexpected server-side errorRetry the request. If it persists, contact support with the meta.request_id

Global Error Handling Pattern​

JavaScript β€” Global error handler
async function apiRequest(url, options = {}) {
const response = await fetch(url, {
...options,
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
Accept: "application/json",
...options.headers,
},
});

const body = await response.json();

if (!body.success) {
const { code, message } = body.error;

switch (code) {
case "TOKEN_EXPIRED":
await refreshToken();
return apiRequest(url, options);

case "RATE_LIMIT_EXCEEDED":
const retryAfter = response.headers.get("Retry-After") || 5;
await new Promise((r) => setTimeout(r, retryAfter * 1000));
return apiRequest(url, options);

case "QUOTE_EXPIRED":
throw new Error("Quote expired β€” please request a new quote.");

case "PAYMENT_NOT_CONFIGURED":
throw new Error("Routable payment not configured on your TBB account.");

default:
throw new Error(`API error [${code}]: ${message}`);
}
}

return body.data;
}

Quick Reference β€” All Error Codes​

CodeHTTP Status
INVALID_CREDENTIALS401
UNAUTHORIZED401
TOKEN_EXPIRED401
UNSUPPORTED_GRANT_TYPE400
ACCOUNT_SUSPENDED403
FORBIDDEN403
PAYMENT_NOT_CONFIGURED403
VALIDATION_ERROR400
EVENT_NOT_FOUND404
EVENT_EXPIRED422
SECTION_NOT_FOUND404
NO_INVENTORY_AVAILABLE422
INSUFFICIENT_QUANTITY422
QUOTE_NOT_FOUND404
QUOTE_EXPIRED422
QUOTE_ALREADY_CONSUMED422
INVALID_DELIVERY_DEADLINE422
RATE_LIMIT_EXCEEDED429
INTERNAL_ERROR500

Always Log the request_id

Every response β€” success or error β€” includes a meta.request_id. Always log this value. It is the fastest way for Ticket Buyback support to locate and debug any issue.