Price API
Mandatory before every booking
Always call the Price API before initiating a Book call. Rates are fetched live from suppliers and can change between Rooms & Rates and checkout. If the rate has moved and you skip this step, the booking will fail.
The Price API validates the selected rate against the supplier in real time and returns the confirmed current price. Call it as the user lands on the checkout page — before they enter guest details or payment information.
What to pass
hotelId
From the search results or Rooms & Rates response.
token
The search token from Search Init. Carries the search context — check-in, check-out, occupancy.
recommendationId
From the Rooms & Rates response. The engine uses this — not individual rate IDs — because it already knows which supplier and rate combination to validate. In multi-room searches this ensures rates from the same supplier are priced together, since cross-supplier rate combinations are not supported at booking.
Handling price changes
We pass 2 new parameter IsChangeInPrice and OldTotalRate means the rate has changed since Rooms & Rates was called. This is expected behaviour. PS: The total rate will have the new updated rate.
❌ Wrong approach
Show the user a generic error page. They have no idea what happened and will likely abandon.
✅ Correct approach
Surface the new price from the Price API response and show the user: "The price for this room has been updated to $X. Do you want to continue?" Let them decide.
Multi-room searches — more than one rate in the response
totalRate values together to get the amount to display to the user. standardisedRoomGroups already pre-calculates this total — use it as the reference.
Content matching on checkout
Rooms object of the response. This our recommendation to dynamically pick the room name and content from the suplier you are using to complete the booking. This ensures the room name is being picked form the suplier response rather than the standardised rooms object of rooms and rates response.
Error codes
| Code | Message |
|---|---|
| 4001 | Invalid data in request — refer to fields[] for details |
| 4004 | The hotel you selected is sold out |
| 4006 | Rate has expired — restart from search |
| 5000 | Unknown system error — contact support with the correlationId |
| 5001 | Unknown error from supplier — contact support with the correlationId |
Updated 4 days ago