Skip to content
Last updated

Search Bookings

This endpoint allows you to retrieve a list of bookings based on various search criteria, such as venue, date range, email, or phone number. This functionality enables Mozrest to access a filtered list of booking information in real time.

Endpoint

GET https://partner-domain.com/v1/mozrest/bookings/search

Query Parameters

ParameterStatusDescription
venueIdMandatoryUnique identifier for the venue in the partner's system. Accepts Mozrest ID or Partner's ID
startDateMandatoryThe start date of the booking range (format: YYYY-MM-DD).
endDateMandatoryThe end date of the booking range (format: YYYY-MM-DD).
emailOptionalEmail address of the booking contact to filter results.
phoneNumberOptionalPhone number of the booking contact to filter results.

Example Request

curl GET "https://partner-domain.com/v1/mozrest/booking/search" \
  -H "Authorization: Bearer {{api_key}}" \
  -d "venueId=60e5a3ed409541da3650bd90" \
  -d "startDate=2022-02-14" \
  -d "endDate=2022-02-28" \
  -d "email=john.doe@gmail.com" \
  -d "phoneNumber=44344223322"

Example Response

{
  "total": 2,
  "data": [
    {
      "id": "60e890aca5f07b6ee5b950b1",
      "bookingChannel": {
        "id": "60e890aca5f07b6ee5b950b3",
        "name": "Channel Name"
      },
      "venueId": "60e890aca5f07b6ee5b950b1",
      "partySize": 4,
      "status": "confirmed",
      "date": "2021-11-07T12:00:00+02:00",
      "notes": "I'm allergic to peanuts and broccoli",
      "paymentGatewayToken": null,
      "contact": {
        "id": "60e890aca5f07b6ee5b950b1",
        "firstname": "John",
        "lastname": "Doe",
        "email": "john.doe@gmail.com",
        "telephone": "44344223322",
        "locale": "en",
        "optInConsent": true
      }
    },
    {
      "id": "60e890aca5f07b6ee5b950b2",
      "bookingChannel": {
        "id": "60e890aca5f07b6ee5b950b3",
        "name": "Channel Name"
      },
      "venueId": "60e890aca5f07b6ee5b950b1",
      "partySize": 2,
      "status": "pending",
      "date": "2021-11-15T19:30:00+02:00",
      "notes": "Vegetarian meal preferred",
      "paymentGatewayToken": null,
      "contact": {
        "id": "60e890aca5f07b6ee5b950b2",
        "firstname": "Jane",
        "lastname": "Smith",
        "email": "jane.smith@gmail.com",
        "telephone": "44344567890",
        "locale": "en",
        "optInConsent": false
      }
    }
  ]
}

Response Definitions

The response is an array of booking objects matching the search criteria, with each object containing:

  • id: Unique identifier for the booking.
  • bookingChannel: Object containing the booking channel’s id and name.
  • venueId: Unique identifier for the venue associated with the booking.
  • partySize: Number of people for the reservation.
  • status: Current status of the booking (e.g., "confirmed").
  • date: Date and time of the booking in ISO 8601 format.
  • notes: Special notes or requests made by the customer.
  • paymentGatewayToken: Token if payment information was processed through a gateway.
  • contact: Object containing contact details for the booking owner:
    • id: Unique identifier for the contact.
    • firstname: First name of the contact person.
    • lastname: Last name of the contact person.
    • email: Email address of the contact person.
    • telephone: Phone number of the contact person.
    • locale: Preferred language/locale of the contact.
    • optInConsent: Boolean indicating whether the contact has opted in for communications.