Package Listings API

Guidance and examples for accessing the Package Listings API

The Package Listings API allows you to search Expedia packages inventory by date, origin, destination, and other parameters to return a listing of available packages.

Endpoint

MethodEndpoint
GEThttps://apim.expedia.com/packages/listings

Required Headers

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

Optional Headers

Accept-Encoding:gzip

More info on gzip

Next Steps

  • Deeplink customer to Expedia website where they can book selected car.
  • Get more information about a specific offer via the Package Details API.
  • Get seat occupancy of selected flight(s) via Seatmap API.

Example of Request

Flight Anchored Search (one flight + multiple hotels)

Search Requests

This is the standard package search that will return 100 packages built from the combination of 1 flight option with 100 lodging options.

https://apim.expedia.com/packages/listings?packageType=FH&anchorProduct=FLIGHT&origin=SFO&destination=IAD&departureDate=2021-05-01&returnDate=2021-05-05&adult=3&childrenAges=2&room1.adults=3&room1.childAges=2&links=AD,AAS&hotelDetails=high&limit=3

Flight Anchored Search (one room + multiple passenger types)

Search Requests

https://apim.expedia.com/packages/listings?origin=ORD&destination=LAS&departureDate=2021-10-16&returnDate=2021-10-18&packageType=FH&anchorProduct=flight&adult=1&seniors=1&infantInLap=1&infantInSeat=1&room1.adults=2&room1.childAges=1,1&links=WD,AD,AAS&limit=10

Flight Anchored Search (mulitiple rooms + multiple passenger types)

Search Requests

https://apim.expedia.com/packages/listings?origin=ORD&destination=LAS&departureDate=2021-10-16&returnDate=2021-10-18&packageType=FH&anchorProduct=flight&adult=1&seniors=1&infantInLap=1&infantInSeat=1&childrenAges=2,3&room1.adults=1&room1.childAges=1,2&room2.adults=1&room2.childAges=1,3&links=WD,AD,AAS&limit=10

Flight Anchored Search (support hotel upsells + Hotel Id search)

Search Requests

https://apim.expedia.com/packages/listings?anchorProduct=FLIGHT&returnDate=2022-07-30&origin=LOS&room1.adults=2&destination=LAX&limit=250&cabin=ECONOMY&departureDate=2022-07-26&adult=2&packageType=FH&&hotelIds=2200019&links=AD,AAS,WD&allRoomTypes=true

Hotel Anchored Search (selected hotel + multiple flights)

Search Requests

https://apim.expedia.com/packages/listings?packages/listings?packageType=FH&anchorProduct=HOTEL&origin=SFO&destination=IAD&departureDate=2021-05-01&returnDate=2021-05-05&hnk=CgcyMjQ0MjMxEjIKCTIwMDE2MTgzNxIJMjAwOTE0MDQ4GgIyNCoKMjAyMC0wNS0wMTIKMjAyMC0wNS0wNRgBKgkKATMSATISATMwAQ&adult=3&childrenAges=2%2C3&links=AD&hotelDetails=high&limit=25&locale=en_US

Package Search with Multiple Flight Options

Search Requests

Using this option, the API will return 3 flights + 20 hotels (instead of the default 1 flight + 100 hotels). To enable this query the parameter &showMultipleFlights=true must be included in the API request.

https://apim.expedia.com/packages/listings?packageType=FH&anchorProduct=FLIGHT&origin=LAX&destination=JFK&departureDate=2021-06-09&returnDate=2021-06-13&adult=1&room1.adults=1&showMultipleFlights=true

Error Codes

Common Error Codes

HTTP Status CodeError CodeError MessageCause
500500Application error.Exceptions occurred for an unknown reason.
503ERROR_CALLING_FLIGHT_SERVICESome error occurred while calling the flight search serviceException occurred while calling flight service.
503ERROR_CALLING_HOTEL_SERVICESome error occurred while calling the hotel search serviceException occurred while calling hotel service.
400INVALID_PARTNER_TRANSACTION_IDPartner Transaction ID is missing, please provide Partner Transaction IDMissing Partner Transaction ID in request header element.
400INVALID_INPUT_VALUEInvalid input valueException occurred due to incorrectly formatted request element.
400DEPARTURE_DATE_IN_PASTDeparture Date should not be a past dateDeparture date is in the past.
400DEPARTURE_DATE_OUT_OF_RANGEDeparture date of segment 1 must be greater than 6 hours from nowDeparture date is too close to the current date.
400RETURN_DATE_NOT_AFTER_DEPARTURE_DATEReturn date must be after departure date.Return date in request is before departure date.
400TRAVEL_DATES_OUT_OF_MAX_WINDOWThe gap between departure date and return date should not be more than 28 daysException due to the travel window being larger than 28 days.
400RETURN_DATE_OUT_OF_MAX_ADV_PURCHASE_WINDOWReturn date can only occur up to 330 days in the future.Exception due to return date being more than 330 days after today's date.
400NEED_ATLEAST_ONE_ADULT_OR_SENIORInvalid traveler count. Either one adult or a senior is mandatory for a requestRequest must contain at least one Adult or Senior. If the request contains only children it will fail.
400INVALID_CHILD_AGEInvalid child ages. Child ages must be between 2 and 17childAges parameter must be greater than or equal to 2 and less than or equal to 17.
400INVALID_ROOM_OCCUPANT_COUNTMaximum number of occupants allowed in a room is 6The total number of travelers may be no more than 6.
400PACKAGE_TYPE_NOT_VALIDInvalid Package type. Allowed Package type is FHpackageType parameter is invalid.
400NEED_ATLEAST_ONE_ADULT_OR_SENIORInvalid traveler count. Either one adult or a senior is mandatory for a requestAt least one adult or senior must be present in the request.
400NEED_DISTINCT_ORIGIN_DESTINATIONOrigin and destination locations should not be sameThe Origin and Destination values are the same.
400HOTEL_IDS_EXCEEDToo many hotelIDs. Please specify 100 or fewer hotelIDs.The number of Hotel IDs is greater than 100.
400ROOM_COUNT_EXCEEDS_MAX_LIMITRoom Count crossed maximum allowed limit. Allowed Room count range is 1 to 3 for partners booking on an Expedia website, and 1 to 4 for partners booking via the XAP Booking API.When room count exceeds 3 for website booking partners and 4 for API booking partners.
400NEED_ATLEAST_ONE_ADULT_OR_SENIORInvalid traveler count. Either one adult or a senior is mandatory for a requestWhen there is no adult/senior for an infant in lap
400INVALID_HOTEL_IDInvalid HotelIds providedWhen hotelIds are invalid
400INVALID_FIELD_DEPARTUREDATEDate should be of the format YYYY-MM-DDInvalid date format in selected flight search details
400INVALID_FLIGHT_NUMBERInvalid flight Number for %s of %sInvalid flight number in selected flight search details
400INVALID_SEGMENT_LEG_DETAILSPlease provide %s for %s of %sWhen segment.leg details are missing for selected flight search
400INVALID_SEGMENT_DETAILSPlease provide details of 2 segments for anchoringWhen 2nd segment details are missing in selected flight search
400SEGMENT_DEPARTURE_DATE_NOT_AFTER_ARRIVAL_DATEDeparture Date of segment2 should be after the arrival date of segment1Date validation for selected flight search parameters
400ARRIVAL_DATE_BEFORE_DEPARTURE_DATEArrival date should not be before the departure date for leg%d of segment%dDate validation for selected flight search parameters

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!