Availability Validation for Booking via CanBook

Created by Marcello Magalhães, Modified on Fri, 18 Sep at 3:00 PM by Marcello Magalhães

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
  • CanBook status

Before proceeding with the DoBooking method, the option must return:

CanBook = true

Correct booking flow

The recommended booking flow must follow the steps below:

  1. Search
  2. GetBookingConditions
  3. Validate that CanBook = true
  4. 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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article