Introduction

The Time Slots API allows you to retrieve availability information for time slots at a reservation location on and around a given date and for a given party size.

A time slot represents a period of time in a restaurant’s calendar. Time slots can have any duration, and restaurants generally set their durations based on party size.

The following factors influence whether a time slot at a reservation location is available:

  • The size of the party that must be seated.
  • The reservation location’s table and seat pacing rules.
  • The reservation location’s business schedule (operating hours).
  • Existing reservations at the reservation location.

With the Time Slots API, you can:

  • Get time slots for a reservation location.

A time slot can have the following statuses:

  • AVAILABLE - The restaurant is open and available to seat a party of the given size at the given date and time.
  • UNAVAILABLE - The restaurant is open but unable to seat a party of the given size at the given date and time.
  • NON_WORKING_HOURS - The restaurant is not open at this time.

timeSlot objects also indicate whether manual approval is required to make a reservation at the given reservation location.

Before you begin

It’s important to note the following points before starting to code:

  • Wix users must install the Wix Table Reservations app.
  • Wix users must have at least 1 location configured in their Dashboard under Business Info.

Use Cases

Reservation app for restaurants on a Wix site

Terminology

For a comprehensive glossary of Reservations terms, see Terminology.

Did this help?

Time Slot Object


Time Slots Submodule Docs

Properties
startDatestringformat date-time

Start date and time of this time slot.


durationinteger

Duration in minutes of this time slot.


statusstring

Availability status of this time slot.


manualApprovalboolean

Whether manual approval is required to make a reservation in this time slot.

TimeSlot
JSON
{ "timeSlot": { "startDate": "2023-06-08T13:00:00Z", "duration": 90, "status": "AVAILABLE", "tableCombinations": [], "manualApproval": true } }
Did this help?

POST

Get Time Slots


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Returns a list of time slots at a specified reservation location on a specified date, and their availability for a specified partySize.

Without passing optional parameters, the list will contain a single time slot at the specified date. Use slotsBefore and slotsAfter to get additional time slots before and after the specified date.

If you do not provide a duration, the duration will be calculated automatically based on the reservation location's configuration. The reservation location's settings used to determine the duration are its defaultTurnoverTime and turnoverTimeRules. These specify how much time should be allotted for a reservation of a party of a specified size.

The interval between startDates of time slots in the response is determined by the reservation location's timeSlotInterval. This interval is not affected by the duration provided.

Permissions
Manage Reservations (Basic)
Manage Reservations (Full)
Manage Reservations (Medium)
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/table-reservations/reservations/v1/time-slots

Body Params
reservationLocationIdstringRequiredformat GUID

ID of the reservation location for which to retrieve time slots.


datestringRequiredformat date-time

Date and time for which to retrieve a time slot in ISO 8601 format.


durationintegerminimum 5maximum 1000format int32

Duration in minutes of the time slot.

Min: 5


partySizeintegerRequiredminimum 1maximum 10000format int32

Size of the party that needs to be seated during this time slot.

Min: 1


slotsBeforeintegerminimum 0maximum 50format int32

The number of time slots to retrieve before the specified date.


slotsAfterintegerminimum 0maximum 50format int32

The number of time slots to retrieve after the specified date.

Response Object
timeSlotsArray <TimeSlot>

A list of time slots and their availability according to the specified party size.

Get time slots
Request
cURL
curl -X POST 'https://www.wixapis.com/table-reservations/reservations/v1/time-slots' \ -H 'Authorization: <AUTH>' --data-binary '{"slotsBefore":7,"slotsAfter":7,"date":"2023-06-08T11:30:00.000Z","partySize":2,"reservationLocationId":"b3d165aa-52bb-49bb-a3e4-a673d9a1cb9d"}'
Response
JSON
{ "timeSlots": [ { "startDate": "2023-06-08T09:45:00Z", "duration": 90, "status": "NON_WORKING_HOURS", "tableCombinations": [] }, { "startDate": "2023-06-08T10:00:00Z", "duration": 90, "status": "NON_WORKING_HOURS", "tableCombinations": [] }, { "startDate": "2023-06-08T10:15:00Z", "duration": 90, "status": "NON_WORKING_HOURS", "tableCombinations": [] }, { "startDate": "2023-06-08T10:30:00Z", "duration": 90, "status": "NON_WORKING_HOURS", "tableCombinations": [] }, { "startDate": "2023-06-08T10:45:00Z", "duration": 90, "status": "NON_WORKING_HOURS", "tableCombinations": [] }, { "startDate": "2023-06-08T11:00:00Z", "duration": 90, "status": "NON_WORKING_HOURS", "tableCombinations": [] }, { "startDate": "2023-06-08T11:15:00Z", "duration": 90, "status": "NON_WORKING_HOURS", "tableCombinations": [] }, { "startDate": "2023-06-08T11:30:00Z", "duration": 90, "status": "AVAILABLE", "tableCombinations": [], "manualApproval": true }, { "startDate": "2023-06-08T11:45:00Z", "duration": 90, "status": "AVAILABLE", "tableCombinations": [], "manualApproval": true }, { "startDate": "2023-06-08T12:00:00Z", "duration": 90, "status": "AVAILABLE", "tableCombinations": [], "manualApproval": true }, { "startDate": "2023-06-08T12:15:00Z", "duration": 90, "status": "AVAILABLE", "tableCombinations": [], "manualApproval": true }, { "startDate": "2023-06-08T12:30:00Z", "duration": 90, "status": "AVAILABLE", "tableCombinations": [], "manualApproval": true }, { "startDate": "2023-06-08T12:45:00Z", "duration": 90, "status": "AVAILABLE", "tableCombinations": [], "manualApproval": true }, { "startDate": "2023-06-08T13:00:00Z", "duration": 90, "status": "AVAILABLE", "tableCombinations": [], "manualApproval": true }, { "startDate": "2023-06-08T13:15:00Z", "duration": 90, "status": "AVAILABLE", "tableCombinations": [], "manualApproval": true } ] }
Did this help?

POST

Check Time Slot


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Checks a restaurant's availability to accommodate a reservation for a specified party size in a specified time slot.

This endpoint returns availability information for the restaurant's table combinations, and flags any party pacing or seat pacing conflicts that the proposed reservation would cause.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Reservations (Full)
Manage Reservations (Medium)
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/table-reservations/reservations/v1/check-time-slot

Body Params
reservationLocationIdstringRequiredformat GUID

ID of the reservation location for which to check the time slot.


datestringRequiredformat date-time

Date and time of the time slot to check.


durationintegerRequiredminimum 5maximum 1000format int32

Duration of the time slot in minutes .

Min: 5


partySizeintegerRequiredminimum 1maximum 10000format int32

Party size to check the restaurant's availability for.


excludeReservationIdstringformat GUID

ID of a reservation to ignore during the check.

Use this when rescheduling a reservation to exclude it in its current state from the availability calculations.

Response Object
tableCombinationAvailabilitiesArray <TableCombinationAvailability>

Table combinations and their availability information.


reservationLocationConflictsArray <string>

Reservation location conflicts that would occur by making a reservation for the specified party size in the specified time slot.

Did this help?