Webhooks Overview
Webhooks are an essential tool for providing Mozrest with real-time updates on bookings and availability from Reservation Software providers. By integrating webhooks, Reservation Software providers can send instant notifications about booking status changes, availability adjustments, and cancellations directly to Mozrest. These updates are crucial for maintaining synchronization and ensuring that Mozrest has the latest data without relying on continuous polling.
Importance of Webhooks
Webhooks allow Reservation Software providers to keep Mozrest accurately informed about critical events, such as booking confirmations, cancellations, and availability updates. This is especially important for transactional billing channels, as only confirmed bookings are billed. Timely and reliable updates help avoid discrepancies, ensuring Mozrest's data reflects real-time statuses, which supports efficient billing and optimal customer experience.
With webhooks, Reservation Software providers can ensure that:
- Real-Time Booking Updates: Mozrest receives immediate notifications about booking status changes, allowing for accurate and efficient billing.
- Efficient Availability Management: Availability changes sent via webhooks help Mozrest provide customers with up-to-date options, reducing the risk of overbookings.
- Streamlined Data Flow: By pushing updates only when needed, webhooks improve resource usage and system efficiency, minimizing unnecessary API requests and enhancing overall performance.
Getting Started
To integrate webhooks with Mozrest, the Reservation Software must provide Mozrest with an endpoint and a non-expiring Bearer Token to authenticate the requests. Each time an event occurs, Mozrest will send a POST request to the specified endpoint, carrying details such as the event type and relevant booking or availability data.
The following documentation details the specifications for each webhook event, including payload structure and handling instructions, ensuring smooth and effective integration with Mozrest.
Webhook Endpoints
The webhook endpoints for booking updates are:
Environment | Endpoint |
---|---|
Production | https://api.mozrest.com/v1/rms/webhook |
Sandbox | https://api-sandbox.mozrest.com/v1/rms/webhook |
The webhook endpoints for availability notifications are:
https://api.mozrest.com/v1/rms/webhook
Environment | Endpoint |
---|---|
Production | https://webhooks.mozrest.com |
Sandbox | https://webhooks.sandbox.mozrest.com |
All requests to this endpoint must include your Token for authentication.
Webhook Events
1. Booking Update
This webhook is triggered when there is an update to an existing booking, such as a change in party size or booking date.
Payload Example:
{
"entity": "booking",
"entityId": "your-booking-id",
"action": "update",
"data": {
"partySize": 2,
"date": 1719599400
}
}
Field | Type | Description |
---|---|---|
entity | String | Entity type, fixed as "booking" |
entityId | String | Unique identifier of the booking |
action | String | Action type, fixed as "update" |
data.partySize | Integer | Updated party size for the booking |
data.date | Integer | Slot time in UTC Unix timestamp format. |
2. Status update
Triggered when the reservation status changes:
Available statuses:
- confirmed: the booking has been confirmed by the venue
- rejected: the booking has been rejected by the venue
- seated: diner has been seated
- completed: diner has already paid
- no-show: diner didn't attend to the restaurant
Payload Example:
{
"entity": "booking",
"entityId": "your-booking-id",
"action": "update",
"data": {
"status": "no-show"
}
}
Field | Type | Description |
---|---|---|
entity | String | Entity type, fixed as "booking" |
entityId | String | Unique identifier of the booking |
action | String | Action type, fixed as "update" |
data.status | String | Status of the booking |
3. Cancellation
This webhook is sent when a booking is canceled.
Payload Example:
{
"entity": "booking",
"entityId": "your-booking-id",
"action": "cancel"
}
Field | Type | Description |
---|---|---|
entity | String | Entity type, fixed as "booking" |
entityId | String | Unique identifier of the booking |
action | String | Action type, fixed as "cancel" |
4. Availability Update
This webhook is used to update the availability of a specific venue, providing details of available or unavailable time slots.
Payload Example:
{
"entity": "venue",
"entityId": "c0fa91e9-ed60-4d22-bd96-1545fb98936d",
"action": "booking_creation",
"data": {
"mealDate": 1742043600,
"partySize": 2,
"areaId": "8123477f-4630-404f-a7fb-eec13fe4cd37",
"contact": {
"firstname": "John",
"lastname": "Doe",
"email": "john.doe@gmail.com",
"telephone": "44344223322",
"locale": "en"
}
}
}
Field | Type | Description |
---|---|---|
entity | String | Entity type, fixed as "venue" |
entityId | String | Unique identifier of the venue |
action | String | Available action types are "booking_creation","booking_update","booking_cancellation" |
data.mealDate | Integer | Date of availability in UTC timestamp format |
data.partySize | Integer | Number of people for which availability is checked |
data.areaId | String | The unique Area ID for location within the venue if applicable. |
contact.firstname | String | First name of the contact person making the booking. |
contact.lastname | String | Last name of the contact person making the booking. |
contact.email | String | Email address of the contact person. |
contact.telephone | String | Phone number of the contact person. |
contact.locale | String | Preferred language/locale of the contact person. |
Each of these events are essential for Mozrest to remain up-to-date with real-time booking and availability data from Reservation Software providers, ensuring a seamless experience for all users.