此內容尚不提供此語言版本

Lodging Quotes

Using the Lodging Quotes API to return the price and availability of a Vrbo property.

For details on retrieving property IDs, refer to Retrieve Property Static Data. For more information on the Quotes API, see Quotes API documentation.

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

GetLodgingQuotesOperationParams quotesOperationParams =
        GetLodgingQuotesOperationParams.builder()
            .partnerTransactionId("PARTNER TRANSACTION ID")
            // Check-in 5 days from now
            .checkIn(LocalDate.now().plusDays(5))
            // Check-out 10 days from now
            .checkOut(LocalDate.now().plusDays(10))
            // Vrbo Property IDs to search for
            .propertyIds(new HashSet<>(Arrays.asList("87704892","12410858")))
            // The links to return, WEB includes WS (Web Search Result Page) and WD (Web Details Page)
            .links(Collections.singletonList(GetLodgingQuotesOperationParams.Links.WEB))
            .build();

GetLodgingQuotesOperation quotesOperation = 
        new GetLodgingQuotesOperation(quotesOperationParams);

2. Make the API call using service client.

Response<LodgingQuotesResponse> hotelQuotesResponse =
        client.execute(quotesOperation);
這個頁面有幫助嗎?
我們能如何改善內容?
感謝您協助我們進行改善!