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 } ] }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?