Booking Validation
When making a Booking request, there are several key validation criteria that must be met to ensure the request is accepted. If any of these conditions are not fulfilled, the Booking will be automatically rejected by system. Below is a detailed explanation of each validation rule.
1. Number of travelersCopied!
The number of travelers in the Booking request must adhere to the Product's settings:
According to the Product:
-
minTravelers: Minimum number of travelers required for a booking -
maxTravelers: Maximum number of travelers allowed for a booking
Rule: The number of travelers must be within the range of minTravelers and maxTravelers as defined by the Product.
2. Price Item ConfigurationCopied!
The Price Items included in the Booking request reflects the items purchased by the Customer during the checkout. Each Price Item must contain the following parameters:
-
id: This is the Price id selected to purchase -
amount: Number of units selected for the specific Price
Depending on the Pricing Option's pricingType, you will have to comply with the following rules:
2.a. Per Person and Tier Pricing
For both per person and tier pricing, the amount of each Price Item reflects the number of units (or travelers) purchasing that particular item.
Rule: The total number of units purchased across all Price Items must be equal to the number of travelers in the Booking request.
2.b. Group Pricing
For group pricing, there must be at least one Price Item selected for the group, and the amount for this Price Item must be equal to 1 (regardless of the group size).
If the Price object allows extra travelers (i.e., allowExtraTravelers = true), and the total number of travelers exceeds the maxTravelers setting of the Price object, then the extra travelers must be charged individually (as extra charge per person).
Rule: Extra travelers (travelers - maxTravelers) must have Price Item(s) configured similarly to the per person pricing rule (described in 2.a.). The prices for each extra traveler are provided in the pricesPerExtraTraveler array of the Price object.
3. Additional Service Item ValidationCopied!
The Additional Service Items included in the Booking reflects the additional service items purchased by the Customer during the checkout. Each Additional Service Item must contain the following parameters:
-
id: This is the Additional Service id selected to purchase -
amount: Number of units selected for the specific Additional Service
Depending on the Additional Service's object, you will have to comply with the following rules:
Rule: If minQuantity is provided on the Additional Service object, the amount of the Additional Service Item must be greater than or equal to this value.
Rule: If maxQuantity is provided on the Additional Service object, the amount of the Additional Service Item must be less than or equal to this value.
4. Availability and Pricing Option ValidationCopied!
Availability and Pricing Option selected for the Booking must remain bookable at the moment the checkout process is completed.
Rule: Ensure that the selected Availability and Pricing Option are still bookable and have not expired or been modified during the checkout process.