Skip to main content

BookRequest

Book a rechecked offer.

provider_context objectrequired

Provider, rate_key and offer_token (the recheck response's offer_token).

providerstringrequired

Provider id: the offer's provider, unchanged (case-insensitive).

Example: provider_a
rate_keystring | nullnullable

The offer's rate_key. Recommended for recheck and book.

Example: d320deaaed65343ed2a5b8fac337a7dd
search_idstring | nullnullable

Not needed.

Example: null
offer_tokenstring | nullnullable

Recheck: the offer's offer_token. Book: the recheck response's offer_token. Required for recheck and book; not used by booking-details and cancel.

Example: ot1.gAAAAAB...opaque-offer-token...(about 1 kB; trimmed in this example)
travellers object[]required

Passengers, at least one. Only the lead passenger is sent to the provider.

  • Array [
  • titlestring | nullnullable

    Mr, Ms, Mrs, ...

    Example: Ms
    first_namestringrequired

    Given name.

    Example: Jane
    last_namestringrequired

    Family name.

    Example: Doe
    is_leadboolean

    Lead passenger. Default: the first traveller.

    Default value: false
    Example: true
    emailstring | nullnullable

    Lead passenger email. Strongly recommended; some providers require it.

    Example: jane.doe@example.com
    phonestring | nullnullable

    Lead passenger mobile, E.164 with +. Strongly recommended; some providers require it.

    Example: +442079460000
    phone_country_codestring | nullnullable

    ISO 3166-1 alpha-2 country of the phone number (for example GB), not the dial code.

    Example: GB
    nationalitystring | nullnullable

    ISO 3166-1 alpha-2.

    Example: GB
    extra object

    Free-form. Not forwarded to providers.

    property name*any

    Free-form. Not forwarded to providers.

    Example: {}
    property name*any

    A passenger. Only the lead passenger's details are sent to the provider.

  • ]
  • internal_referencestringrequired

    Your booking reference, unique per booking (per leg). Forwarded to the provider; returned as booking.tp_booking_ref. Book is idempotent on it: the identical request again returns the original booking (header Idempotent-Replayed: true); a different request, or one while the first is in progress or unknown, answers 409 duplicate_booking.

    Example: ORDER-10001
    flight_info object

    Flight details for airport transfers.

    airlinestring | nullnullable

    IATA airline code, for example AI.

    Example: AI
    flight_numberstring | nullnullable

    Flight number as printed, for example AI101.

    Example: AI101
    terminalstring | nullnullable

    Terminal.

    Example: T2
    flight_datetimestring | nullnullable

    Local airport time of landing (arrival) or take-off (departure), YYYY-MM-DDTHH:MM[:SS]. Default: derived from the pickup.

    Example: 2026-11-26T09:30
    flight_typestring | nullnullable

    domestic or international.

    Example: international
    property name*any

    Flight details for airport transfers.

    Example: {"airline":"AI","flight_number":"AI101","terminal":"T2","flight_datetime":"2026-11-26T09:30"}
    metadata object

    Free-form. Not used today.

    property name*any

    Free-form. Not used today.

    Example: {}
    BookRequest
    {
    "provider_context": {
    "provider": "provider_a",
    "rate_key": "d320deaaed65343ed2a5b8fac337a7dd",
    "offer_token": "ot1.gAAAAAB...fresh-offer-token-from-recheck...(trimmed in this example)"
    },
    "travellers": [
    {
    "title": "Ms",
    "first_name": "Jane",
    "last_name": "Doe",
    "is_lead": true,
    "email": "jane.doe@example.com",
    "phone": "+442079460000",
    "phone_country_code": "GB"
    }
    ],
    "internal_reference": "ORDER-10001",
    "flight_info": {
    "airline": "AI",
    "flight_number": "AI101",
    "terminal": "T2",
    "flight_datetime": "2026-11-26T09:30"
    },
    "metadata": {}
    }