Property ID Search

This example demonstrates how to retrieve content and pricing for properties using their Expedia property IDs via the Lodging Listings API.

Property ID search requires fewer search criteria than location-based searches, making it more efficient for obtaining property content and pricing.

For details on how to retrieve property IDs, refer to Retrieve Property Static Data. For more information about the Listings API, see Listings API documentation.

1. Build the request object using the classes defined in the SDK

GetLodgingListingsOperationParams getLodgingListingsOperationParams =
        GetLodgingListingsOperationParams.builder()
            .partnerTransactionId("PARTNER TRANSACTION ID")
            // Expedia Property IDs to search for
            .ecomHotelIds(new HashSet<>(Arrays.asList("73460112", "2330513")))
            // The links to return, WEB includes WS (Web Search Result Page)
            // and WD (Web Details Page)
            .links(Collections.singletonList(GetLodgingListingsOperationParams.Links.WEB))
            // Check-in 5 days from now
            .checkIn(LocalDate.now().plusDays(5))
            // Check-out 10 days from now
            .checkOut(LocalDate.now().plusDays(10))
            // Filter the properties that are available only
            .availOnly(true)
            // Use the default occupancy: 2 adults in one room
            .build();

GetLodgingListingsOperation getLodgingListingsOperation =
        new GetLodgingListingsOperation(getLodgingListingsOperationParams);

2. Make the API call using service client.

Response<HotelListingsResponse> hotelListingsResponse =
        client.execute(getLodgingListingsOperation);
Did you find this page helpful?
How can we improve this content?
Thank you for helping us improve!