Skip to main content

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
bookingChannelIdMandatorySame value as bookingChannel.id, sent additionally at the top level for compatibility.
partySizeMandatoryNumber of people for the reservation (e.g., 4).
dateMandatoryDate and time of the booking as a UTC Unix timestamp (integer, e.g. 1639578600).
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.
contact.addressOptionalAddress of the contact person, when known: object with country, city, region, street and postalCode (each may be null).
contact.optInConsentOptionalWhether the contact opted in to receive marketing communications.
notesOptionalSpecial instructions or requests associated with the booking.
paymentGatewayTokenOptionalPayment gateway token if prepayment is required.
metadataOptionalTechnical context of the booking: object with ipAddress, browser, osName, osVersion (each may be null) and, when available, externalId.

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"
},
"bookingChannelId": "60e890aca5f07b6ee5b950b3",
"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",
"address": {
"country": "GB",
"city": "London",
"region": null,
"street": "1 Example Street",
"postalCode": "SW1A 1AA"
},
"optInConsent": true
},
"paymentGatewayToken": "pm_1JkkRzAY52ufXkvaHWKbasua",
"metadata": {
"ipAddress": "203.0.113.10",
"browser": "Chrome",
"osName": "Mac OS",
"osVersion": "10.15.7"
}
}'

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