Introduction
The Reservations API allows you to create and manage reservations at restaurants.
This API provides all the necessary functionality to move a reservation through the phases of its lifecycle, such as from the reservation request until completion.
The Reservations API works together with the Reservation Locations API, which provides information about the physical location of a restaurant, as well as that restaurant’s availability and reservation conditions.
The Reservations API also works together with the Time Slots API, which allows you to retrieve availability information about time slots at a restaurant on a specific date and for a specific party size.
With the Reservations API, you can:
- Create and manage reservations at a restaurant.
- Get information about existing reservations at a restaurant.
Before you begin
It’s important to note the following points before starting to code:
- The site or project owner must install the Wix Table Reservations app.
- The site or project owner must have at least 1 location configured in their Dashboard under Business Info.
Permissions information
The following functions may require additional permissions to run depending on which fields are included, or the value of certain fields.
createReservation()
Calling createReservation()
with the following fields requires additional permissions:
status
source
reservation.details.tableIds
reservation.details.endDate
ignoreReservationLocationConflicts
ignoreTableCombinationConflicts
Permission requirements are as follows:
- In an app, providing these fields requires the
MANAGE RESERVATIONS (FULL)
permission scope. - On a headless site, providing these fields requires API key authorization with appropriate permissions.
If the user does not provide a source
, the value assigned to it will depend on the user's permissions:
- In an app, if the user calls
createReservation()
with theMANAGE RESERVATIONS (FULL)
permission scope,source
is set toUNDEFINED
. Otherwise,source
is set toONLINE
. - On a headless site with Visitor or Member authorization,
source
is set toONLINE
.
getReservation()
Calling getReservation()
with fieldsets
set to FULL
requires additional permissions:
- In an app, the
FULL
fieldset requires either theMANAGE RESERVATIONS (MEDIUM)
orMANAGE RESERVATIONS (FULL)
permission scope. - On a headless site, retrieving the
FULL
fieldset requires API key authorization with appropriate permissions.
Terminology
For a comprehensive glossary of Table Reservations terms, see Terminology.