For the endpoint : stays/properties/list
How can I get the price for a room for each hotel based on the checkin and checkout date and number of rooms and adults.
accommodationTypeId has an ID in it, how can i fetch the corresponding value for this id and get different accomodation type options
Join in the discussion - add comment below:
Hi,
I have just updated the stays/properties/list endpoint.
You can use it now, and if any errors occur, please let me know.
Thanks
Hi
For the price, you can find it at data->listings[index]->priceDisplayInfoIrene->displayPrice->amountPerStay->amountRounded (this is the displayed price on the booking.com website). Additionally, there’s the ‘currency’ which indicates the currency unit.
To retrieve ‘accommodationTypeId,’ you can follow these steps:
After you make the initial call to the stays/properties/list endpoint, it will return data->filters. You search for the category ‘hoteltype’ within it. Under ‘options,’ you’ll find values; you take the ‘urlId’ value and set it as 'filter_by.'
For example, if you want to search for a hotel type = Entire homes & apartments with a ‘urlId’ of privacy_type=3, then in the stays/properties/list endpoint, you set ‘filter_by’ to privacy_type=3.
It seems a bit complex; I will customize the stays/properties/list endpoint to make it more user-friendly.
Thanks.