Create a booking
Order of calls: search → price → book. Booking an offer that hasn't been priced for that party returns 409 price_required.
Request#
{
"offer_id": "off_…",
"client_reference": "order-1001",
"passengers": [
{ "type": "ADT", "title": "Mr", "first_name": "Ada", "last_name": "Obi", "date_of_birth": "1990-04-02", "document_number": "A1234567", "nationality": "NG" }
],
"contact": { "email": "ada@example.com", "phone": "+2348031234567" }
}
Names must match travel documents. Ages are checked against the passenger type (adult 12+, child 2–11, infant under 2). The passenger types must match the party you priced.
What happens#
- The airline re-confirms the price. If it moved you get
409 price_changedwith the newtotal. Price again and decide. totalis held in your wallet. Too little:402 insufficient_funds.- The seat is reserved with the airline.
- Ticketing is queued. The response is
201with the booking (ticketing, or alreadyticketed). - When the ticket is issued the held money is paid to the airline. If ticketing fails the hold is released.
Always send an Idempotency-Key.
Reading it back#
GET /bookings/{id} returns travellers and segments. GET /bookings/{id}/ticket returns the e-ticket once ticketed. GET /bookings lists with status and per_page filters.