İçeriğe atla

Book

Perform a booking by providing the product, interval, occupancy and form values. If the booking is successful, a reference and booking ID will be returned. If a payment URL is included in the response, the user should be redirected to that URL to complete the booking.

Body

coupon_codesrequiredArray<string>

The coupon codes entered for the booking.

currencyrequiredCurrency | null

The currency to use for the booking. Defaults to the product's currency. See the widget docs for the allowed values.

failure_urlrequiredstring

The URL to redirect the user to when a booking payment fails. Defaults to the booking page.

form_valuesrequiredRecord<string, string | number | boolean | null | Record<string, string | null>>

Values for each of the form fields. The keys refer to services.id, the values should be valid values for each of these services.

intervalrequired{ start: string, end: string }

The interval to book.

languageLanguage

The user's preferred language.

occupancyrequiredRecord<uuid, integer>

The occupancy for each capacity group. The keys refer to capacity_groups.id, the values are the number of guests for that group.

product_idrequireduuid

The identifier of the product to book.

redirect_urlrequiredstring | null

The URL to redirect the user to after the booking is completed.

show_pending_asrequired"CONFIRMED" | "TENTATIVE" | "CANCELLED"

How to interpret pending events when checking if the booking is possible. Defaults to TENTATIVE

Responses

201

Information identifying the booking. If a payment URL is set, the user should be redirected to that URL to complete the booking.

TypeScript
{
  booking_id: uuid;
  payment_expiry_timestamp: number | null;
  payment_url: string | null;
  reference: string;
  secret: string;
}
POST /book
curl -X POST "https://api.bookingmood.com/v1/book" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "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": "+31612345678"
    },
    "interval": {
      "start": "2026-10-30",
      "end": "2026-11-03"
    },
    "occupancy": {
      "00000000-0000-0000-0000-000000000000": 1
    },
    "product_id": "00000000-0000-0000-0000-000000000000"
  }'
Example response
JSON
{
  "booking_id": "00000000-0000-0000-0000-000000000000",
  "payment_url": null,
  "reference": "ABC123",
  "secret": "SECRET"
}

Rezervasyonlarınızın kontrolünü elinize alın. Kendi işinizi kurun.

Bookingmood’u kullanarak doğrudan rezervasyonlarını artırmak ve misafirleriyle daha sağlam ilişkiler kurmak isteyen 1200’dan fazla bağımsız tatil kiralama işletmesine katılın.

Ücretsiz 14 günlük deneme başlatın