How availability validation works
The validation of whether an option is available for booking through CanBook takes place exclusively in the response of the GetBookingConditions method.
While the Search method initially returns available options, its primary purpose is to ensure high performance and provide search results quickly. Therefore, the information returned during the search should not be considered a final confirmation that the option is still available for booking.
The role of GetBookingConditions
The GetBookingConditions method performs a new validation directly with the supplier in real time.
During this step, the following information is revalidated:
- Option availability
- Rates
- Booking policies and conditions
- Eligibility of the option for booking
CanBookstatus
Before proceeding with the DoBooking method, the option must return:
CanBook = true
Correct booking flow
The recommended booking flow must follow the steps below:
SearchGetBookingConditions- Validate that
CanBook = true DoBooking
Important
Calling GetBookingConditions is a mandatory step in the booking flow and cannot be replaced by a validation based solely on the Search response.
This is because availability and booking conditions returned during the search may change before the reservation is confirmed. GetBookingConditions ensures that the information is revalidated directly with the supplier before the booking request is submitted.
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