Skip to content
Last updated

Create Booking

This endpoint allows Mozrest to create a new booking in the partner's system. The request includes necessary details such as venue, party size, date, and contact information to ensure proper reservation creation.

Endpoint

POST https://partner-domain.com/v1/mozrest/booking

Body Parameters

ParameterStatusDescription
venueIdMandatoryThe unique Venue ID as defined in the Partner's system.
bookingChannel.idMandatoryBooking channel id where the customer placed the booking
bookingChannel.nameMandatoryBooking channel name where the customer placed the booking
partySizeMandatoryNumber of people for the reservation (e.g., 4).
dateMandatoryDate and time of the booking in ISO 8601 format.
areaIdOptionalThe unique Area ID for location within the venue if applicable.
contact.firstnameMandatoryFirst name of the contact person making the booking.
contact.lastnameMandatoryLast name of the contact person making the booking.
contact.emailMandatoryEmail address of the contact person.
contact.telephoneMandatoryPhone number of the contact person.
contact.localeOptionalPreferred language/locale of the contact person.
notesOptionalSpecial instructions or requests associated with the booking.
paymentTokenOptionalPayment gateway token if prepayment is required.

Example Request

curl POST "https://partner-domain.com/v1/mozrest/booking" \
  -H "Authorization: Bearer {{api_key}}" \ 
  --data-raw '{
        "venueId": "60e890aca5f07b6ee5b950b1",
        "bookingChannel": {
          "id": "60e890aca5f07b6ee5b950b3",
          "name": "Channel Name"
        },  
        "partySize": 4,
        "areaId": "60e5a3ed409541da3650b2d3",
        "date": 1639578600,
        "notes": "I am allergic to peanuts",
        "contact": {
            "firstname": "John",
            "lastname": "Doe",
            "email": "john.doe@gmail.com",
            "telephone": "44344223322",
            "locale": "en",
            },
            "optInConsent": true
        },
        "paymentGatewayToken": "pm_1JkkRzAY52ufXkvaHWKbasua",
    }'

Example Response

{
  "id": "60e890aca5f07b6ee5b950b1",
  "status": "pending_confirmation"
}

Response Definitions

  • id: Unique identifier for the booking.
  • status: Status of the booking (e.g., "confirmed").

Booking statuses allowed

ParameterDescription
confirmedBooking is confirmed
pending_confirmationBooking requires manually approval by de venue
requires_paymentBooking requires payment