Error Message
The rooms cannot be booked without executing the cancellation policies first.
What does this error mean?
This response indicates that the booking confirmation was blocked because the cancellation policies were not executed and recorded for the same booking attempt.
In the hotel booking flow, confirmation (DoBooking) depends on a previous step that validates and records the cancellation policies (getBookingConditions). This record is associated with the Token used for the booking attempt.
If DoBooking is sent with a Token that does not have this record, the system assumes that the cancellation policies were not executed and returns the error.
Most common symptoms
DoBookingreturns HTTP 200, but the payload contains anErrorobject.- The message explicitly states that cancellation policies must be executed before booking.
- The booking is not created, and the
Roomsfield may be returned asnull.
Most common root cause
Token mismatch between requests.
Typical example:
getBookingConditionswas called with TOKEN_ADoBookingwas called with TOKEN_B
Even if the hotel and room are the same, the cancellation policy record is tied to the Token. If the Token is not identical, validation fails.
Other possible causes
getBookingConditionswas executed with parameters that differ from those sent inDoBooking(hotel, room, dates, occupancy).- The Token expired due to a delay between the steps.
- Parallel retries or multiple browser tabs caused the Token to be replaced during the booking flow.
- An old Token was reused from the integrator's session or cache.
How to resolve it
- Repeat the flow, ensuring the following order:
- Availability/Search
getBookingConditionsDoBooking
- Ensure complete consistency between
getBookingConditionsandDoBooking:- Same Token
- Same HotelId
- Same RoomId
- Same dates and occupancy
- If retrying
DoBooking:- Execute
getBookingConditionsagain using the same Token as the retry, immediately before confirming the booking.
- Execute
How to quickly confirm it in the logs
Compare the following fields in both requests:
TokenHotelIdRoomIdorRoomIds
If the Token is different, the cause is confirmed.
Recommended audit:
- Search the logs for a
getBookingConditionsrequest with the same Token as the failedDoBooking. - If no such request exists, the flow either skipped this step or the Token was changed.
Prevention
- Do not reuse a Token across different booking attempts.
- Avoid parallel processing during checkout (two confirmations running simultaneously).
- When the room selection, dates, or occupancy are changed, generate a new Token and execute
getBookingConditionsagain. - Standardize Token storage in the integrator, always replacing the previous value in the user's session.
What to send to Support when assistance is required
For a complete analysis, please provide:
ClientReference- Token used in
DoBooking - Requests and responses for:
- Availability/Search (where the Token was generated)
getBookingConditionsDoBooking
- Approximate time of the test and environment (production/staging)
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article