listReservationLocations( )


Developer Preview

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

Retrieves a list of up to 100 reservation locations.

The FULL fieldset can only be retrieved by users with the READ RESERVATION LOCATIONS (FULL) or MANAGE RESERVATION LOCATIONS permission scopes.

Permissions
Read Reservation Locations (Basic)
Read Reservation Locations (Full)
Manage Reservation Locations
Learn more about app permissions.
Method Declaration
Copy
function listReservationLocations(
  options: ListReservationLocationsOptions,
): Promise<ListReservationLocationsResponse>;
Method Parameters
optionsListReservationLocationsOptions

An object representing the available options for listing reservation locations.

Returns
Return Type:Promise<ListReservationLocationsResponse>
JavaScript
import { reservationLocations } from "wix-table-reservations-v2"; reservationLocations .listReservationLocations() .then((retrievedReservationLocations) => { const isDefault = retrievedReservationLocations.reservationLocations[0].default; const minNotice = retrievedReservationLocations.reservationLocations[0].configuration .onlineReservations.minimumReservationNotice; console.log( "Success! Retrieved reservation location list:", retrievedReservationLocations, ); return retrievedReservationLocations; }) .catch((error) => { console.error(error); // Handle the error }); /* Promise resolves to: * { * "reservationLocations": [ * { * "location": { * "name": "Yunitsman Street", * "fax": "", * "timeZone": "Europe/Dublin", * "email": "", * "phone": "", * "address": { * "formatted": "Yunitsman Street 5, Tel Aviv-Yafo, Israel", * "location": { * "latitude": 32.141816, * "longitude": 34.7987383 * }, * "streetAddress": { * "name": "Yunitsman Street", * "number": "5", * "apt": "" * }, * "city": "Tel Aviv-Yafo", * "subdivision": "", * "country": "IL", * "postalCode": "" * }, * "businessSchedule": { * "periods": [ * { * "openDay": "SUNDAY", * "openTime": "08:00", * "closeDay": "MONDAY", * "closeTime": "20:00" * }, * { * "openDay": "THURSDAY", * "openTime": "08:00", * "closeDay": "SUNDAY", * "closeTime": "01:00" * } * ], * "specialHourPeriod": [] * }, * "_id": "9bd42376-12c2-483e-86c3-8ee685e718e1" * }, * "configuration": { * "onlineReservations": { * "partiesSize": { * "min": 1, * "max": 6 * }, * "minimumReservationNotice": { * "number": 30, * "unit": "MINUTES" * }, * "turnoverTimeRules": [], * "turnoverRules": [], * "onlineReservationsEnabled": true * }, * "myReservationsFields": [] * }, * "default": false, * "archived": false, * "_id": "800c581a-1942-4079-8198-2eee44463eb7" * }, * { * "location": { * "name": "Nemal Tel Aviv Street", * "fax": "", * "timeZone": "Europe/Dublin", * "email": "", * "phone": "", * "address": { * "formatted": "Tel Aviv Port, Nemal Tel Aviv Street, Tel Aviv, Israel", * "location": { * "latitude": 32.0972612, * "longitude": 34.77376549999999 * }, * "streetAddress": { * "name": "Nemal Tel Aviv Street", * "number": "", * "apt": "" * }, * "city": "Tel Aviv-Yafo", * "country": "IL" * }, * "businessSchedule": { * "periods": [ * { * "openDay": "SUNDAY", * "openTime": "00:00", * "closeDay": "MONDAY", * "closeTime": "00:00" * }, * { * "openDay": "THURSDAY", * "openTime": "00:00", * "closeDay": "SUNDAY", * "closeTime": "00:00" * } * ], * "specialHourPeriod": [] * }, * "_id": "f1f59093-6842-45a4-b9d1-106429ec8313" * }, * "configuration": { * "onlineReservations": { * "partiesSize": { * "min": 1, * "max": 6 * }, * "minimumReservationNotice": { * "number": 30, * "unit": "MINUTES" * }, * "turnoverTimeRules": [], * "turnoverRules": [], * "businessSchedule": { * "periods": [ * { * "openDay": "SUNDAY", * "openTime": "00:00", * "closeDay": "TUESDAY", * "closeTime": "00:00" * }, * { * "openDay": "WEDNESDAY", * "openTime": "00:00", * "closeDay": "THURSDAY", * "closeTime": "00:00" * }, * { * "openDay": "FRIDAY", * "openTime": "00:00", * "closeDay": "SUNDAY", * "closeTime": "00:00" * } * ], * "specialHourPeriod": [] * }, * "onlineReservationsEnabled": true * }, * "reservationForm": { * "customFieldDefinitions": [ * { * "name": "Allergies", * "required": false, * "_id": "f4283b2d-6340-4cf9-bae7-8769e6b62127" * } * ] * }, * "myReservationsFields": [] * }, * "default": true, * "archived": false, * "_id": "fab8cc1f-31cf-462f-b5bb-392594624bf2" * } * ], * "pagingMetadata": { * "count": 2, * "cursors": {}, * "hasNext": false * } * } */
Errors

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

Did this help?