Core resources
Administration
Booking flow
Perform a booking.
product_id
required
uuid
The identifier of the unit to book.
coupon_codes
Array<text>
The coupon codes entered for the booking.
currency
text
The currency to use for the booking. Defaults to the unit's currency. See the widget docs for the allowed values.
form_values
Record<uuid, uuid | text | number | boolean>
Values for each of the form fields. The keys are the form field IDs, the values are the values entered by the user.
interval
Required
{ start: string, end: string }
The interval to book.
occupancy
Required
Record<uuid, integer>
The occupancy for each capacity group. The keys are the capacity group IDs, the values are the number of guests for that group.
show_pending_as
"CANCELLED" | "TENTATIVE" | "CONFIRMED"
How to interpret pending events when checking if the booking is possible. Defaults to TENTATIVE
201
Information identifying the booking. If a payment URL is set, the user should be redirected to that URL to complete the booking.
{ reference: uuid; booking_id: uuid; payment_url: string | null; }
POST
/book
curl -X POST "https://api.bookingmood.com/v1/book" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{"product_id":"00000000-0000-0000-0000-000000000000","interval":{"start":"2024-11-21","end":"2024-11-25"},"occupancy":{"00000000-0000-0000-0000-000000000000":1}}'
{"reference": "00000000-0000-0000-0000-000000000000","booking_id": "00000000-0000-0000-0000-000000000000","payment_url": null}