# 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](/bc-api/venues) has the `bookableAreas` property set to `true`, it is mandatory to first request the available areas before using this endpoint, as the availability is depending of 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`. | | openingTimes | Array | Full list of available opening times for the venue. | | 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. | | requiresDuration | Boolean | Indicates if a duration is required to complete a booking. | | durations | Array | List of available durations. | | durations[value] | Int | Duration in seconds (e.g. 10800 for 3 hours). | | durations[label] | String | Human-readable duration label (e.g. "3:00"). | | durations[endTime] | String | Latest end time available for the selected duration. | | bookingTypes | Array | List of predefined booking types. | | bookingTypes[id] | String | ID of the booking type to send during booking creation. | | bookingTypes[name] | String | Name of the booking type to display to the user. | ## 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 ```shell 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 ```json { "date": 1677247200, "partySize": 2, "slots": [ { "time": "12:00", "requireCreditCard": false, "amount": 0, "type": "book" }, { "time": "14:00", "requireCreditCard": true, "amount": 2050, "type": "request" } ], "openingTimes": [ { "time": "09:00" }, { "time": "21:00" } ], "nextAvailability": { "date": 1664282700, "slots": [ { "time": "12:45" } ] }, "previousAvailability": { "date": 1664282700, "slots": [ { "time": "12:45" } ] }, "requiresDuration": true, "durations": [ { "value": 10800, "label": "3:00", "endTime": "22:00" }, { "value": 12600, "label": "3:30", "endTime": "22:30" } ], "bookingTypes": [ { "id": "64ca5f2cab23a4112a7d2dde", "name": "Rugby World Cup" }, { "id": "5f5b58da8ef6d152cf7b3fb5", "name": "Live Sports (let us know what you're here for)" } ] } ```