Flight Booking API

Guidance and examples for accessing the Flight Booking API

Important: All partners leveraging XAP Booking APIs from any line of business must be aware of the PSD2 and 3DSv2 initiatives that launched in September, 2019. Please read the article on XAP Support of PSD2 and 3DSv2 Bookings for more information.

The Flight Booking API allows you to enable booking of up to 6 passengers on tickets with up to 5 stops.

Endpoint

MethodEndpointPrerequisite
POSThttps://apim.expedia.com/flights/bookings/[offerToken]The offerToken from the Flight Details API

Required Headers

Key:Expedia API key
Authorization:Expedia API Authorization String
User-Id:username@domain.com

The email address associated with the booking and to which the Booking Confirmation Email will be sent.

Content-Type:application/json
Accept:application/vnd.exp-flight.v3+json
Partner-Transaction-Id:Partner TransactionID String

Next Steps

  • Follow web retrieve link to Expedia website to get details.
  • View air fare rules via ApiFareRules website deeplink.

Example of Flight Booking Request

Request URL

https://apim.expedia.com/flights/bookings/v5-6bbf6b9b2fe248efbdb1fb95db5b2db9-0-0-1~0~AQoCCAESBwjUBBABGAEgASAMIAcgDSgCUga-QwGATAE~AQogCh4IzpYBEgMyOTIYkgEgi5ABKL_6ajDP-2o4VUAAWAEKIQofCM6WARIEMTA2ORiLkAEgkgEo-ZNrMJGVazhVQABYARIKCAEQARgBKgJOSxgBIgQIARABKAQoAygBKAIwAg?price=138.38&currency=USD

Request Body

{
	"Title": "My Flight Booking",
	"Travelers": [{
			"Primary": true,
			"Name": {
				"FirstName": "John",
				"LastName": "Doe",
				"MiddleName": "Edward"
			},
			"Phone": {
				"CountryCode": "1",
				"AreaCode": "206",
				"Number": "9876543"
			},
			"Email": "john.doe@gmail.com",
			"Passport": {
				"CountryCode": "US",
				"Number": "123GHY",
				"ExpirationDate": "2021-06-11"
			},
			"Gender": "Male",
			"DateOfBirth": "1978-10-23",
			"FrequentFlyerPrograms": [{
					"MarketingCarrierCode": "VA",
					"ProgramCarrierCode": "VA",
					"Number": "12345"
				},
				{
					"MarketingCarrierCode": "BA",
					"ProgramCarrierCode": "BA",
					"Number": "queen1"
				}
			],
			"TsaNumber": "12345678",
			"RedressNumber": "1234567",
			"SpecialAssistances": [
				"BLIND_WITH_SEEING_EYE_DOG",
				"WHEELCHAIR_IMMOBILE"
			],
			"EmergencyContact": {
				"Name": {
					"FirstName": "Bobby",
					"LastName": "James",
					"MiddleName": "Jones"
				},
				"Phone": {
					"CountryCode": "1",
					"AreaCode": "206",
					"Number": "9876543"
				}
			},
			"PassengerType": "ADULT",
			"MealPreference": "Kosher",
			"SeatPreference": "Window",
			"Seats": [{
					"SeatNumber": "17A",
					"FlightNumber": "321",
					"ArrivalAirportCode": "SFO",
					"DepartureAirportCode": "BOS",
					"DepartureDate": "2021-06-27"
				},
				{
					"SeatNumber": "20A",
					"FlightNumber": "456",
					"ArrivalAirportCode": "BOM",
					"DepartureAirportCode": "SFO",
					"DepartureDate": "2021-06-28"
				}
			]
		},
		{
			"Primary": false,
			"Name": {
				"FirstName": "Mary",
				"LastName": "Ann",
				"MiddleName": "Edward"
			},
			"Gender": "Female",
			"DateOfBirth": "1980-09-30",
			"FrequentFlyerPrograms": [{
				"MarketingCarrierCode": "VA",
				"ProgramCarrierCode": "VA",
				"Number": "12345891"
			}],
			"TsaNumber": "1234567811",
			"RedressNumber": "123456711",
			"SpecialAssistances": [
				"NONE"
			],
			"PassengerType": "ADULT",
			"MealPreference": "Hindu Vegetarian",
			"SeatPreference": "Aisle",
			"Seats": [{
					"SeatNumber": "17B",
					"FlightNumber": "321",
					"ArrivalAirportCode": "SFO",
					"DepartureAirportCode": "BOS",
					"DepartureDate": "2021-06-27"
				},
				{
					"SeatNumber": "20B",
					"FlightNumber": "456",
					"ArrivalAirportCode": "BOM",
					"DepartureAirportCode": "SFO",
					"DepartureDate": "2021-06-28"
				}
			]
		},
		{
			"Primary": false,
			"Name": {
				"FirstName": "Little",
				"LastName": "Doe",
				"MiddleName": "Edward"
			},
			"Gender": "Male",
			"DateOfBirth": "2007-12-10",
			"FrequentFlyerPrograms": [{
				"MarketingCarrierCode": "VA",
				"ProgramCarrierCode": "VA",
				"Number": "1234589"
			}],
			"TsaNumber": "12345678",
			"RedressNumber": "1234567",
			"SpecialAssistances": [
				"NONE"
			],
			"PassengerType": "CHILD",
			"MealPreference": "Sushi",
			"SeatPreference": "Window",
			"Seats": [{
					"SeatNumber": "17C",
					"FlightNumber": "321",
					"ArrivalAirportCode": "SFO",
					"DepartureAirportCode": "BOS",
					"DepartureDate": "2021-06-27"
				},
				{
					"SeatNumber": "20C",
					"FlightNumber": "456",
					"ArrivalAirportCode": "BOM",
					"DepartureAirportCode": "SFO",
					"DepartureDate": "2021-06-28"
				}
			]
		}
	],
	"FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
	"BillingDetails": {
		"CreditCard": {
			"CardNumber": "4XXXXXXXXXXXXXX8",
			"CardType": "Visa",
			"CardSecurityCode": "123",
			"ExpirationMonth": "12",
			"ExpirationYear": "2025"
		},
		"Name": {
			"FirstName": "John",
			"MiddleName": "Edward",
			"LastName": "Doe"
		},
		"Address": {
			"Address1": "3333 108th Ave",
			"Address2": "Expedia HQ",
			"Suite": "15N-107",
			"City": "Bellevue",
			"Province": "WA",
			"Country": "USA",
			"PostalCode": "98004"
		},
		"Phone": {
			"CountryCode": "1",
			"AreaCode": "425",
			"Number": "1234567"
		}
	},
	"AdditionalBookingDetails": {
		"MarketingCode": "111abc",
		"Source": "browser",
		"PartnerAgentId": "123456",
		"PartnerConfirmationNumber": "hello123",
		"PnrRemarks": [".U*TripId-1128-test", ".U*TripId-1128-test", ".U*93-FREEBIRD-ENROLLED", "U7-US", "U9-17976"]
	},
	"PartnerMetaData": {
		"SampleKey1": "SampleValue1",
		"SampleKey2": "SampleValue2"
	}
}

Request Body of Flight & Paid Seat booking

{
	"Title": "My Flight Booking",
	"Travelers": [{
			"Primary": true,
			"Name": {
				"FirstName": "John",
				"LastName": "Doe",
				"MiddleName": "Edward"
			},
			"Phone": {
				"CountryCode": "1",
				"AreaCode": "206",
				"Number": "9876543"
			},
			"Email": "john.doe@gmail.com",
			"Passport": {
				"CountryCode": "US",
				"Number": "123GHY",
				"ExpirationDate": "2021-06-11"
			},
			"Gender": "Male",
			"DateOfBirth": "1978-10-23",
			"FrequentFlyerPrograms": [{
					"MarketingCarrierCode": "VA",
					"ProgramCarrierCode": "VA",
					"Number": "12345"
				},
				{
					"MarketingCarrierCode": "BA",
					"ProgramCarrierCode": "BA",
					"Number": "queen1"
				}
			],
			"TsaNumber": "12345678",
			"RedressNumber": "1234567",
			"SpecialAssistances": [
				"BLIND_WITH_SEEING_EYE_DOG",
				"WHEELCHAIR_IMMOBILE"
			],
			"EmergencyContact": {
				"Name": {
					"FirstName": "Bobby",
					"LastName": "James",
					"MiddleName": "Jones"
				},
				"Phone": {
					"CountryCode": "1",
					"AreaCode": "206",
					"Number": "9876543"
				}
			},
			"PassengerType": "ADULT",
			"MealPreference": "Kosher",
			"SeatPreference": "Window",
			"Seats": [{
					"SeatNumber": "17A",
					"SeatToken": "AQogCMWWARIDNzg0GMuTASDjDSj35vwCMKrq_AI4UUAAWAESBRoDQURUGgM1MEs",
					"FlightNumber": "321",
					"ArrivalAirportCode": "SFO",
					"DepartureAirportCode": "BOS",
					"DepartureDate": "2021-06-27"
				},
				{
					"SeatNumber": "20A",
					"SeatToken": "BQogCMWWARIDNzg0GMuTASDjDSj35vwCMKrq_AI4UUAAWAESBRoDQURUGgM1MEM",
					"FlightNumber": "456",
					"ArrivalAirportCode": "BOM",
					"DepartureAirportCode": "SFO",
					"DepartureDate": "2021-06-28"
				}
			]
		},
		{
			"Primary": false,
			"Name": {
				"FirstName": "Mary",
				"LastName": "Ann",
				"MiddleName": "Edward"
			},
			"Gender": "Female",
			"DateOfBirth": "1980-09-30",
			"FrequentFlyerPrograms": [{
				"MarketingCarrierCode": "VA",
				"ProgramCarrierCode": "VA",
				"Number": "12345891"
			}],
			"TsaNumber": "1234567811",
			"RedressNumber": "123456711",
			"SpecialAssistances": [
				"NONE"
			],
			"PassengerType": "ADULT",
			"MealPreference": "Hindu Vegetarian",
			"SeatPreference": "Aisle",
			"Seats": [{
					"SeatNumber": "17A",
					"SeatToken": "AQogCMWWARIDNzg0GMuTASDjDSj35vwCMKrq_AI4UUAAWAESBRoDQURUGgM1MEs",
					"FlightNumber": "321",
					"ArrivalAirportCode": "SFO",
					"DepartureAirportCode": "BOS",
					"DepartureDate": "2021-06-27"
				},
				{
					"SeatNumber": "20A",
					"SeatToken": "BQogCMWWARIDNzg0GMuTASDjDSj35vwCMKrq_AI4UUAAWAESBRoDQURUGgM1MEM",
					"FlightNumber": "456",
					"ArrivalAirportCode": "BOM",
					"DepartureAirportCode": "SFO",
					"DepartureDate": "2021-06-28"
				}
			]
		},
		{
			"Primary": false,
			"Name": {
				"FirstName": "Little",
				"LastName": "Doe",
				"MiddleName": "Edward"
			},
			"Gender": "Male",
			"DateOfBirth": "2007-12-10",
			"FrequentFlyerPrograms": [{
				"MarketingCarrierCode": "VA",
				"ProgramCarrierCode": "VA",
				"Number": "1234589"
			}],
			"TsaNumber": "12345678",
			"RedressNumber": "1234567",
			"SpecialAssistances": [
				"NONE"
			],
			"PassengerType": "CHILD",
			"MealPreference": "Sushi",
			"SeatPreference": "Window",
			"Seats": [{
					"SeatNumber": "17A",
					"SeatToken": "AQogCMWWARIDNzg0GMuTASDjDSj35vwCMKrq_AI4UUAAWAESBRoDQURUGgM1MEs",
					"FlightNumber": "321",
					"ArrivalAirportCode": "SFO",
					"DepartureAirportCode": "BOS",
					"DepartureDate": "2021-06-27"
				},
				{
					"SeatNumber": "20A",
					"SeatToken": "BQogCMWWARIDNzg0GMuTASDjDSj35vwCMKrq_AI4UUAAWAESBRoDQURUGgM1MEM",
					"FlightNumber": "456",
					"ArrivalAirportCode": "BOM",
					"DepartureAirportCode": "SFO",
					"DepartureDate": "2021-06-28"
				}
			]
		}
	],
	"FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
	"BillingDetails": {
		"CreditCard": {
			"CardNumber": "4XXXXXXXXXXXXXX8",
			"CardType": "Visa",
			"CardSecurityCode": "123",
			"ExpirationMonth": "12",
			"ExpirationYear": "2025"
		},
		"Name": {
			"FirstName": "John",
			"MiddleName": "Edward",
			"LastName": "Doe"
		},
		"Address": {
			"Address1": "3333 108th Ave",
			"Address2": "Expedia HQ",
			"Suite": "15N-107",
			"City": "Bellevue",
			"Province": "WA",
			"Country": "USA",
			"PostalCode": "98004"
		},
		"Phone": {
			"CountryCode": "1",
			"AreaCode": "425",
			"Number": "1234567"
		}
	},
	"AdditionalBookingDetails": {
		"MarketingCode": "111abc",
		"Source": "browser",
		"PartnerAgentId": "123456",
		"PartnerConfirmationNumber": "hello123",
		"PnrRemarks": [".U*TripId-1128-test", ".U*TripId-1128-test", ".U*93-FREEBIRD-ENROLLED", "U7-US", "U9-17976"]
	},
	"PartnerMetaData": {
		"SampleKey1": "SampleValue1",
		"SampleKey2": "SampleValue2"
	}
}

3DS Book Request

EWS supports 2 ways for 3ds:

  1. External authentication and EG authorization. in this way, partner use their own service provider to authenticate payment with bank and pass authentication data to EWS for authorization. If partner uses External authentication, MpiData is required.
  2. EG authentication and EG authorization. in this way, partner integrate EG JS lib to authenticate and authorize payment. If partner uses EG authentication, BrowserData is required.

3DS Book Request - With External authentication

{
  "Title": "My Flight Booking",
  "Travelers": [
    {
      "Primary": true,
      "Name": {
        "FirstName": "San",
        "LastName": "Zhang",
        "MiddleName": "Edward"
      },
      "Phone": {
        "CountryCode": "1",
        "AreaCode": "206",
        "Number": "9876543"
      },
      "Email": "ewsbooking@gmail.com",
      "Passport": {
        "CountryCode" : "US",
        "Number": "123GHY",
        "ExpirationDate": "2021-07-11"
      },
      "Gender": "Male",
      "DateOfBirth": "1978-10-23",
      "FrequentFlyerPrograms": [
        {
          "MarketingCarrierCode": "VA",
          "ProgramCarrierCode": "VA",
          "Number": "12345"
        },
        {
          "MarketingCarrierCode": "BA",
          "ProgramCarrierCode": "BA",
          "Number": "queen1"
        }
      ],
      "TsaNumber": "12345678",
      "RedressNumber": "1234567",
      "SpecialAssistances": [
        "BLIND_WITH_SEEING_EYE_DOG",
        "WHEELCHAIR_IMMOBILE"
      ],
      "EmergencyContact": {
        "Name": {
          "FirstName": "Bobby",
          "LastName": "James",
          "MiddleName": "Sans"
        },
        "Phone": {
          "CountryCode": "1",
          "AreaCode": "206",
          "Number": "9876543"
        }
      },
      "PassengerType": "ADULT",
      "MealPreference": "Kosher",
      "SeatPreference": "Window",
      "Seats": [
        {
          "SeatNumber": "17A",
          "FlightNumber": "321",
          "ArrivalAirportCode": "SFO",
          "DepartureAirportCode": "BOS",
          "DepartureDate": "2021-07-27"
        },
        {
          "SeatNumber": "20A",
          "FlightNumber": "456",
          "ArrivalAirportCode": "BOM",
          "DepartureAirportCode": "SFO",
          "DepartureDate": "2021-07-28"
        }
      ]
    },
    {
      "Primary": false,
      "Name": {
        "FirstName": "Mary",
        "LastName": "Ann",
        "MiddleName": "Edward"
      },
      "Gender": "Female",
      "DateOfBirth": "1980-09-30",
      "FrequentFlyerPrograms": [
        {
          "MarketingCarrierCode": "VA",
          "ProgramCarrierCode": "VA",
          "Number": "12345891"
        }
      ],
      "TsaNumber": "1234567811",
      "RedressNumber": "123456711",
      "SpecialAssistances": [
        "NONE"
      ],
      "PassengerType": "ADULT",
      "MealPreference": "Hindu Vegetarian",
      "SeatPreference": "Aisle",
      "Seats": [
        {
          "SeatNumber": "17B",
          "FlightNumber": "321",
          "ArrivalAirportCode": "SFO",
          "DepartureAirportCode": "BOS",
          "DepartureDate": "2021-07-27"
        },
        {
          "SeatNumber": "20B",
          "FlightNumber": "456",
          "ArrivalAirportCode": "BOM",
          "DepartureAirportCode": "SFO",
          "DepartureDate": "2021-07-28"
        }
      ]
    },
    {
      "Primary": false,
      "Name": {
        "FirstName": "Little",
        "LastName": "Zhang",
        "MiddleName": "Edward"
      },
      "Gender": "Male",
      "DateOfBirth": "2007-12-10",
      "FrequentFlyerPrograms": [
        {
          "MarketingCarrierCode": "VA",
          "ProgramCarrierCode": "VA",
          "Number": "1234589"
        }
      ],
      "TsaNumber": "12345678",
      "RedressNumber": "1234567",
      "SpecialAssistances": [
        "NONE"
      ],
      "PassengerType": "CHILD",
      "MealPreference": "Sushi",
      "SeatPreference": "Window",
      "Seats": [
        {
          "SeatNumber": "17C",
          "FlightNumber": "321",
          "ArrivalAirportCode": "SFO",
          "DepartureAirportCode": "BOS",
          "DepartureDate": "2021-07-27"
        },
        {
          "SeatNumber": "20C",
          "FlightNumber": "456",
          "ArrivalAirportCode": "BOM",
          "DepartureAirportCode": "SFO",
          "DepartureDate": "2021-07-28"
        }
      ]
    }
  ],
  "FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
  "BillingDetails": {
    "CreditCard": {
      "CardNumber": "4XXXXXXXXXXXXXX8",
      "CardType": "Visa",
      "CardSecurityCode": "123",
      "ExpirationMonth": "12",
      "ExpirationYear": "2025"
    },
    "Name": {
      "FirstName": "San",
      "MiddleName": "Edward",
      "LastName": "Test"
    },
    "Address": {
      "Address1": "3333 108th Ave",
      "Address2": "Expedia HQ",
      "City": "Bellevue",
      "Province": "WA",
      "Country": "USA",
      "PostalCode": "98004"
    },
    "Phone": {
      "CountryCode": "1",
      "AreaCode": "425",
      "Number": "1234567"
    },
    "TwoStepPaymentDetails": {
      "PaymentType": "3DS",
      "ReturnUrl": "http://www.google.com",
      "PaymentSessionId": "ern:pay:pa:r1::d6d6aa02-833a-09cc-2136-d5abdd2b7344",
      "MpiData": {
        "Cavv": "Y2FyZGluYWxjb21tZXJjZWF1dGg=",
        "Xid": "ODUzNTYzOTcwODU5NzY3Qw==",
        "Eci": "05",
        "CavvAlgorithm": "2",
        "DsTransactionId": "1c59a512-ab4f-4370-af97-4cfe69b7276e",
        "ThreeDSVersion": "2.0.1",
        "MerchantName": "Expedia.com",
        "PAResStatus": "Y",
        "VEResStatus": "Y"
      }
    }
  },
  "AdditionalBookingDetails": {
    "MarketingCode": "111abc",
    "Source": "browser",
    "PartnerAgentId": "123456",
    "PartnerConfirmationNumber": "hello123",
    "PnrRemarks": [".U*TripId-1128-test", ".U*TripId-1128-test", ".U*93-FREEBIRD-ENROLLED", "U7-US", "U9-17976"]
 },
 "PartnerMetaData" : {
   "SampleKey1" : "SampleValue1",
   "SampleKey2" : "SampleValue2"
 }
}

3DS Book Request - With EG authentication

{
  "Title": "My Flight Booking",
  "BrowserData": {
    "IpAddressV4": "216.251.118.195",
    "BrowserAcceptHeader": "text/html",
    "EncodedBrowserMetadata": "eyJicm93c2VySmF2YUVuYWJsZWQiOmZhbHNlLCJicm93c2VyTGFuZ3VhZ2UiOiJ6aC1DTiIsImJyb3dzZXJDb2xvckRlcHRoIjoyNCwiYnJvd3NlclNjcmVlbkhlaWdodCI6MTA4MCwiYnJvd3NlclNjcmVlbldpZHRoIjoxOTIwLCJicm93c2VyVFoiOi00ODAsImJyb3dzZXJVc2VyQWdlbnQiOiJNb3ppbGxhLzUuMCAoV2luZG93cyBOVCA2LjE7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS83NS4wLjM3NzAuMTAwIFNhZmFyaS81MzcuMzYifQ==",
    "MerchantUrl": "https://www.expedia.com/hotel"
  },
  "Travelers": [
    {
      "Primary": true,
      "Name": {
        "FirstName": "San",
        "LastName": "Zhang",
        "MiddleName": "Edward"
      },
      "Phone": {
        "CountryCode": "1",
        "AreaCode": "206",
        "Number": "9876543"
      },
      "Email": "ewsbooking@gmail.com",
      "Passport": {
        "CountryCode": "US",
        "Number": "123GHY",
        "ExpirationDate": "2021-07-11"
      },
      "Gender": "Male",
      "DateOfBirth": "1978-10-23",
      "FrequentFlyerPrograms": [
        {
          "MarketingCarrierCode": "VA",
          "ProgramCarrierCode": "VA",
          "Number": "12345"
        },
        {
          "MarketingCarrierCode": "BA",
          "ProgramCarrierCode": "BA",
          "Number": "queen1"
        }
      ],
      "TsaNumber": "12345678",
      "RedressNumber": "1234567",
      "SpecialAssistances": [
        "BLIND_WITH_SEEING_EYE_DOG",
        "WHEELCHAIR_IMMOBILE"
      ],
      "EmergencyContact": {
        "Name": {
          "FirstName": "Bobby",
          "LastName": "James",
          "MiddleName": "Sans"
        },
        "Phone": {
          "CountryCode": "1",
          "AreaCode": "206",
          "Number": "9876543"
        }
      },
      "PassengerType": "ADULT",
      "MealPreference": "Kosher",
      "SeatPreference": "Window",
      "Seats": [
        {
          "SeatNumber": "17A",
          "FlightNumber": "321",
          "ArrivalAirportCode": "SFO",
          "DepartureAirportCode": "BOS",
          "DepartureDate": "2021-07-27"
        },
        {
          "SeatNumber": "20A",
          "FlightNumber": "456",
          "ArrivalAirportCode": "BOM",
          "DepartureAirportCode": "SFO",
          "DepartureDate": "2021-07-28"
        }
      ]
    },
    {
      "Primary": false,
      "Name": {
        "FirstName": "Mary",
        "LastName": "Ann",
        "MiddleName": "Edward"
      },
      "Gender": "Female",
      "DateOfBirth": "1980-09-30",
      "FrequentFlyerPrograms": [
        {
          "MarketingCarrierCode": "VA",
          "ProgramCarrierCode": "VA",
          "Number": "12345891"
        }
      ],
      "TsaNumber": "1234567811",
      "RedressNumber": "123456711",
      "SpecialAssistances": [
        "NONE"
      ],
      "PassengerType": "ADULT",
      "MealPreference": "Hindu Vegetarian",
      "SeatPreference": "Aisle",
      "Seats": [
        {
          "SeatNumber": "17B",
          "FlightNumber": "321",
          "ArrivalAirportCode": "SFO",
          "DepartureAirportCode": "BOS",
          "DepartureDate": "2021-07-27"
        },
        {
          "SeatNumber": "20B",
          "FlightNumber": "456",
          "ArrivalAirportCode": "BOM",
          "DepartureAirportCode": "SFO",
          "DepartureDate": "2021-07-28"
        }
      ]
    },
    {
      "Primary": false,
      "Name": {
        "FirstName": "Little",
        "LastName": "Zhang",
        "MiddleName": "Edward"
      },
      "Gender": "Male",
      "DateOfBirth": "2007-12-10",
      "FrequentFlyerPrograms": [
        {
          "MarketingCarrierCode": "VA",
          "ProgramCarrierCode": "VA",
          "Number": "1234589"
        }
      ],
      "TsaNumber": "12345678",
      "RedressNumber": "1234567",
      "SpecialAssistances": [
        "NONE"
      ],
      "PassengerType": "CHILD",
      "MealPreference": "Sushi",
      "SeatPreference": "Window",
      "Seats": [
        {
          "SeatNumber": "17C",
          "FlightNumber": "321",
          "ArrivalAirportCode": "SFO",
          "DepartureAirportCode": "BOS",
          "DepartureDate": "2021-07-27"
        },
        {
          "SeatNumber": "20C",
          "FlightNumber": "456",
          "ArrivalAirportCode": "BOM",
          "DepartureAirportCode": "SFO",
          "DepartureDate": "2021-07-28"
        }
      ]
    }
  ],
  "FraudCheckId": "2CAAADE1R-654F-43B3-B932-EEDF8764CAA1",
  "BillingDetails": {
    "CreditCard": {
      "CardNumber": "4XXXXXXXXXXXXXX8",
      "CardType": "Visa",
      "CardSecurityCode": "123",
      "ExpirationMonth": "12",
      "ExpirationYear": "2025"
    },
    "Name": {
      "FirstName": "San",
      "MiddleName": "Edward",
      "LastName": "Test"
    },
    "Address": {
      "Address1": "3333 108th Ave",
      "Address2": "Expedia HQ",
      "City": "Bellevue",
      "Province": "WA",
      "Country": "USA",
      "PostalCode": "98004"
    },
    "Phone": {
      "CountryCode": "1",
      "AreaCode": "425",
      "Number": "1234567"
    },
    "TwoStepPaymentDetails": {
      "PaymentType": "3DS",
      "ReturnUrl": "http://www.google.com",
      "PaymentSessionId": "ern:pay:pa:r1::d6d6aa02-833a-09cc-2136-d5abdd2b7344"
    }
  },
  "AdditionalBookingDetails": {
    "MarketingCode": "111abc",
    "Source": "browser",
    "PartnerAgentId": "123456",
    "PartnerConfirmationNumber": "hello123",
    "PnrRemarks": [
      ".U*TripId-1128-test",
      ".U*TripId-1128-test",
      ".U*93-FREEBIRD-ENROLLED",
      "U7-US",
      "U9-17976"
    ]
  },
  "PartnerMetaData": {
    "SampleKey1": "SampleValue1",
    "SampleKey2": "SampleValue2"
  }
}

Example Flight Book Response

{
  "TransactionId": "b5f47dff-1187-43fc-8df1-3cbe641b2226",
  "ItineraryNumber": 7605955276409,
  "Warnings": {
    "MULTIPLE_SPECIAL_ASSISTANCE_NOT_SUPPORTED": "Booking succeeded, but only one special assistance is currently supported, so only the first one has been requested.",
    "FREQUENT_FLYER_PROGRAM_NOT_REQUESTED": "Booking succeeded, but the requested Frequent Flyer Programs are either inapplicable or duplicate - {VA,VA,12345}{BA,BA,queen1}",
    "FAILED_TO_RESERVE_SEAT": "Booking succeeded, but failed to reserve the requested seats due to invalid flight information."
  },
  "BookingDateTime": "2023-12-09T15:41:56+00:00",
  "PartnerAgentId": "123456",
  "PartnerConfirmationNumber": "hello123",
  "Links": {
    "ApiFareRules": {
      "Accept": "application/vnd.exp-flight.v1+json",
      "Method": "GET",
      "Href": "https://apim.int.expedia.com/flights/farerules/CgVjb2FjaBoJUHVibGlzaGVkIgd1bmtub3duKgl1bml2ZXJzYWwyAlVBQk8IARIZMjAyMy0xMi0xNVQxODo0NTowMC0wODowMBoDTEFTIgNMQVgqAlVBMghLQUEwUEZCTkIGTEFYTEFTSglGYXJlbG9naXhqBUFEVUxU"
    },
    "WebItinRetrieve": {
      "Href": "https://wwwexpediacom.integration.sb.karmalab.net/trips/7605955276409?userToken=V8wAg5RlwiUMHhP5wjAZJtTkW87kMUaY78WSUPVUQRvSx5-NMiknA6DqvHWAoLIUmwzIYGDuaIp77n1XTm_G0lDYgxTKlW7WcC_FewvKu1ZSXJSZfA"
    },
    "ApiItinRetrieve": {
      "Accept": "application/vnd.exp-flight.v3+json",
      "Method": "GET",
      "Href": "https://apim.int.expedia.com/flights/bookings/7605955276409"
    }
  },
  "AirlineConfirmations": [
    {
      "MarketingAirlineCode": "UA",
      "ConfirmationNumber": "DR8TDP"
    }
  ],
  "Free24HourCancellation": true,
  "SplitTicket": false,
  "GDSLocators": [
    "L9KZH5"
  ],
  "Price": {
    "TotalPrice": {
      "Value": "68.90",
      "Currency": "USD"
    },
    "BasePrice": {
      "Value": "50.23",
      "Currency": "USD"
    },
    "TotalTaxes": {
      "Value": "18.67",
      "Currency": "USD"
    },
    "TotalTaxesAndFees": {
      "Value": "18.67",
      "Currency": "USD"
    },
    "PricePerPassengerCategory": [
      {
        "Category": "ADULT",
        "Count": 1,
        "BasePrice": {
          "Value": "50.23",
          "Currency": "USD"
        },
        "TotalTaxes": {
          "Value": "18.67",
          "Currency": "USD"
        }
      }
    ]
  },
  "Travelers": [
    {
      "Name": {
        "FirstName": "QCEFIRSTNAMEBFBACBDBETEST",
        "LastName": "QCELASTNAMEEFDCDBCEBBF"
      },
      "Phone": {
        "CountryCode": "11",
        "Number": "2069876543"
      },
      "Email": "QCETEST1@GMAIL.COM",
      "Primary": true,
      "Gender": "Male",
      "PassengerType": "ADULT",
      "DateOfBirth": "1978-10-23",
      "Passport": {
        "CountryCode": "US",
        "Number": "123GHY",
        "ExpirationDate": "2021-06-11"
      },
      "Tickets": [
        {
          "TicketingAirlineCode": "UA",
          "Refundable": false,
          "RefundPenalty": {
            "PreTripChange": {
              "Allow": "YES",
              "Penalty": {
                "Value": "99.00",
                "Currency": "USD"
              }
            },
            "PreTripCancel": {
              "Allow": "NO"
            },
            "EnrouteChange": {
              "Allow": "UNKNOWN"
            },
            "EnrouteCancel": {
              "Allow": "UNKNOWN"
            },
            "Transferable": "NO",
            "NameChangeAllowed": "NO"
          }
        }
      ]
    }
  ],
  "Segments": [
    {
      "SegmentId": "Mzg4NTIwNDA4MjYyOTUwOTEyMTE=",
      "FlightDuration": "PT1H16M",
      "TotalStops": 0,
      "DepartureArrivalDayDifference": 0,
      "AirportChange": false,
      "FareType": "PUBLISHED",
      "BasicEconomy": true,
      "Links": {
        "ApiBaggageFees": {
          "Accept": "application/vnd.exp-flight.v1+json",
          "Method": "GET",
          "Href": "https://apim.int.expedia.com/flights/baggagefees/CkYKAlVBEgJVQRoKMjAyMy0xMi0xNSIDTEFYKgoyMDIzLTEyLTE1MgNMQVM6AU5CCEtBQTBQRkJOSgdFQ09OT01ZUgQyMTgxEgNVU0QaAmtn"
        }
      },
      "Legs": [
        {
          "StatusCode": "HK",
          "DepartureAirport": {
            "Code": "LAX",
            "Name": "Los Angeles Intl.",
            "City": "Los Angeles",
            "Province": "CA",
            "Country": "USA",
            "Latitude": "33.94415",
            "Longitude": "-118.4032"
          },
          "ArrivalAirport": {
            "Code": "LAS",
            "Name": "Harry Reid Intl.",
            "City": "Las Vegas",
            "Province": "NV",
            "Country": "USA",
            "Latitude": "36.085393",
            "Longitude": "-115.150098"
          },
          "DepartureDateTime": "2023-12-15T18:45:00-08:00",
          "ArrivalDateTime": "2023-12-15T20:01:00-08:00",
          "FlightNumber": "2181",
          "MarketingAirlineCode": "UA",
          "MarketingAirlineName": "United",
          "OperatingAirlineCode": "UA",
          "OperatingAirlineName": "United",
          "EquipmentCode": "739",
          "EquipmentName": "Boeing 737-900",
          "FlightDuration": "PT1H16M",
          "FlightDistance": {
            "Value": "241",
            "Unit": "MI"
          },
          "BookingCode": "N",
          "CabinClass": "ECONOMY",
          "EquipmentChange": false,
          "AirlineConfirmation": {
            "MarketingAirlineCode": "UA",
            "ConfirmationNumber": "DR8TDP"
          },
          "GDSLocator": "L9KZH5",
          "FareBasisCode": "KAA0PFBN"
        }
      ]
    }
  ],
  "PnrRemarks": [
    ".U*TripId-hello123"
  ],
  "FareOptions": [
    {
      "FareName": "Basic Economy",
      "SegmentIds": [
        "Mzg4NTIwNDA4MjYyOTUwOTEyMTE="
      ],
      "NotAvailable": [
        "SEAT_CHOICE",
        "MEALS",
        "CHANGES",
        "CANCELLATION"
      ],
      "RestrictedFare": false
    }
  ]
}

Example Price Change Error Response (Price Increase)

{
  "Errors": [
    {
      "Code": "PRICE_INCREASE",
      "Description": "The price for your trip has changed from 4.90 USD to 83.90 USD.",
      "OriginalPrice": {
        "Value": "4.9",
        "Currency": "USD"
      },
      "NewPrice": {
        "Value": "83.9",
        "Currency": "USD"
      },
      "ChangedAmount": {
        "Value": "79.00",
        "Currency": "USD"
      },
      "Links": {
        "ApiBook": {
          "Accept": "application/vnd.exp-flight.v3+json",
          "Method": "POST",
          "Href": "http://127.0.0.1:8080/flights/bookings/d34b8ab5adaa4e14add4b4fa6c97d222-0-1~2.D~AQoECL-kBBIICNQEEAEYwB8gASgCWAFwAA~AQoiCiAIwmwSAzg4MBiLuAEgi5ABKP3EvwIwxsW_AjhMQABYARIMCAEQARgBKgJCNjIAGAEiBAgBEAEoAigDKAQwAg?price=83.90¤cy=USD"
        }
      },
      "Price": {
        "TotalPrice": {
          "Value": "83.90",
          "Currency": "USD"
        },
        "BasePrice": {
          "Value": "27.91",
          "Currency": "USD"
        },
        "TotalTaxes": {
          "Value": "16.99",
          "Currency": "USD"
        },
        "TotalTaxesAndFees": {
          "Value": "55.99",
          "Currency": "USD"
        },
        "AveragePricePerTicket": {
          "Value": "83.9",
          "Currency": "USD",
          "Count": 1
        },
        "PricePerPassengerCategory": [
          {
            "Category": "ADULT",
            "Count": 1,
            "BasePrice": {
              "Value": "27.91",
              "Currency": "USD"
            },
            "TotalTaxes": {
              "Value": "16.99",
              "Currency": "USD"
            },
            "Fees": [
              {
                "Value": "39.0",
                "Currency": "USD",
                "Name": "TeleSales"
              }
            ]
          }
        ]
      }
    }
  ],
  "TransactionId": "c9736f11-694c-41e9-8375-5220fb41d6c1"
}

Example Price Change Error Response (Price Decrease)

{
  "Errors": [
    {
      "Code": "PRICE_DECREASE",
      "Description": "The price for your trip has changed from 167.80 USD to 167.80 USD.",
      "OriginalPrice": {
        "Value": "167.8",
        "Currency": "USD"
      },
      "NewPrice": {
        "Value": "167.8",
        "Currency": "USD"
      },
      "ChangedAmount": {
        "Value": "0.00",
        "Currency": "USD"
      },
      "Links": {
        "ApiBook": {
          "Accept": "application/vnd.exp-flight.v3+json",
          "Method": "POST",
          "Href": "http://127.0.0.1:8080/flights/bookings/dd283e4a43bb4e7cb8f7ae007bac0931-0-1~2.D~AQoECL-kBBIICNQEEAEYwB8gASgCWAFwAA~AQojCiEIwmwSBDEwODAYi7gBIIuQASisyr8CMPXKvwI4TEAAWAESDAgBEAEYASoCQjYyABgCIgQIARABIgQIAhABKAIoAygEMAI?price=167.80¤cy=USD"
        }
      },
      "Price": {
        "TotalPrice": {
          "Value": "167.80",
          "Currency": "USD"
        },
        "BasePrice": {
          "Value": "55.82",
          "Currency": "USD"
        },
        "TotalTaxes": {
          "Value": "33.98",
          "Currency": "USD"
        },
        "TotalTaxesAndFees": {
          "Value": "111.98",
          "Currency": "USD"
        },
        "AveragePricePerTicket": {
          "Value": "83.9",
          "Currency": "USD",
          "Count": 2
        },
        "PricePerPassengerCategory": [
          {
            "Category": "ADULT",
            "Count": 1,
            "BasePrice": {
              "Value": "27.91",
              "Currency": "USD"
            },
            "TotalTaxes": {
              "Value": "16.99",
              "Currency": "USD"
            },
            "Fees": [
              {
                "Value": "39.0",
                "Currency": "USD",
                "Name": "TeleSales"
              }
            ]
          },
          {
            "Category": "CHILD",
            "Count": 1,
            "BasePrice": {
              "Value": "27.91",
              "Currency": "USD"
            },
            "TotalTaxes": {
              "Value": "16.99",
              "Currency": "USD"
            },
            "Fees": [
              {
                "Value": "39.0",
                "Currency": "USD",
                "Name": "TeleSales"
              }
            ]
          }
        ]
      }
    }
  ],
  "TransactionId": "faa71f00-ac95-464e-bf23-0933cdfd7425"
}

Example Flight Book Response (with Airport Lounge Information)

. . .
	"Lounges": {
		"B6LOUNGE": [{
			"Name": "The B6 Lounge",
			"IsConferenceRoomAvailable": false,
			"PhoneNumber": "N/A",
			"Description": "Terminal 3 near Gate 74, 5 am \u0096 11 pm"
		}]
	}
}

Error Codes

Common Error Codes

HTTP Status CodeError CodeError Message
400INVALID_REQUESTRequest is either missing or is in an invalid format.
400INVALID_TRIP_TITLEBooking Failed. Trip title is too long.
400INVALID_PRICEBooking Failed. Total rate value in the request is either missing or invalid.
400INVALID_CURRENCYBooking Failed. Currency code in the request is either missing or invalid.
400INVALID_CLIENT_KEYInvalid client key: xxx
400INVALID_BILLING_ADDRESSBooking Failed. Billing address in the request is either missing or invalid. Billing address address1 (address2/ province/ city/ postal code) field should not be longer than %s characters.
400 INVALID_BILLING_PHONE Booking Failed. Billing phone information in the request is either missing or invalid.
Booking Failed. Billing phone number country code in the request is either missing or invalid.
Booking Failed. Billing phone number area code in the request is either missing or invalid.
Booking Failed. Billing phone number in the request is either missing or invalid.
400INVALID_BILLING_DETAILSBooking Failed. Billing information in the request is either missing or invalid.
400INVALID_CREDIT_CARDBooking Failed. Credit card information in the request is either missing or invalid.
400INVALID_DIRECT_DEBITBooking Failed. Direct debit information in the request is either missing or invalid.
400BILLING_TYPE_NOT_SUPPORTEDBooking Failed. Credit Card type in the request is not supported for the channel. (or) Direct Debit is not supported for the channel.
400INVALID_BILLING_NAMEBooking Failed. Billing Name in the request is either missing or invalid.
400INVALID_TRAVELER_INFOBooking Failed. Traveler information in the request is either missing or invalid.
400INVALID_TRAVELER_NAMEBooking Failed. Traveler name in the request is either missing or invalid.
400TRAVELER_NAMES_NOT_UNIQUEBooking Failed. Traveler names must be unique.
400INVALID_TRAVELER_PHONEBooking Failed. Traveler phone information in the request is either missing or invalid.
400INVALID_TRAVELER_COUNTBooking Failed. Exactly one primary traveler should be present in request body.
400INVALID_TRAVELERS_INFOBooking Failed. Travelers information in the request is missing or is in an invalid format.
400CHILD_OR_INFANT_PRIMARY_TRAVELERBooking failed. Child/ Infant traveler cannot be a primary traveler.
500BOOKING_APPLICATION_ERRORBooking failed. Application Error.
500BOOKING_NOT_CONFIRMEDProblem confirming your booking. Please call Expedia customer support.
409PRICE_INCREASEBooking Failed. The price for your trip has changed from %s %s to %s %s.
409PRICE_DECREASEBooking Failed. The price for your trip has changed from %s %s to %s %s.
409FLIGHT_NOT_AVAILABLEBooking Failed. The flight requested for is no longer available.
409FLIGHT_SCHEDULE_CHANGEBooking Failed. The requested flight had a change of schedule.
409FLIGHT_SEATS_UNAVAILABLEBooking Failed. No seats available for the chosen cabin class.
400PAYMENT_BILLING_ADDRESS_NOT_MATCHBooking Failed. The billing address and ZIP/ Postal code does not match.
400PAYMENT_TRANSACTION_FAILEDBooking failed. Transaction failed via credit card clearing house.
400PAYMENT_CREDIT_CARD_COULD_NOT_BE_VALIDATEDBooking failed. Could not validate credit card. Try again later or use another card.
409INVALID_OFFER_IDOfferId provided is either invalid or expired.
400INVALID_DATE_OF_BIRTHBooking Failed. Date of birth is a required field, it cannot be null, empty or invalid.
400 INVALID_FREQUENT_FLYER_PROGRAM Booking Failed. MarketingCarrierCode for one of the Frequent Flyer Programs requested is missing or invalid.
Booking Failed. ProgramCarrierCode for one of the Frequent Flyer Programs requested is missing or invalid.
Booking Failed. Number for one of the Frequent Flyer Programs requested is missing or invalid.
400INVALID_REDRESS_NUMBERBooking Failed. RedressNumber in not in size range(min=1, max=15).
400INVALID_EMERGENCY_CONTACTBooking Failed. Emergency contact information in the request is either missing or invalid.
400INVALID_EMERGENCY_CONTACT_PHONEBooking Failed. Emergency contact phone information in the request is either missing or invalid.
400INVALID_EMERGENCY_CONTACT_NAMEBooking Failed. Emergency contact name in the request is either missing or invalid.
400INVALID_PASSENGER_TYPEBooking Failed. PassengerType is a required field.
It has to be [ADULT/ SENIOR/ CHILD/ INFANT_IN_SEAT/ INFANT_IN_LAP].
400 INVALID_SEAT_INFO Booking Failed. Departure date in seat info cannot be null or empty.
Booking Failed. Seat number in seat info cannot be null or empty
Booking Failed. Flight number in seat info cannot be null or empty.
Booking Failed. Arrival airport code in seat info cannot be null or empty.
Booking Failed. Departure airport code in seat info cannot be null or empty.
400INVALID_GENDERBooking Failed. Gender is a required field, It has to be [Male/ Female/ Unknown].
400INVALID_PASSPORT_NUMBERBooking Failed. Passport number field in the request is missing or invalid.
400INVALID_PASSPORT_COUNTRYBooking Failed. Passport country code field in the request is missing or invalid.
400INVALID_SEAT_PREFERENCEBooking Failed. Seat preference is invalid, It has to be [Window/ Aisle].
400UNKNOWN_PATHUnknown request path
400INVALID_SECURITY_TOKENSecurity Token in request body is missing or invalid.
400INVALID_ACCEPT_HEADERAPI version is either missing or invalid. Please provide a correct API version in the Accept header.
400ORDER_DECLINEDBooking failed. Order creation has been declined.
400INVALID_USER_IDUser-Id in http headers is missing or invalid. It has to be a valid email.
400PARTNER_TRANSACTION_ID_MISSINGPartner transaction Id in http headers is missing.
400UNKNOWN_FIELDUnrecognized field "<unknown field> "
400INVALID_PRIMARY_FIELDBooking Failed. Primary field in traveler is either missing or invalid.
400INVALID_SPECIAL_ASSISTANCESBooking Failed. SpecialAssistances is invalid. It is an array type.

Elements have to be: NONE BLIND
DEAF BLIND_WITH_SEEING_EYE_DOG
DEAF_WITH_HEARING_DOG
WHEELCHAIR_CAN_CLIMB_STAIRS
WHEELCHAIR_CANNOT_CLIMB_STAIRS
WHEELCHAIR_IMMOBILE
WITH_DOG
400INVALID_SOURCEBooking Failed. Source field is invalid. It has to be [browser/ mobileapp/ mobilesite].
400CHILD_AGE_OVER_TWELVEChild 12 years or older during travel is priced as Adult. Please update your search criteria.
400AIRLINE_FARE_NOT_AVAILABLESelected airline fare change. Please retry after some time.
400AIRLINE_PAYMENT_ERRORSelected airline does not support the payment method. Please retry another payment method.
400AIRLINE_NOT_AVAILABLESelected airline is not available. Please retry after some time.
400DUPLICATE_BOOKINGThis booking matches a previously successful booking with the following details - TripNumber:%s, CreationDate:%s.
400CLASS_BOOKED_FULLThe class you booked is just sold out, please try another one.
400INVALID_DATESBooking Failed. Dates in the request are missing or in invalid format. Valid format is " YYYY-MM-DD."
400INVALID_PAYMENT_TOKENPayment token information is invalid.
400INVALID_BROWSER_DATAInvalid Input. Please enter the full BrowserData. You must integrate 3dsv2 to do this booking, please contact your account manager for details.
400SOFT_DECLINE_ERRORBooking failed. Order creation has been declined.
400INVALID_CONTENT_TYPEContent-Type is either missing or invalid. Content-Type should be application/json.
400INVALID_TRIP_START_DATEStart Date is in invalid format. Valid format is YYYY-MM-DD.
400INVALID_TRIP_END_DATEEnd Date is in invalid format. Valid format is YYYY-MM-DD.
400START_DATE_LATER_THAN_END_DATEStart Date should be before End Date.

Warning Code

Common Warning Codes

CodeMessageDescription
FAILED_TO_RESERVE_SEATBooking succeeded, but failed to reserve the requested seats due to invalid flight information.This warning is returned in case a customer sends a seat request with the invalid flight info, i.e. the flight number, departure date, arrival date, departure airport, and/or arrival airport do not match any AirLeg of the corresponding ANK product in the booking request. In this case, we will ignore that particular seat request and return a warning.
FREQUENT_FLYER_PROGRAM_NOT_REQUESTEDBooking succeeded, but the requested Frequent Flyer Programs are either inapplicable or duplicate - {AS,AS,6451734} {DL,DL,645171}A frequent flyer request will be requested only if the MarketingCarrierCode matches at least one of the marketing airlines. Other entries will be ignored. In case the traveler enters more than one frequent flyer program entries for the same MarketingCarrierCode, only one will be requested and the rest will be ignored. The warning message will contain the list of programs ignored in the format {MarketingCarrierCode,ProgramCarrierCode,Number}
MULTIPLE_SPECIAL_ASSISTANCE_NOT_SUPPORTEDBooking succeeded, but only one special assistance is currently supported, so only the first one has been requested.This warning is returned if the customer request multiple special assistance in the booking request. Currently only one special assistance is supported per booking request.
PAYMENT_IN_PROGRESSBooking succeeded, Payment is in progress for this booking.This warning is returned if the customer booking was successful but payment status is pending.
CHILD_PRICED_AS_ADULT1 child of age group 12-17 in the request are priced as adult in the response.This warning is returned if the request contains a child passenger who will be 12 years or older during travel, there is no price change from the requested price and the booking is successful by just changing the passenger type from child to adult.
BOOKED_WITH_PRICE_INCREASEBooking succeeded, but with a slightly higher price.Booking was successful, but the booked price was incrementally higher than the quoted price.

The difference in price is within the price increase limit custom configured for this partner. If it was not the booking would fail due to the price increase.
BOOKED_WITH_PRICE_DECREASEBooking succeeded, but with a slightly lower price.Booking was successful, but the booked price was incrementally lower than the quoted price.

The difference in price is within the price decrease limit custom configured for this partner. If it was not the booking would fail due to the price decrease.

API details

Here, you can explore the endpoint definitions for this API, then go to the API Explorer to try out all the XAP endpoints, download OpenAPI specs, or download our Postman collections. Testing with one or all of these options will give you an understanding of how the examples and schema definitions compare to the actual output.


Did you find this page helpful?
How can we improve this content?
Thank you for helping us improve!