How to Book a Flight
The booking endpoint creates a new flight reservation. You need the cabinavailabilitytoken from the availability check and complete traveler information for all passengers.
Endpoint
POST /flights/api/v2/bookings
Headers
| Header | Required | Description |
|---|
x-api-key | Yes | Your API key. |
x-correlation-id | Yes | Correlation ID from the autocomplete response. |
Request Body
| Field | Type | Required | Description |
|---|
cabinavailabilitytoken | string | Yes | Token from the availability endpoint. |
travelerinfo | array | Yes | Array of traveler objects. One entry per passenger. |
countrycode | string | Yes | Contact phone country code (e.g., "1" for US). |
areacode | string | Yes | Contact phone area code (e.g., "415"). |
phonenumber | string | Yes | Contact phone number. |
email | string | Yes | Contact email address for booking confirmations. |
post_code | string | No | Billing postal/ZIP code. |
currency | string | No | Preferred currency code (e.g., "USD"). |
Traveler Info Object
| Field | Type | Required | Description |
|---|
type | string | Yes | Passenger type: "ADULT", "CHILD", or "INFANT". |
gender | string | Yes | "Male" or "Female". |
title | string | Yes | "Mr", "Mrs", "Ms", or "Miss". |
firstname | string | Yes | Traveler's first name (as on ID/passport). |
lastname | string | Yes | Traveler's last name (as on ID/passport). |
dateofbirth | string | Yes | Date of birth in YYYY-MM-DD format. |
passport | object | Conditional | Passport details. Required if ispassportrequired was true in the availability response. |
passengernationality | string | No | Nationality (ISO country code, e.g., "US"). |
nationalid | string | No | National ID number (for domestic flights where applicable). |
extraservices | array | No | Optional add-on services. |
frequentflyernumber | string | No | Frequent flyer program number. |
knowtravelerno | string | No | Known Traveler Number (TSA PreCheck / Global Entry). |
redressno | string | No | Redress control number (DHS). |
Passport Object
| Field | Type | Required | Description |
|---|
passportnumber | string | Yes | Passport number. |
expirydate | string | Yes | Passport expiry date in YYYY-MM-DD format. |
country | string | Yes | Issuing country (ISO country code, e.g., "US"). |
Extra Services Object
| Field | Type | Description |
|---|
service_id | string | ID of the extra service (e.g., additional baggage, seat selection). |
quantity | integer | Number of units for this service. |
Example Request
JSON
{
"cabinavailabilitytoken": "cat_xyz789abc123",
"traveler_info": [
{
"type": "ADULT",
"gender": "Male",
"title": "Mr",
"first_name": "John",
"last_name": "Smith",
"dateofbirth": "1985-06-15",
"passport": {
"passport_number": "AB1234567",
"expiry_date": "2030-12-31",
"country": "US"
},
"passenger_nationality": "US",
"frequentflyernumber": "UA123456789",
"knowtravelerno": "12345678",
"extra_services": [
{
"serviceid": "extrabag_23kg",
"quantity": 1
}
]
},
{
"type": "CHILD",
"gender": "Female",
"title": "Miss",
"first_name": "Emma",
"last_name": "Smith",
"dateofbirth": "2018-03-22",
"passport": {
"passport_number": "CD7654321",
"expiry_date": "2031-06-30",
"country": "US"
},
"passenger_nationality": "US"
}
],
"country_code": "1",
"area_code": "415",
"phone_number": "5551234",
"email": "john.smith@example.com",
"post_code": "94105",
"currency": "USD"
}
Example Response
JSON
{
"status": "success",
"data": {
"booking_id": "XNFiEtVA3LL",
"booking_status": "BOOKED",
"tickettimelimit": "2026-04-14T23:59:00Z"
},
"message": "Booking created successfully"
}
Response Fields
| Field | Type | Description |
|---|
bookingid | string | Unique booking identifier. Use this to confirm, cancel, or retrieve the booking. |
bookingstatus | string | "BOOKED" (held, awaiting confirmation) or "TICKETED" (already ticketed). |
tickettimelimit | string | Deadline to confirm the booking before it is automatically cancelled. ISO 8601 format. |
Booking Statuses
| Status | Description |
|---|
BOOKED | Booking is created and held. Must be confirmed before the tickettimelimit to issue tickets. |
TICKETED | Tickets have been issued. The booking is fully confirmed. |
Important Notes
- Traveler names must match official ID. Names should exactly match the passport or government ID used for travel.
- Passport details are conditionally required. Check the
ispassportrequired field from the availability response. International flights typically require passport data. - Confirm before the time limit. If the booking status is
BOOKED, you must confirm it before the tickettimelimit or the reservation will be released. - One traveler entry per passenger. The number of entries in
traveler_info must match the total of adults + children + infants from the original search. - Infants do not get their own seat. Infants are seated on the lap of an accompanying adult.
Related Articles