Cart validate
Validate a cart of items by checking the availability and occupancy of each item. This endpoint can be used to validate a cart before performing a booking with the /cart-checkout endpoint.
Parameters
show_pending_as"CONFIRMED" | "TENTATIVE" | "CANCELLED"How to interpret pending events when checking availability. Defaults to TENTATIVE
Body
coupon_codesrequiredArray<string>The coupon codes entered for the bookings in the cart.
itemsrequiredArray<CartItem>The items to book. Each item has a product, interval, occupancy and form values, and a client-side id to match results to items.
Responses
200Validity of each of the items in the cart
TypeScript
Array<{
availabilityMatch: boolean;
id: string;
occupancyMatch: boolean;
valid: boolean;
}>POST /cart-validatecurl -X POST "https://api.bookingmood.com/v1/cart-validate?show_pending_as=TENTATIVE" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"coupon_codes": [
"SUMMER21"
],
"items": [
{
"form_values": {
"00000000-0000-0000-0000-000000000000": {
"first_name": "John",
"last_name": "Doe"
},
"00000000-0000-0000-0000-000000000001": {
"city": "Anytown",
"country": "US",
"street": "123 Main St",
"zip": "12345"
},
"00000000-0000-0000-0000-000000000002": "value"
},
"interval": {
"start": "2026-10-30",
"end": "2026-11-03"
},
"id": "00000000-0000-0000-0000-000000000000",
"occupancy": {
"00000000-0000-0000-0000-000000000000": 1
},
"product_id": "00000000-0000-0000-0000-000000000000"
}
]
}'Example response
JSON
[
{
"availabilityMatch": true,
"id": "00000000-0000-0000-0000-000000000000",
"occupancyMatch": true,
"valid": true
}
]