Skip to main content

BookingDetailsRequest

Look up a booking.

provider_context objectrequired

{"provider": "..."}.

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)
supplier_reference object

The book response's supplier_reference, unchanged (with its booking_token).

property name*any

The book response's supplier_reference, unchanged (with its booking_token).

Example: {"booking_id":"01aa00bb11cc22dd33ee44ff55667781","confirmation_number":"PRV0000001","provider":"provider_a","booking_status":"completed","booking_token":"bt1.gAAAAAB...opaque-booking-token...(about 1-2 kB; trimmed in this example)"}
book_response object | null

Optional stored book response. When present, details are built from it without calling the provider (book-time state).

property name*anynullable

Optional stored book response. When present, details are built from it without calling the provider (book-time state).

Example: {"status":"completed","supplier_reference":{"...":"unchanged"}}
cancel_response object | null

Optional stored cancel response; fills cancellation.cancelled_at and the refund when the provider does not report them. Without it, our record of the cancel answer (cancelled through this API with the same key) is used.

property name*anynullable

Optional stored cancel response; fills cancellation.cancelled_at and the refund when the provider does not report them. Without it, our record of the cancel answer (cancelled through this API with the same key) is used.

Example: {"...":"the cancel response you stored, unchanged"}
BookingDetailsRequest
{
"provider_context": {
"provider": "provider_a"
},
"supplier_reference": {
"booking_id": "01aa00bb11cc22dd33ee44ff55667781",
"confirmation_number": "PRV0000001",
"provider": "provider_a",
"booking_status": "completed",
"booking_token": "bt1.gAAAAAB...opaque-booking-token...(about 1-2 kB; trimmed in this example)"
},
"book_response": {
"status": "completed",
"supplier_reference": {
"...": "unchanged"
}
},
"cancel_response": {
"...": "the cancel response you stored, unchanged"
}
}