Availability
The Availability endpoint allows the Booking Channel to retrieve a list of available time slots for a specific Venue based on party size, date, and area.
IMPORTANT NOTE
If the venue has the bookableAreas property set to true, it is mandatory to first request the available areas before using this endpoint, as the availability depends on the area.
Object definition
| Key | Type | Description |
|---|---|---|
| date | String | Date time in Timestamp UTC format (e.g. 1634387400 for 2021-10-16 14:30). |
| partySize | Int | Number of people. |
| slots | Array | List of maximum 9 available slots around the selected time. |
| slots[time] | String | Time of the slot (e.g. "14:00"). |
| slots[requireCreditCard] | Boolean | Indicates if a credit card is required to book the slot. |
| slots[amount] | Integer | Amount to be paid. If 0, the credit card is only used as a guarantee. |
| slots[type] | String | Booking type. Possible values: book, request. |
| nextAvailability[date] | String | Timestamp of the next available slot. |
| nextAvailability[slots] | Array | Slots available on the next available date. |
| previousAvailability[date] | String | Timestamp of the previous available slot. |
| previousAvailability[slots] | Array | Slots available on the previous available date. |
Get Venue Availability
This endpoint retrieves a list of slots available for a specific Venue on a specific date, session and party size.
Endpoint
GET https://api-sandbox.mozrest.com/v1/bc/availability
Query Parameters
| Parameter | Status | Description |
|---|---|---|
| venueId | Mandatory | Venue ID |
| areaId | Optional | Area ID to filter results. |
| date | Mandatory | Date time in Timestamp UTC format (e.g. 1634387400 for 2021-10-16 14:30). |
| partySize | Mandatory | Number of persons (e.g. 4). |
Example Request
curl GET "https://api-sandbox.mozrest.com/v1/bc/availability" \
-H "Authorization: Bearer {{api_key}}" \
-d "venueId=60e5a3ed409541da3650bd90" \
-d "areaId=60e5a3ed409541da3650bd90" \
-d "date=1633930574" \
-d "partySize=4"
Example Response
{
"date": 1677247200,
"partySize": 2,
"slots": [
{
"time": "12:00",
"requireCreditCard": false,
"amount": 0
},
{
"time": "14:00",
"requireCreditCard": true,
"amount": 2050
}
],
"nextAvailability": {
"date": 1664282700,
"slots": [
{
"time": "12:45"
}
]
},
"previousAvailability": {
"date": 1664282700,
"slots": [
{
"time": "12:45"
}
]
},
}