Skip to main content

ErrorEnvelope

Body of every HTTP 4xx / 5xx response from the API.

error objectrequired

The error.

codestringrequired

unauthorized, provider_not_enabled, booking_not_found, duplicate_booking, invalid_offer_token, invalid_booking_token, offer_expired, currency_unavailable, unsupported_currency, validation_error, not_found, method_not_allowed, payload_too_large, rate_limited, auth_unavailable, service_unavailable or internal_error. New codes may be added.

Example: unauthorized
messagestringrequired

Explanation. May change; do not parse.

Example: Invalid API key
provider objectrequired

Provider concerned, when there is one.

anyOf
string
Example: healthy
request_idstringrequired

Same as the X-Request-Id response header. Quote it to support.

Example: 6f1c2a9e-0d4b-4a57-9a51-3c2f8e1d7b20
details object[]

Only for 422 validation_error: one entry per problem.

  • Array [
  • loc object[]required

    Path of the offending field inside the body, for example ["point_to_point", "adults"]; empty for a body that is not valid JSON.

  • Array [
  • anyOf
    string
    Example: healthy
  • ]
  • msgstringrequired

    Explanation.

    Example: Input should be greater than or equal to 1
    typestringrequired

    Kind of problem, for example missing, greater_than_equal, value_error, extra_forbidden, json_invalid.

    Example: greater_than_equal
  • ]
  • ErrorEnvelope
    {
    "error": {
    "code": "unauthorized",
    "message": "Invalid API key",
    "provider": null,
    "request_id": "6f1c2a9e-0d4b-4a57-9a51-3c2f8e1d7b20"
    }
    }