Skip to main content

Errors

The API uses conventional HTTP status codes and a single JSON error envelope for every 4xx and 5xx. Provider outcomes (a declined booking, a provider that timed out during a search) are reported inside 200 responses, so always check both the HTTP status and the body.

WhereWhenShape
HTTP 4xx / 5xxThe request was refused or failed before any provider resultError envelope
HTTP 200 with errorA provider declined or failed (recheck, book, booking details, cancel)Operation errors
HTTP 200 with errors[]Some providers failed during a search; the others still return offersSearch errors

The error envelope​

FieldTypeMeaning
error.codestringStable, machine-readable code. Branch on this.
error.messagestringHuman-readable explanation. Wording may change: do not parse it or show it to customers as is.
error.providerstring | nullThe provider concerned, when there is one
error.request_idstringSame value as the X-Request-Id header. Quote it to support.
error.detailsarray422 validation_error only: one entry per problem

New codes can be added within v1: treat an unknown code by its HTTP status.

403 Forbidden
{
"error": {
"code": "provider_not_enabled",
"message": "Provider 'provider_d' is not enabled for this API key",
"provider": "provider_d",
"request_id": "6f1c2a9e-0d4b-4a57-9a51-3c2f8e1d7b20"
}
}

HTTP error codes​

Statuserror.codeMeaningWhat to do
400bad_requestThe HTTP request could not be readSend valid JSON with Content-Type: application/json
401unauthorizedMissing, unknown, revoked or malformed API key, or a key used on the wrong environmentCheck the key and the base URL. Do not retry unchanged.
403provider_not_enabledprovider_context.provider names a provider your key cannot use (recheck, book, booking details, cancel)Use an enabled provider, or ask us to enable it
404booking_not_foundThe booking does not exist or was not made by your accountCheck provider and supplier_reference
404not_foundUnknown pathCheck the URL; operations are under /v1
405method_not_allowedWrong HTTP methodUse POST (only /health is GET)
409duplicate_bookingBook: the internal_reference belongs to a booking still in progress, with an unknown outcome, or to a different requestSame request: wait and re-send it. New booking: use a new internal_reference. Nothing was booked by this call.
409offer_expiredThe offer_token is more than 24 hours oldSearch again
409currency_unavailableThe offer can no longer be priced in your search currencySearch again
413payload_too_largeThe body is larger than 256 KBSend a smaller body
415unsupported_media_typeThe body is not JSONSend Content-Type: application/json
422validation_errorThe body is invalid; see error.detailsFix the request; do not retry unchanged
422unsupported_currencyThe search currency is not a supported ISO 4217 codeUse a supported code
422invalid_offer_tokenThe offer_token was changed, truncated, is missing, or belongs to another key, environment, provider or offerSend the token unchanged with the same provider and rate_key, or search again
422invalid_booking_tokenThe supplier_reference was changed or belongs to another keySend the book response's supplier_reference unchanged
429rate_limitedRate limit exceeded for your keyWait at least Retry-After seconds, then retry
500internal_errorUnexpected errorRetry with backoff; for book, re-send the identical request. Report it with the request_id if it persists.
503auth_unavailableKeys cannot be verified at the momentRetry with backoff (book: the identical request)
503service_unavailableThe service cannot process the request at the moment. A book refused this way never reached the provider.Retry with backoff (book: the identical request)

401 responses carry WWW-Authenticate: ApiKey header="X-API-Key"; 429 responses carry Retry-After. The key is checked before the body, so an invalid key answers 401 even when the body is also invalid.

A 502, 504 or non-JSON 503 comes from the network in front of the API and has no envelope. Treat it as "result unknown"; for book, re-send the identical request later (Idempotency & retries).

Validation errors​

An invalid body answers 422 validation_error with one entry per problem in error.details:

FieldMeaning
locPath of the offending field. For searches, the first element is the request type the body was read as: airport, point_to_point, hourly, or invalid.
msgExplanation. Rules across fields start with Value error, .
typeKind of problem: missing, string_type, greater_than_equal, value_error, extra_forbidden, literal_error, json_invalid, …

The values you sent are not echoed back. A 422 is a bug in the request: fix it, do not retry.

422 Unprocessable Content
{
"error": {
"code": "validation_error",
"message": "Invalid request: point_to_point.adults: Input should be greater than or equal to 1",
"provider": null,
"request_id": "0b7e4f7c-2f7d-4d8e-a1d3-5b8f0c9e6a11",
"details": [
{
"loc": ["point_to_point", "adults"],
"msg": "Input should be greater than or equal to 1",
"type": "greater_than_equal"
}
]
}
}

Operation errors in 200 responses​

Recheck, book, booking details and cancel answer 200 when the provider declines or fails. The response's error then holds {code, message, provider}; message often includes the provider's reason (for logs, not customers).

Operationerror.codeMeaningWhat to do
Recheckrecheck_failedThe offer can no longer be booked (expired, sold out, changed)Search again
RecheckunavailableThe offer is no longer in the provider's availabilitySearch again
Recheckrecheck_errorThe recheck could not be completedRetry once, then search again
Recheckcurrency_unavailableThe current price cannot be given in your search currencySearch again
Bookbook_failedThe provider declined (invalid passenger or flight data, expired, sold out). status: failed.Fix the data or search again; do not retry unchanged
Bookbook_errorThe request never reached the provider. status: failed, nothing was booked.Retry later with the identical request, or search again
Bookbook_outcome_unknownstatus: unknown: no answer in time after the provider received the requestRe-send the identical request later (details). Never rebook with a new reference.
Booking detailsbooking_details_failedThe provider's lookup failedRetry later; the booking is not affected
Booking detailsbooking_details_errorThe lookup could not be completedRetry later
Cancelcancel_failedThe provider declined (already cancelled, past pickup)Check booking details
Cancelcancel_errorThe request never reached the provider. status: failed, nothing changed.Retry the cancel
Cancelcancel_outcome_unknownstatus: unknown: no answer in timeCheck booking details before cancelling again

Search errors​

A search queries several providers at once. A provider that fails or is skipped adds an entry to errors[]; the other offers are still returned. offers: [] with errors: [] simply means nothing was found.

codeMeaningAction
provider_not_enabledA provider you named in providers is not enabled for your keyRemove it, or ask us
mode_not_supportedA provider you named does not offer this transfer type, trip type or durationRemove it for this transfer type
no_availabilityRound trip: offers for one leg but not the otherShow the offers you have; do not retry
city_not_mappedThe provider does not serve the pickup or drop-off cityNone: others may serve it
lead_time_too_shortThe pickup is too soon for this provider (raw.min_lead_hours)Offer a later time
timeoutNo answer within 30 secondsShow the other offers
provider_rejectedThe provider refused the requestNone
provider_errorThe provider reported a failureShow the other offers
search_errorUnexpected failure for this providerShow the other offers; report if it persists
currency_unavailableOffers cannot be priced in your currency right nowSearch later or in another currency
200 OK with a provider error
{
"offers": ["..."],
"errors": [
{
"provider": "provider_b",
"code": "timeout",
"message": "No answer from the provider within 30s",
"raw": {"timeout_seconds": 30, "leg": "outbound"}
}
]
}

Logging for support​

When you contact us about a request, include the X-Request-Id, the time with time zone, the endpoint, the HTTP status, the provider, the provider's confirmation number and your internal_reference. Never send us your API key. See Request IDs.