Skip to content
Last updated

Booking Requests

This section describes how to submit booking requests that need to be confirmed by the venue. A booking request uses the same data structure as a booking, and is typically used when an immediate confirmation is not possible or required.


Create Booking Request

This endpoint allows a Booking Channel to request a reservation at a venue. The venue must explicitly confirm or reject the request.

Example Request

curl POST "https://api-sandbox.mozrest.com/v1/bc/booking-request" \
  -H "Authorization: Bearer {{api_key}}" \ 
  --data-raw '{
    "venueId": "60e5a3edfc8747ddfe1c10da",
    "partySize": 2,
    "date": 1634832900,
    "notes": "I\'m alergic to peanuts",
    "contact": {
        "firstname": "john",
        "lastname": "Doe",
        "email": "john.doe@gmail.com",
        "telephone": "34655040452",
        "locale": "en",
        "optInConsent": true
    }
  }'

Example Response

{
  "id": "60e890aca5f07b6ee5b950b1",
  "venueId": "60e890aca5f07b6ee5b950b1",
  "partySize": 4,
  "date": "2021-11-06T12:00:00+02:00",
  "notes": "I'm alergic to peanuts",
  "contact": {
    "id": "60e890aca5f07b6ee5b950b1",
    "firstname": "John",
    "lastname": "Doe",
    "email": "john.doe@gmail.com",
    "telephone": "44344223322",
    "locale": "en",
    "optInConsent": true
  }
}

HTTP Request

POST https://api-sandbox.mozrest.com/v1/bc/booking-request

Query Parameters

ParameterStatusDescription
venueIdMandatoryID of the venue where the booking is requested
partySizeMandatoryNumber of guests
dateMandatoryBooking datetime in UTC timestamp format
notesOptionalAny special request or note from the guest
contact[firstname]MandatoryGuest’s first name
contact[lastname]MandatoryGuest’s last name
contact[email]MandatoryGuest’s email
contact[telephone]OptionalPhone number (country code included, no plus sign)
contact[locale]MandatoryGuest's preferred language (ISO 639-1 code)
contact[optInConsent]OptionalMarketing consent (default: false)

Booking Request Object

The booking-request object shares the same structure as a regular booking. Below is an example of the full schema used when submitting a request.

Example JSON

{
  "id": "60e890aca5f07b6ee5b950b1",
  "venueId": "60e890aca5f07b6ee5b950b1",
  "bookingChannelId": "60e890aca5f07b6ee5b950b3",
  "partySize": 4,
  "status": "pending",
  "date": "2021-11-06T12:00:00+02:00",
  "notes": "I'm alergic to peanuts",
  "cancelActor": null,
  "cancelReason": null,
  "canceledAt": null,
  "contact": {
    "id": "60e890aca5f07b6ee5b950b1",
    "firstname": "John",
    "lastname": "Doe",
    "email": "john.doe@gmail.com",
    "telephone": "44344223322",
    "locale": "en",
    "optInConsent": true
  }
}