Flight Links API

Guidance and examples for accessing the Flight Links API

The Flight Links API allows you to submit flight data and matches with Expedia inventory and returns links to XAP Details API and/or Expedia website details page.

Endpoint

MethodEndpoint
POSThttps://apim.expedia.com/flights/links

Required Headers

Key:Expedia API key
Authorization:Expedia API Authorization String
Content-Type:application/json
Accept:application/vnd.exp-flight.v3+json
Partner-Transaction-Id:Partner TransactionID String

Next Steps

  • Deeplink to Expedia website details page and access to booking page.
  • Query the Flight Details API for more info on flight and booking API query.

https://apim.expedia.com/flights/links
{
	"Flights": [{
			"FlightId": "abc",
			"SplitTicket": false,
			"Segments": [{
				"FareType": "PUBLISHED",
				"Provider": "Amadeus",
				"LowCost": false,
				"Legs": [{
						"DepartureAirport": {
							"Code": "COK"
						},
						"ArrivalAirport": {
							"Code": "DOH"
						},
						"DepartureDateTime": "2021-06-06T03:35:00+05:30",
						"ArrivalDateTime": "2021-06-06T05:35:00+03:00",
						"FlightNumber": "517",
						"MarketingAirlineCode": "QR",
						"BookingCode": "W",
						"CabinClass": "ECONOMY"
					},
					{
						"DepartureAirport": {
							"Code": "DOH"
						},
						"ArrivalAirport": {
							"Code": "ORD"
						},
						"DepartureDateTime": "2021-06-06T08:50:00+03:00",
						"ArrivalDateTime": "2021-06-06T14:55:00-05:00",
						"FlightNumber": "725",
						"MarketingAirlineCode": "QR",
						"BookingCode": "W",
						"CabinClass": "ECONOMY"
					}
				]
			}],
			"TotalPrice": {
				"Value": "2576.68",
				"Currency": "USD"
			}
		},
		{
			"FlightId": "def",
			"SplitTicket": false,
			"Segments": [{
				"FareType": "PUBLISHED",
				"Provider": "Sabre",
				"LowCost": false,
				"Legs": [{
						"DepartureAirport": {
							"Code": "COK"
						},
						"ArrivalAirport": {
							"Code": "AUH"
						},
						"DepartureDateTime": "2021-06-06T21:25:00+05:30",
						"ArrivalDateTime": "2021-06-06T23:55:00+04:00",
						"FlightNumber": "6528",
						"MarketingAirlineCode": "9W",
						"BookingCode": "H",
						"CabinClass": "ECONOMY"
					},
					{
						"DepartureAirport": {
							"Code": "AUH"
						},
						"ArrivalAirport": {
							"Code": "ORD"
						},
						"DepartureDateTime": "2021-06-07T03:20:00+04:00",
						"ArrivalDateTime": "2021-06-07T08:55:00-05:00",
						"FlightNumber": "6405",
						"MarketingAirlineCode": "9W",
						"BookingCode": "H",
						"CabinClass": "ECONOMY"
					}
				]
			}],
			"TotalPrice": {
				"Value": "3266.52",
				"Currency": "USD"
			}
		}
	],
	"Passengers": {
		"Adult": "1",
		"Senior": "1",
		"ChildrenAges": "2,14"
	},
	"Links": [
		"WD",
		"AD"
	]
}
{
	"Links": [{
			"FlightId": "abc",
			"WebDetails": {
				"Method": "GET",
				"Href": "https://www.expedia.com/go/udp?CCheck=1&piid=~null.S~AQoCCAASCAjUBBABGI8KIAEgDCAHIA0oAg~AQpCCh8I0aQBEgM1MTcYwlMgwzsozbGLATDbs4sBOFdAAFgBCh8I0aQBEgM3MjUYwzsgrhwonrWLATDru4sBOFdAAFgBEgYIARABGAEYBCIECAEQASIECAMQASIECAIQAigCMAI&DepartureTLA=L1:COK&ArrivalTLA=L1:ORD&DepartureDate=L1:2021-06-06&ArrivalDate=L1:2021-06-06&NumAdult=1&NumSenior=1&NumChild=2&ChildrenAges=2|14&Sort=10&TripType=OneWay&ProductType=air&eapid=0-1&ServiceVersion=V5&MessageGuid=a79898d0-3bc2-11e8-a98c-4ccc6a3c3f78&langid=1033"
			},
			"ApiDetails": {
				"Accept": "application/vnd.exp-flight.v3+json",
				"Method": "GET",
				"Href": "http://apim.expedia.com/flights/details/~null.S~AQoCCAASCAjUBBABGI8KIAEgDCAHIA0oAg~AQpCCh8I0aQBEgM1MTcYwlMgwzsozbGLATDbs4sBOFdAAFgBCh8I0aQBEgM3MjUYwzsgrhwonrWLATDru4sBOFdAAFgBEgYIARABGAEYBCIECAEQASIECAMQASIECAIQAigCMAI?price=2576.68&childrenAges=2%2C14"
			}
		},
		{
			"FlightId": "def",
			"WebDetails": {
				"Method": "GET",
				"Href": "https://www.expedia.com/go/udp?CCheck=1&piid=~null.S~AQoCCAASCAjUBBABGI8KIAEgDCAHIA0oAg~AQpECiAIua4BEgQ2NTI4GMJTIIA9KPu5iwEw67uLAThIQABYAQogCLmuARIENjQwNRiAPSCuHCi4vYsBMKPEiwE4SEAAWAESBggBEAEYARgEIgQIARABIgQIAxABIgQIAhACKAIwAg&DepartureTLA=L1:COK&ArrivalTLA=L1:ORD&DepartureDate=L1:2021-06-06&ArrivalDate=L1:2021-06-07&NumAdult=1&NumSenior=1&NumChild=2&ChildrenAges=2|14&Sort=10&TripType=OneWay&ProductType=air&eapid=0-1&ServiceVersion=V5&MessageGuid=a79898d0-3bc2-11e8-a98c-4ccc6a3c3f78&langid=1033"
			},
			"ApiDetails": {
				"Accept": "application/vnd.exp-flight.v3+json",
				"Method": "GET",
				"Href": "http://apim.expedia.com/flights/details/~null.S~AQoCCAASCAjUBBABGI8KIAEgDCAHIA0oAg~AQpECiAIua4BEgQ2NTI4GMJTIIA9KPu5iwEw67uLAThIQABYAQogCLmuARIENjQwNRiAPSCuHCi4vYsBMKPEiwE4SEAAWAESBggBEAEYARgEIgQIARABIgQIAxABIgQIAhACKAIwAg?price=3266.52&childrenAges=2%2C14"
			}
		}
	]
}

Error Codes

Common Error Codes

HTTP Status CodeError CodeError ResponseCause
200FLIGHT_NOT_AVAILABLERequested flight is not available.In an anchored search, If selected segments having offer is expired while next segment anchored search.
200CHILD_PRICED_AS_ADULT1 child of age group 12-17 in the request is priced as adult in the response.Any child in the age of 12-17 will be priced as adult and this warning message will be given back for notifying the same.
200INVALID_WD_PASSENGER_COMBINATIONWeb link does not support search with infant in lap and infant in seat together.When WD link is requested it will be returned only when infant in seat and infant in lap is not requested together.
200INVALID_WD_PASSENGER_COUNTWeb link does not support search with more than 6 passengers.When WD link is requested, the deeplink will be returned only when the number of passengers requested is less than or equal to 6.
409NO_RESULTS_FOUNDNo flights solutions found for the request.There are no flights for a requested criteria during flight search API.
200NO_RESULTS_FOUNDNo flights solutions found for the request.No flights for a requested criteria from supply.
500FLIGHT_LINKS_NOT_AVAILABLERequested flight links are not available.Internal application error happened for the request calling services
500SERVER_ERRORAn error has occurred while processing the request.There is a server-side issue that has resulted in a failure.
400INVALID_ACCEPT_HEADERPlease provide a valid Accept header.The accept header provided is not as per the documentation.
400MISSING_ADULT_OR_SENIORInvalid Passenger Information : Must specify at least 1 adult or senior passenger.No adult or senior specified in the request.
400INVALID_ADULT_COUNTInvalid adult count provided. Please provide a valid adult count.Invalid adult count specified in the request
400INVALID_SENIOR_COUNTInvalid senior count provided. Please provide a valid senior count.Invalid senior count specified in the request
400INVALID_INFANT_IN_LAP_COUNTInvalid infant in lap count provided. Please provide a valid infant in lap count.Invalid infant in lap count specified in the request
400INVALID_INFANT_IN_SEAT_COUNTInvalid infant in seat count provided. Please provide a valid infant in seat count.Invalid infant in seat count specified in the request
400INVALID_PASSENGER_COUNTInvalid Passenger Information : Total number of passengers must be between 1 and 9 inclusive.Invalid number of passengers specified in the request
400INFANT_IN_LAP_ACCOMPANIED_BY_ADULT_OR_SENIORInvalid Passenger Information : Each infant in lap must be accompanied by an adult or senior.Number of Infant in lap requested is more than the number of adult and senior requested.
400INVALID_CHILD_AGEInvalid Passenger Information : The age of child must be between 2 and 17 years old.Requested child age is not between 2 and 17 years.
400NO_FLIGHTS_REQUESTEDNo flight details found in the request.No flight details provided in the request.
400NO_FLIGHTS_REQUESTEDNo flight details found in the request.There are no flight details found in the request for links.
400FLIGHT_ID_REQUIREDFlightId is missing in the requestFlightId is mandatory for each flight detail in the request.
400TOTAL_PRICE_REQUIREDTotal price must be specified in FlightId abc when AD link is requested.Total price is a mandatory element when requesting for ApiDetails deeplink.
400MISSING_SEGMENT_DETAILSMissing segment information for FlightId abc.Segment information in the request is missing or incomplete.
400MISSING_FARE_TYPEMissing FareType in Segment number 1 of FlightId abc.Fare type is missing for a Segment in the request
400MISSING_LEG_DETAILSMissing leg information for FlightId abc and Segment number 1.Leg detail is missing for a Segment in the request.
400MISSING_FLIGHT_NUMBERMissing FlightNumber in Leg number 1 of Segment number 1.FlightNumber is missing for a Segment in the request.
400MISSING_ARRIVAL_CODEMissing ArrivalAirportCode in Leg number 1 of Segment number 1 for FlightId abc.ArrivalAirportCode is missing for a Leg in the request.
400MISSING_BOOKING_CODEMissing BookingCode in Leg number 1 of Segment number 1 for FlightId abc.BookingCode is missing for a Leg in the request.
400MISSING_CABIN_CLASSMissing CabinClass in Leg number 1 of Segment number 1 for FlightId abc.CabinClass is missing for a Leg in the request.
400MISSING_ARRIVAL_CODEMissing ArrivalAirportCode in Leg number 1 of Segment number 1 for FlightId abc.Arrival airport code is missing for a Leg in the request.
400MISSING_ARRIVAL_DATE_TIMEMissing ArrivalDateTime in Leg number 1 of Segment number 1 for FlightId abc.Arrival DateTime is missing for a Leg in the request.
400MISSING_DEPARTURE_CODEMissing DepartureAirportCode in Leg number 1 of Segment number 1 for FlightId abcDeparture airport code is missing for a Leg in the request.
400MISSING_DEPARTURE_DATE_TIMEMissing DepartureDateTime in Leg number 1 of Segment number 1 for FlightId abc.Departure DateTime is missing for a Leg in the request.
400INVALID_FLIGHT_LINKSThe Links specified in the request DD is invalid.Only WD and AD are the links supported in the request.

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!