Bookings
The Booking object structure includes an array named "Contact" to represent the booking owner.
Object Definition
Key | Type | Description |
---|---|---|
id | String | Booking id |
venueId | String | Venue id for booking |
venueExternalId | String | Venue id on Partner system for the booking |
bookingChannel[id] | String | Booking channel id where the customer placed the booking |
bookingChannel[name] | String | Booking channel name where the customer placed the booking |
status | String | Booking status [pending_confirmation, requires_payment, confirmed, rejected, canceled, no-show, seated, completed] |
partySize | Int | Number of people |
session | String | Booking session |
date | Datetime | Booking date and time in Timestamp UTC format (ie. Saturday, 16 October 2021 14:30 is 1634387400 on timestamp) |
notes | Text | User notes |
cancelActor | String | Who had canceled the booking |
cancelReason | Text | Why the booking has been canceled |
canceledAt | Datetime | When the booking has been canceled (UTC) |
paymentGatewayToken | String | Payment gateway token for customers credit card |
contact[firstname] | Text | Customer's first name |
contact[lastname] | Text | Customer's last name |
contact[email] | Text | Customer's email (ie. john.doe@email.com) |
contact[telephone] | Int | Customer's telephone including country code but NO sign (ie. +44 20 7234 3456 -> 442072343456 ) |
contact[locale] | Text | Customer's language (ISO2 format) |
contact[optInConsent] | Boolean | Allow to receive marketing emails from the Venue and the Partner (default: false) |
Update Booking
This endpoint allows you to amend a booking in a pending status.
Endpoint
PUT https://api-sandbox.mozrest.com/v1/rms/booking/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id | Mandatory | Booking ID in the Partner system. |
Body Parameters
Parameter | Status | Description |
---|---|---|
partySize | Optional | Number of people. |
date | Optional | Date and time in UTC Timestamp format (e.g., Saturday, 16 October 2021, 14:30 is 1634387400 ). |
status | Optional | Booking status [confirmed, rejected, canceled, no-show, seated, completed] |
Note: At least one of the above parameters must be provided.
Example Request
curl PUT "https://api-sandbox.mozrest.com/v1/rms/booking/{id}" \
-H "Authorization: Bearer {{api_token}}" \
--data-raw '{
"partySize": 4,
"date": 1634401800,
"status": "confirmed"
}'
Example Response
{
"id": "60e890aca5f07b6ee5b950b1",
"venueId": "60e890aca5f07b6ee5b950b1",
"partySize": 4,
"status": "confirmed",
"date": "2021-11-07T12:00:00+02:00",
"notes": "I'm alergic to peanuts and broccoli",
"paymentGatewayToken":null,
"optInConsent": true
}
Cancel Booking
This endpoint allows you to cancel a booking.
Endpoint
PUT https://api-sandbox.mozrest.com/v1/rms/booking/{id}/cancel
URL Parameters
Parameter | Status | Description |
---|---|---|
id | Mandatory | Booking ID in the Partner system. |
Body Parameters
Parameter | Status | Description |
---|---|---|
cancelActor | Optional | Indicates who canceled the booking. |
cancelReason | Optional | Reason for canceling the booking. |
Example Request
curl PUT "https://api-sandbox.mozrest.com/v1/rms/booking/{id}/cancel" \
-H "Authorization: Bearer {{api_key}}" \
--data-raw '{
"cancelActor": "venue",
"cancelReason": "Overbooking"
}'
Example Response
{
"cancelActor": "venue",
"cancelReason": "Overbooking"
}