Naar inhoud

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.

Requiresproducts:read

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

200

Validity of each of the items in the cart

TypeScript
Array<{
  availabilityMatch: boolean;
  id: string;
  occupancyMatch: boolean;
  price: {
    currency: string;
    deposit: number;
    lines: Array<{
      amount: number;
      fee_type: string;
      item_type: string;
      name: MultiLanguageString;
      quantity: number;
    }>;
    subtotal: number;
    tax: number;
    total: number;
  };
  valid: boolean;
}>
POST/cart-validate
curl "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-11-14", "end": "2026-11-18" },
        "id": "00000000-0000-0000-0000-000000000000",
        "occupancy": { "00000000-0000-0000-0000-000000000000": 1 },
        "product_id": "00000000-0000-0000-0000-000000000000"
      }
    ]
  }'
Example
JSON
[
  {
    "availabilityMatch": true,
    "id": "00000000-0000-0000-0000-000000000000",
    "occupancyMatch": true,
    "valid": true
  }
]

Neem de controle over je boekingen. Bouw een bedrijf dat van jou is.

Sluit je aan bij 1200+ onafhankelijke vakantieverhuurbedrijven die Bookingmood gebruiken om hun directe boekingen te vergroten en een sterkere band met hun gasten op te bouwen.

Start je gratis 14-daagse proefperiode