The Price API is used to fetch the final price of the selected rooms/rates from the RoomRates API response before proceeding with the booking. This API is crucial because the rate information for a particular hotel is fetched dynamically, and there is a chance that the price may be updated at the hotel end. Therefore, it is essential to update the user with the latest price before proceeding with the booking.

Price API Details:
HTTP Method: GET
Endpoint: {baseEndpoint}/api/hotel/{hotelId}/{token}/price/recommendation/{recommendationId}

FAQs

Do I need to make the Price API call before the booking step?
Yes, this step is mandatory before the book API call.

Does the price get updated everytime we make this API call?
It depends upon the supplier/provider as stated earlier all the calls made via the ZentrumHub API to the supplier are dynamic and we do not cache any data.

Why do I need to use the recommendationId instead of the rateIds to make the pricing call?
As you would observe the rateIds in the recommendation in case of multi-room search, each recommendation contains rateIds from a single supplier only as we do not support pricing on multi-suppliers and also there is a scenario where the supplier does not support combining the different rateIds for performing a book. We have exclusively taken care of this in our recommendation building logic.

How can I use the recommendationId to fetch the pricing response?

Steps to Use the Price API:

1.Fetch Details: Obtain the recommendationId, token, and hotelId from the RoomRates API response.
2.Call Price API: Pass the above details to the Price API endpoint as route parameters.

How do I get the content from the specific supplier for which I have received the rates using the getHotelContent API to show on the checkout page?

To obtain content from the supplier for a pricing call, follow these steps:

  1. Retrieve the providerName value from the rate object within the roomsandrates response.
  2. Pass this providerName value to the providerPrefs property in the getHotelContent request.

This approach will override the ContentPreference set against the channel for the getHotelContent call.

Error Codes

Error CodeError Message
4001Invalid data in request - Please refer to the fields[] for more details.
4004The hotel you selected is sold out
4005Price for the selected room(s) has changed
4006The rate you tried to book has expired. Please try again with a new search.
5000Your request failed due to an unknown system error. Please contact support team with the correlationId.
5001Your request failed due to an unknown error returned by the supplier. Please contact support team with the correlationId.