Skip to content
Article background
All guides
Intermediate guide

Build a complete flight booking flow

A booking takes five calls: search, confirm the price, read what to send, book, issue.

Developer Relations 6 min readAir Travel API

Overview

  1. POST /flights/search: offers for one-way, round trip or multi-city
  2. POST /flights/offers/{offer_id}/price: the airline's price now (optional; booking re-prices anyway)
  3. GET /flights/offers/{offer_id}/extras: who to send, in what order; seats, bags, meals
  4. POST /flights/bookings: a held booking, or a ticketed one for instant fares
  5. POST /flights/bookings/{booking_ref}/issue: tickets, paid from your deposit, before hold_expires_at

Book

Your request names the offer, never a price. Send travellers exactly as /extras lists them, same order and type.

Book
POST /api/v1/flights/bookings
Idempotency-Key: docs-demo-003

Retry booking and issuing only with the same Idempotency-Key. If your call times out, the same request with the same key gives you the booking that was made, never a second one.

Follow the booking

There are no webhooks yet. After an issue that answered 202 ticketing, read GET /flights/bookings/{booking_ref} every 30 seconds until ticketed or rejected. The full flights guide is in the documentation.

Global Travel Gateway
Instant Sandbox Provisioning

Start building with free sandbox access

Create an account, generate a test key and make your first request in minutes. No credit card required.