Skip to content
Last updated

Bookings

The Booking object structure includes an array named "Contact" to represent the booking owner.

Object Definition

KeyTypeDescription
idStringBooking id
venueIdStringVenue id for booking
venueExternalIdStringVenue id on Partner system for the booking
bookingChannel[id]StringBooking channel id where the customer placed the booking
bookingChannel[name]StringBooking channel name where the customer placed the booking
statusStringBooking status [pending_confirmation, requires_payment, confirmed, rejected, canceled, no-show, seated, completed]
partySizeIntNumber of people
sessionStringBooking session
dateDatetimeBooking date and time in Timestamp UTC format (ie. Saturday, 16 October 2021 14:30 is 1634387400 on timestamp)
notesTextUser notes
cancelActorStringWho had canceled the booking
cancelReasonTextWhy the booking has been canceled
canceledAtDatetimeWhen the booking has been canceled (UTC)
paymentGatewayTokenStringPayment gateway token for customers credit card
contact[firstname]TextCustomer's first name
contact[lastname]TextCustomer's last name
contact[email]TextCustomer's email (ie. john.doe@email.com)
contact[telephone]IntCustomer's telephone including country code but NO sign (ie. +44 20 7234 3456 -> 442072343456 )
contact[locale]TextCustomer's language (ISO2 format)
contact[optInConsent]BooleanAllow 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

ParameterStatusDescription
idMandatoryBooking ID in the Partner system.

Body Parameters

ParameterStatusDescription
partySizeOptionalNumber of people.
dateOptionalDate and time in UTC Timestamp format (e.g., Saturday, 16 October 2021, 14:30 is 1634387400).
statusOptionalBooking 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

ParameterStatusDescription
idMandatoryBooking ID in the Partner system.

Body Parameters

ParameterStatusDescription
cancelActorOptionalIndicates who canceled the booking.
cancelReasonOptionalReason 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"
}