Skip to content
Last updated

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:

EnvironmentEndpoint
Productionhttps://api.mozrest.com/v1/rms/webhook
Sandboxhttps://api-sandbox.mozrest.com/v1/rms/webhook

The webhook endpoints for availability notifications are:

https://api.mozrest.com/v1/rms/webhook

EnvironmentEndpoint
Productionhttps://webhooks.mozrest.com
Sandboxhttps://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
  }
}
FieldTypeDescription
entityStringEntity type, fixed as "booking"
entityIdStringUnique identifier of the booking
actionStringAction type, fixed as "update"
data.partySizeIntegerUpdated party size for the booking
data.dateIntegerSlot 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"
  }
}
FieldTypeDescription
entityStringEntity type, fixed as "booking"
entityIdStringUnique identifier of the booking
actionStringAction type, fixed as "update"
data.statusStringStatus of the booking

3. Cancellation

This webhook is sent when a booking is canceled.

Payload Example:

{
  "entity": "booking",
  "entityId": "your-booking-id",
  "action": "cancel"
}
FieldTypeDescription
entityStringEntity type, fixed as "booking"
entityIdStringUnique identifier of the booking
actionStringAction 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"
        }
    }
}
FieldTypeDescription
entityStringEntity type, fixed as "venue"
entityIdStringUnique identifier of the venue
actionStringAvailable action types are "booking_creation","booking_update","booking_cancellation"
data.mealDateIntegerDate of availability in UTC timestamp format
data.partySizeIntegerNumber of people for which availability is checked
data.areaIdStringThe unique Area ID for location within the venue if applicable.
contact.firstnameStringFirst name of the contact person making the booking.
contact.lastnameStringLast name of the contact person making the booking.
contact.emailStringEmail address of the contact person.
contact.telephoneStringPhone number of the contact person.
contact.localeStringPreferred 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.