이 콘텐츠는 아직 해당 언어로 이용하실 수 없습니다.

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);
이 페이지가 도움이 되었나요?
이 콘텐츠를 어떻게 개선하면 좋을까요?
더 나은 만드는 데 도움을 주셔서 감사합니다!