Booking overview
Create flight reservations for travelers
The primary function of the Booking API is to create a reservation for the selected flight offer. Before a booking is created, the traveler’s payment details should be sent to the payment registration endpoint (POST /v2/payments) to obtain a payment_token. A POST call to /v1/itineraries/flight can then be made with a CreateItineraryRequest body that includes the payment_token, traveler information, affiliate_reference_id, and the required associated_user object.
Creating a booking
Each successful booking response contains an itinerary ID and links to retrieve the itinerary. The link to create a booking will remain valid until the airline's offer expires.
Sample request
{
"affiliate_reference_id": "test_book",
"hold": false,
"payment_token": "string",
"primary_traveler": {
"name": {
"given_name": "John",
"middle_name": "Micheal",
"last_name": "Smith"
},
"date_of_birth": "11-03-200",
"gender": "male",
"email": "email@gmail.com",
"phone": {
"country_code": "1",
"area_code": "134",
"number": "8931"
},
"traveler_type": "adult",
"passport": {
"number": "A12345678",
"expiration_code": "11-12-2027",
"country_code": "US"
},
"frequent_flyer_programs": [
{
"marketing_carrier_code": "AA",
"program_carrier_code": "AA",
"number": "92817283"
}
],
"tsa_number": "981234567",
"redress_number": "213421",
"special_assistance": "deaf",
"seat_tokens": [
"Q11REWlbQV5VARNfBXcWA1QMUgpEZgxMCwRcSwgGUgBWFwdBR1ASAlg7WA1GFlxETTpWCwBQXjJ9ekRQVxZXQEBDRVZpUllHRw1GEWtXDlJdDHl0Z0IBV0kEQkJASgNnVAVCVgpTA1EMGVVTGQkDNQhfEFZwAwxAACIDBhlWC0EKdwADFnZbAVRTFRdZXAMDCFkNAFQAWA0=",
"Q11REWlbQV5VARNfBXQWA1QMUgpEZgxMCwRcSwgGUgBWFwdBR1ASAlg7WA1GFlxETTpWCwBQXjJ9ekRQVxZXQEBDRVZpUllHRw1GEWtXDlJdDHl0Z0IBV0kEQkJASgNnVAVCVgpTA1EMGVVTGQkDNQhfEFZwAwxAACIDBhlWC0EKdwADFnZbAVRTFRdZXAMLDVgNCFQKVwA="
]
},
"additional_travelers": [
{
"name": {
"given_name": "John",
"middle_name": "Micheal",
"last_name": "Smith"
},
"date_of_birth": "01-02-1999",
"gender": "male",
"email": "gmail@gmail.com",
"phone": {
"country_code": "1",
"area_code": "134",
"number": "8931"
},
"traveler_type": "adult",
"passport": {
"number": "A12345678",
"expiration_code": "11-12-2027",
"country_code": "US"
},
"frequent_flyer_programs": {
"marketing_carrier_code": "AA",
"program_carrier_code": "AA",
"number": "92817283"
},
"tsa_number": "981234567",
"redress_number": "213421",
"special_assistance": "deaf",
"seat_tokens": [
"Q11REWlbQV5VARNfBXcWA1QMUgpEZgxMCwRcSwgGUgBWFwdBR1ASAlg7WA1GFlxETTpWCwBQXjJ9ekRQVxZXQEBDRVZpUllHRw1GEWtXDlJdDHl0Z0IBV0kEQkJASgNnVAVCVgpTA1EMGVVTGQkDNQhfEFZwAwxAACIDBhlWC0EKdwADFnZbAVRTFRdZXAMDCFkNAFQAWA0=",
"Q11REWlbQV5VARNfBXQWA1QMUgpEZgxMCwRcSwgGUgBWFwdBR1ASAlg7WA1GFlxETTpWCwBQXjJ9ekRQVxZXQEBDRVZpUllHRw1GEWtXDlJdDHl0Z0IBV0kEQkJASgNnVAVCVgpTA1EMGVVTGQkDNQhfEFZwAwxAACIDBhlWC0EKdwADFnZbAVRTFRdZXAMLDVgNCFQKVwA="
]
}
],
"associated_user": {
"email": "gmail@gmail.com",
"phone": {
"country_code": "1",
"area_code": "134",
"number": "8931"
}
},
"affiliate_metadata": "displayName:red | realName:blue",
"tax_registration_number": "CFZPK7190K"Sample response
{
"itinerary_id": "8999989898988",
"links": {
"retrieve": {
"method: "GET",
"href": "/v1/itineraries/flight/8999989898988?token=valid_token"
}
}
}