> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # QueryReservationLocations # Package: reservations # Namespace: ReservationLocationsService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/reservations/reservation-locations/query-reservation-locations.md ## Permission Scopes: Read Reservation Locations (Basic): SCOPE.DC-RESERVATIONS.READ-LOCATIONS-BASIC Read Reservation Locations (Full): SCOPE.DC-RESERVATIONS.READ-LOCATIONS-FULL ## Introduction Retrieves a list of reservation locations given the provided paging, filtering, and sorting. Up to 100 reservation locations can be returned per request. For a detailed list of supported operations, see the Supported Filters and Sorting article. To learn how to query reservation locations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). --- ## REST API ### Schema ``` Method: queryReservationLocations Description: Retrieves a list of reservation locations given the provided paging, filtering, and sorting. Up to 100 reservation locations can be returned per request. For a detailed list of supported operations, see the Supported Filters and Sorting article. To learn how to query reservation locations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). URL: https://www.wixapis.com/v1/reservation-locations/query Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: query Method parameters: param name: query | type: QueryV2 | required: true - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. - name: limit | type: integer | description: Number of items to load. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-and-filtering.md) article. To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). - name: sort | type: array | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` - name: fieldName | type: string | description: Name of the field to sort by. - name: order | type: SortOrder | description: Sort order. Defaults to `ASC`. - enum: - ASC: Soer by ascending order. - DESC: Sort by descending order. Return type: QueryReservationLocationsResponse - name: reservationLocations | type: array | description: List of reservation locations. - name: id | type: string | description: Reservation location GUID. - name: revision | type: string | description: Represents the current state of a reservation location. Each time the reservation location is modified, its `revision` changes. For an update operation to succeed, you must specify the latest revision. - name: createdDate | type: string | description: The date and time this reservation location was created. - name: updatedDate | type: string | description: The date and time this reservation location was last updated. - name: location | type: Location | description: Physical location details. Locations can be created and configured using the Locations API. or on the [Business Info](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fsettings/business-info) page in the Dashboard. - name: id | type: string | description: Location GUID. - name: configuration | type: Configuration | description: Reservation location configuration. - name: onlineReservations | type: OnlineReservations | description: Settings for this location that are used to determine restaurant availability for reservations made online. - name: approval | type: Approval | description: Approval settings. - ONE-OF: - name: manualForLargePartiesOptions | type: ManualForLargePartiesOptions | description: Manual approval for large parties options. - name: partySizeThreshold | type: integer | description: The minimum party size that requires manual approval. - name: considerTablesForManualApproval | type: boolean | description: Use tables for manual approval part. - name: mode | type: Mode | description: Approval mode. - enum: AUTOMATIC, MANUAL, MANUAL_FOR_LARGE_PARTIES - name: seatPacing | type: SeatPacing | description: Seat pacing settings. The maximum number of seats that can be filled by new reservations within a 15-minute period. For example, setting a seat pacing of 15 would mean that between `10:00.000`-`10:14.999` there will be no more than 15 new seats available for reservation. - name: number | type: integer | description: Maximum number of seats allowed per `timeSlotInterval`. - name: enabled | type: boolean | description: Whether this option is enabled. - name: partyPacing | type: PartyPacing | description: Party pacing settings. The maximum number of party reservations that can start within a `timeSlotInterval` period. For example, if `timeSlotInterval` is 15 minutes, then a party pacing of 5 would mean that no more than 5 parties could make a reservation for the period between `10:00.000`-`10:14.999`. - name: number | type: integer | description: Maximum number of new party reservations allowed per `timeSlotInterval`. - name: enabled | type: boolean | description: Whether this option is enabled. - name: partySize | type: PartySize | description: Party size limits for a reservation. - name: min | type: integer | description: Minimum number of seats a party can reserve. - name: max | type: integer | description: Maximum number of seats a party can reserve. - name: minimumReservationNotice | type: NoticePeriod | description: Minimum reservation notice. The minimum amount of time that must be allowed between making a reservation and that reservation's start time. - name: number | type: integer | description: The quantity of the chosen time unit. - name: unit | type: Unit | description: Time unit. - enum: UNKNOWN, MINUTES, HOURS, DAYS - name: maximumReservationNotice | type: NoticePeriod | description: Maximum reservation notice. The maximum amount of time that can be allowed between making a reservation and that reservation's start time. - name: defaultTurnoverTime | type: integer | description: Default turnover time in minutes. Turnover time is how much time a party is allotted for their entire reservation - from being seated to leaving the restaurant. - name: turnoverTimeRules | type: array | description: Custom turnover time rules. This allows you to set different turnover times for different party sizes. - name: seatsMin | type: integer | description: Minimum number of seats to qualify for this rule. - name: seatsMax | type: integer | description: Maximum number of seats to qualify for this rule. - name: minutes | type: integer | description: Turnover time in minutes for qualifying parties. - name: businessSchedule | type: BusinessSchedule | description: The location's business schedule. Limited to 100 time periods. - name: periods | type: array | description: - name: openDay | type: DayOfWeek | description: Day of the week this period starts on. - enum: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY - name: openTime | type: string | description: Time this period starts in 24hr [ISO 8601](http://www.w3.org/TR/NOTE-datetime) extended format (hh:mm). Valid values are `00:00-24:00`, where `24:00` represents midnight at the end of the specified day field. - name: closeDay | type: DayOfWeek | description: Day of the week this period ends on. - name: closeTime | type: string | description: Time this period ends in 24hr [ISO 8601](http://www.w3.org/TR/NOTE-datetime) extended format (hh:mm). Valid values are `00:00-24:00`, where `24:00` represents midnight at the end of the specified day field. This is the last time a reservation can be made at the restaurant, not the time the restaurant closes its doors. - name: specialHourPeriod | type: array | description: Time periods during which this location is open. Each period represents a range of hours during the week during which the location is open. Max: 100 time periods - name: startDate | type: string | description: Start date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format. - name: endDate | type: string | description: End date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format. - name: isClosed | type: boolean | description: Whether or not the location is closed during this period. - name: comment | type: string | description: Additional details about the period. - name: showPhoneNumber | type: boolean | description: Whether a phone number is shown. - name: onlineReservationsEnabled | type: boolean | description: Whether online reservations are enabled. - name: pauseSettings | type: PauseSettings | description: Pause settings for reservations. - name: standardReservations | type: StandardReservations | description: Pause settings for standard reservations. - name: pauseFrom | type: string | description: Timestamp from which online reservations are paused. Read-only, set automatically when pause is configured. - name: pauseUntil | type: string | description: Timestamp until which online reservations are paused. When set and the current time is before this timestamp, online reservations are blocked. When the current time passes this timestamp, reservations automatically resume. - name: timeSlotInterval | type: integer | description: Interval between a reservation location's time slots in minutes. This controls the interval between time slots on a Wix site's Reservations page, and the interval between time slots returned by the Time Slots API's Get Time Slots method. Default: `15` - name: reservationForm | type: ReservationForm | description: Reservation form settings. - name: submitMessage | type: string | description: A message shown to the customer in the registration form. - name: policiesEnabled | type: boolean | description: Whether to show policies (the terms and conditions, and the privacy policy) to the customer. - name: termsAndConditions | type: TermsAndConditions | description: Settings for displaying the terms and conditions. - ONE-OF: - name: url | type: PageUrlV2 | description: Terms and conditions URL. - name: relativePath | type: string | description: The relative path for the page within the site. - name: url | type: string | description: The page's full URL. - name: text | type: string | description: Terms and conditions text. - name: enabled | type: boolean | description: Whether the terms and conditions are shown to the customer. Default: `false` - name: privacyPolicy | type: PrivacyPolicy | description: Settings for displaying the privacy policy. - ONE-OF: - name: url | type: PageUrlV2 | description: Privacy policy URL. - name: text | type: string | description: Privacy policy text. - name: enabled | type: boolean | description: Whether the privacy policy is shown to the customer. Default: `false` - name: customFieldDefinitions | type: array | description: Custom fields you wish to add to the registration form for the customer to fill in. - name: id | type: string | description: Custom field GUID. - name: name | type: string | description: Custom field name. - name: required | type: boolean | description: Whether the custom field is required. Default: `false` - name: lastNameRequired | type: boolean | description: Whether a last_name is required in the reservation form. Default: `false` - name: emailRequired | type: boolean | description: Whether an email is required in the reservation form. Default: `false` - name: emailMarketingCheckbox | type: EmailMarketingCheckbox | description: Email marketing checkbox settings. - name: enabled | type: boolean | description: Whether the checkbox is shown to the customer. Default: `false` - name: checkedByDefault | type: boolean | description: Whether the checkbox is checked by default. Default: `false` - name: tableManagement | type: TableManagement | description: Table management settings. - name: mode | type: TableManagementMode | description: Table management mode. The mode determines how tables are assigned for reservations at this location. - enum: - ON: Tables can be assigned manually for reservations at this location. When tables aren't manually assigned, Wix assigns them automatically. - IN_HOUSE_ONLY: Tables can be assigned manually for reservations at this location. Wix doesn't assign tables automatically. - OFF: Tables can't be assigned manually for reservations at this location. Wix doesn't assign tables automatically. If you try to assign a table manually, the request will fail. - name: tableDefinitions | type: array | description: Table definitions. - name: id | type: string | description: Table GUID. - name: name | type: string | description: Table name. - name: seatsMin | type: integer | description: Minimum number of seats. - name: seatsMax | type: integer | description: Maximum number of seats. - name: isActive | type: boolean | description: Whether the table is active (available to be reserved). - name: deletedTableDefinitions | type: array | description: Deleted table definitions. - name: tableCombinations | type: array | description: Table combinations. - name: id | type: string | description: Table combination GUID. - name: tableIds | type: array | description: IDs of tables in the combination. - name: seatsMin | type: integer | description: Minimum number of seats that can be reserved in this table combination. - name: seatsMax | type: integer | description: Maximum number of seats that can be reserved in this table combination. - name: isActive | type: boolean | description: Whether the table combination is active (available to be reserved). - name: paymentPolicy | type: PaymentPolicy | description: Reservation payment policy. This policy determines how the restaurant charges for reservations. - ONE-OF: - name: perGuestOptions | type: PerGuestOptions | description: Settings for charging per guest. - name: price | type: string | description: Monetary amount to charge. Must be a decimal string with a period as a decimal separator. For example, `"3.99"`. - name: minPartySize | type: integer | description: Minimum party size required to apply the payment policy. - name: perReservationOptions | type: PerReservationOptions | description: Settings for charging per reservation. - name: price | type: string | description: Monetary amount to charge. Must be a decimal string with a period as a decimal separator. For example, `"3.99"`. - name: minPartySize | type: integer | description: Minimum party size required to apply the payment policy. - name: paymentPolicyType | type: PaymentPolicyType | description: Type of payment policy. - enum: - UNKNOWN_PAYMENT_POLICY: Undefined table management mode. - PER_GUEST: A fee is charged for each guest in the reservation. - PER_RESERVATION: A fee is charged for the entire reservation. - name: default | type: boolean | description: Whether this reservation location's `location` is the default location of the business. - name: archived | type: boolean | description: Whether this reservation location's `location` is archived. - name: extendedFields | type: ExtendedFields | description: Custom field data for the reservation location object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the app dashboard before they can be accessed with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: pagingMetadata | type: PagingMetadataV2 | description: Metadata for the paginated results. - name: offset | type: integer | description: Offset that was requested. - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. - name: next | type: string | description: Cursor pointing to next page in the list of results. - name: prev | type: string | description: Cursor pointing to previous page in the list of results. ``` ### Examples ### Query reservation locations ```curl curl -X POST 'https://www.wixapis.com/table-reservations/reservation-locations/v1/reservation-locations/query' \ -H 'Authorization: ' --data-binary '{ "query": { "sort": [ { "fieldName": "id", "order": "ASC" } ], "cursorPaging" : { "limit" : 2 } } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.reservations.ReservationLocationsService.queryReservationLocations(query) Description: Retrieves a list of reservation locations given the provided paging, filtering, and sorting. Up to 100 reservation locations can be returned per request. For a detailed list of supported operations, see the Supported Filters and Sorting article. To learn how to query reservation locations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: query Method parameters: param name: query | type: ReservationLocationQuery | required: true - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. - name: limit | type: integer | description: Number of items to load. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-and-filtering.md) article. To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). - name: sort | type: array | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` - name: fieldName | type: string | description: Name of the field to sort by. - name: order | type: SortOrder | description: Sort order. Defaults to `ASC`. - enum: - ASC: Soer by ascending order. - DESC: Sort by descending order. Return type: PROMISE - name: reservationLocations | type: array | description: List of reservation locations. - name: _id | type: string | description: Reservation location GUID. - name: revision | type: string | description: Represents the current state of a reservation location. Each time the reservation location is modified, its `revision` changes. For an update operation to succeed, you must specify the latest revision. - name: _createdDate | type: Date | description: The date and time this reservation location was created. - name: _updatedDate | type: Date | description: The date and time this reservation location was last updated. - name: location | type: Location | description: Physical location details. Locations can be created and configured using the Locations API. or on the [Business Info](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fsettings/business-info) page in the Dashboard. - name: _id | type: string | description: Location GUID. - name: configuration | type: Configuration | description: Reservation location configuration. - name: onlineReservations | type: OnlineReservations | description: Settings for this location that are used to determine restaurant availability for reservations made online. - name: approval | type: Approval | description: Approval settings. - ONE-OF: - name: manualForLargePartiesOptions | type: ManualForLargePartiesOptions | description: Manual approval for large parties options. - name: partySizeThreshold | type: integer | description: The minimum party size that requires manual approval. - name: considerTablesForManualApproval | type: boolean | description: Use tables for manual approval part. - name: mode | type: Mode | description: Approval mode. - enum: AUTOMATIC, MANUAL, MANUAL_FOR_LARGE_PARTIES - name: seatPacing | type: SeatPacing | description: Seat pacing settings. The maximum number of seats that can be filled by new reservations within a 15-minute period. For example, setting a seat pacing of 15 would mean that between `10:00.000`-`10:14.999` there will be no more than 15 new seats available for reservation. - name: number | type: integer | description: Maximum number of seats allowed per `timeSlotInterval`. - name: enabled | type: boolean | description: Whether this option is enabled. - name: partyPacing | type: PartyPacing | description: Party pacing settings. The maximum number of party reservations that can start within a `timeSlotInterval` period. For example, if `timeSlotInterval` is 15 minutes, then a party pacing of 5 would mean that no more than 5 parties could make a reservation for the period between `10:00.000`-`10:14.999`. - name: number | type: integer | description: Maximum number of new party reservations allowed per `timeSlotInterval`. - name: enabled | type: boolean | description: Whether this option is enabled. - name: partySize | type: PartySize | description: Party size limits for a reservation. - name: min | type: integer | description: Minimum number of seats a party can reserve. - name: max | type: integer | description: Maximum number of seats a party can reserve. - name: minimumReservationNotice | type: NoticePeriod | description: Minimum reservation notice. The minimum amount of time that must be allowed between making a reservation and that reservation's start time. - name: number | type: integer | description: The quantity of the chosen time unit. - name: unit | type: Unit | description: Time unit. - enum: UNKNOWN, MINUTES, HOURS, DAYS - name: maximumReservationNotice | type: NoticePeriod | description: Maximum reservation notice. The maximum amount of time that can be allowed between making a reservation and that reservation's start time. - name: defaultTurnoverTime | type: integer | description: Default turnover time in minutes. Turnover time is how much time a party is allotted for their entire reservation - from being seated to leaving the restaurant. - name: turnoverTimeRules | type: array | description: Custom turnover time rules. This allows you to set different turnover times for different party sizes. - name: seatsMin | type: integer | description: Minimum number of seats to qualify for this rule. - name: seatsMax | type: integer | description: Maximum number of seats to qualify for this rule. - name: minutes | type: integer | description: Turnover time in minutes for qualifying parties. - name: businessSchedule | type: BusinessSchedule | description: The location's business schedule. Limited to 100 time periods. - name: periods | type: array | description: - name: openDay | type: DayOfWeek | description: Day of the week this period starts on. - enum: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY - name: openTime | type: string | description: Time this period starts in 24hr [ISO 8601](http://www.w3.org/TR/NOTE-datetime) extended format (hh:mm). Valid values are `00:00-24:00`, where `24:00` represents midnight at the end of the specified day field. - name: closeDay | type: DayOfWeek | description: Day of the week this period ends on. - name: closeTime | type: string | description: Time this period ends in 24hr [ISO 8601](http://www.w3.org/TR/NOTE-datetime) extended format (hh:mm). Valid values are `00:00-24:00`, where `24:00` represents midnight at the end of the specified day field. This is the last time a reservation can be made at the restaurant, not the time the restaurant closes its doors. - name: specialHourPeriod | type: array | description: Time periods during which this location is open. Each period represents a range of hours during the week during which the location is open. Max: 100 time periods - name: startDate | type: string | description: Start date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format. - name: endDate | type: string | description: End date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format. - name: isClosed | type: boolean | description: Whether or not the location is closed during this period. - name: comment | type: string | description: Additional details about the period. - name: showPhoneNumber | type: boolean | description: Whether a phone number is shown. - name: onlineReservationsEnabled | type: boolean | description: Whether online reservations are enabled. - name: pauseSettings | type: PauseSettings | description: Pause settings for reservations. - name: standardReservations | type: StandardReservations | description: Pause settings for standard reservations. - name: pauseFrom | type: Date | description: Timestamp from which online reservations are paused. Read-only, set automatically when pause is configured. - name: pauseUntil | type: Date | description: Timestamp until which online reservations are paused. When set and the current time is before this timestamp, online reservations are blocked. When the current time passes this timestamp, reservations automatically resume. - name: timeSlotInterval | type: integer | description: Interval between a reservation location's time slots in minutes. This controls the interval between time slots on a Wix site's Reservations page, and the interval between time slots returned by the Time Slots API's Get Time Slots method. Default: `15` - name: reservationForm | type: ReservationForm | description: Reservation form settings. - name: submitMessage | type: string | description: A message shown to the customer in the registration form. - name: policiesEnabled | type: boolean | description: Whether to show policies (the terms and conditions, and the privacy policy) to the customer. - name: termsAndConditions | type: TermsAndConditions | description: Settings for displaying the terms and conditions. - ONE-OF: - name: url | type: string | description: Terms and conditions URL. - name: text | type: string | description: Terms and conditions text. - name: enabled | type: boolean | description: Whether the terms and conditions are shown to the customer. Default: `false` - name: privacyPolicy | type: PrivacyPolicy | description: Settings for displaying the privacy policy. - ONE-OF: - name: url | type: string | description: Privacy policy URL. - name: text | type: string | description: Privacy policy text. - name: enabled | type: boolean | description: Whether the privacy policy is shown to the customer. Default: `false` - name: customFieldDefinitions | type: array | description: Custom fields you wish to add to the registration form for the customer to fill in. - name: _id | type: string | description: Custom field GUID. - name: name | type: string | description: Custom field name. - name: required | type: boolean | description: Whether the custom field is required. Default: `false` - name: lastNameRequired | type: boolean | description: Whether a last_name is required in the reservation form. Default: `false` - name: emailRequired | type: boolean | description: Whether an email is required in the reservation form. Default: `false` - name: emailMarketingCheckbox | type: EmailMarketingCheckbox | description: Email marketing checkbox settings. - name: enabled | type: boolean | description: Whether the checkbox is shown to the customer. Default: `false` - name: checkedByDefault | type: boolean | description: Whether the checkbox is checked by default. Default: `false` - name: tableManagement | type: TableManagement | description: Table management settings. - name: mode | type: TableManagementMode | description: Table management mode. The mode determines how tables are assigned for reservations at this location. - enum: - ON: Tables can be assigned manually for reservations at this location. When tables aren't manually assigned, Wix assigns them automatically. - IN_HOUSE_ONLY: Tables can be assigned manually for reservations at this location. Wix doesn't assign tables automatically. - OFF: Tables can't be assigned manually for reservations at this location. Wix doesn't assign tables automatically. If you try to assign a table manually, the request will fail. - name: tableDefinitions | type: array | description: Table definitions. - name: _id | type: string | description: Table GUID. - name: name | type: string | description: Table name. - name: seatsMin | type: integer | description: Minimum number of seats. - name: seatsMax | type: integer | description: Maximum number of seats. - name: isActive | type: boolean | description: Whether the table is active (available to be reserved). - name: deletedTableDefinitions | type: array | description: Deleted table definitions. - name: tableCombinations | type: array | description: Table combinations. - name: _id | type: string | description: Table combination GUID. - name: tableIds | type: array | description: IDs of tables in the combination. - name: seatsMin | type: integer | description: Minimum number of seats that can be reserved in this table combination. - name: seatsMax | type: integer | description: Maximum number of seats that can be reserved in this table combination. - name: isActive | type: boolean | description: Whether the table combination is active (available to be reserved). - name: paymentPolicy | type: PaymentPolicy | description: Reservation payment policy. This policy determines how the restaurant charges for reservations. - ONE-OF: - name: perGuestOptions | type: PerGuestOptions | description: Settings for charging per guest. - name: price | type: string | description: Monetary amount to charge. Must be a decimal string with a period as a decimal separator. For example, `"3.99"`. - name: minPartySize | type: integer | description: Minimum party size required to apply the payment policy. - name: perReservationOptions | type: PerReservationOptions | description: Settings for charging per reservation. - name: price | type: string | description: Monetary amount to charge. Must be a decimal string with a period as a decimal separator. For example, `"3.99"`. - name: minPartySize | type: integer | description: Minimum party size required to apply the payment policy. - name: paymentPolicyType | type: PaymentPolicyType | description: Type of payment policy. - enum: - UNKNOWN_PAYMENT_POLICY: Undefined table management mode. - PER_GUEST: A fee is charged for each guest in the reservation. - PER_RESERVATION: A fee is charged for the entire reservation. - name: default | type: boolean | description: Whether this reservation location's `location` is the default location of the business. - name: archived | type: boolean | description: Whether this reservation location's `location` is archived. - name: extendedFields | type: ExtendedFields | description: Custom field data for the reservation location object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the app dashboard before they can be accessed with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: pagingMetadata | type: PagingMetadataV2 | description: Metadata for the paginated results. - name: offset | type: integer | description: Offset that was requested. - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. - name: next | type: string | description: Cursor pointing to next page in the list of results. - name: prev | type: string | description: Cursor pointing to previous page in the list of results. ``` ### Examples ### Query all reservation locations with options This example demonstrates how to request the `FULL` fieldset in `options` using elevation to get the necessary permissions. ```javascript import { reservationLocations } from '@wix/table-reservations'; /* Sample options value: * { * "fieldsets": ["FULL"] * } */ export async function myQueryReservationLocationsFunction(options) { try { const retrievedReservationLocations = await reservationLocations.queryReservationLocations(options).find(); const nextCursor = retrievedReservationLocations.next(); const minNotice = retrievedReservationLocations.items[0].configuration.onlineReservations.minimumReservationNotice; return retrievedReservationLocations; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * { * "_items": [ * { * "revision": "30", * "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": "00:00", * "closeDay": "MONDAY", * "closeTime": "00:00" * }, * { * "openDay": "THURSDAY", * "openTime": "00:00", * "closeDay": "SUNDAY", * "closeTime": "00:00" * } * ], * "specialHourPeriod": [] * }, * "_id": "9bd42376-12c2-483e-86c3-8ee685e718e1" * }, * "configuration": { * "onlineReservations": { * "partiesSize": { * "min": 1, * "max": 6 * }, * "partySize": { * "min": 1, * "max": 6 * }, * "minimumReservationNotice": { * "number": 20, * "unit": "MINUTES" * }, * "defaultTurnoverTime": 90, * "turnoverTimeRules": [], * "turnoverRules": [], * "onlineReservationsEnabled": true * }, * "reservationForm": { * "customFieldDefinitions": [] * }, * "myReservationsFields": [ * { * "fieldType": "TABLE", * "shown": true * }, * { * "fieldType": "START_DATE", * "shown": true * }, * { * "fieldType": "END_DATE", * "shown": true * }, * { * "fieldType": "CREATED_DATE", * "shown": true * }, * { * "fieldType": "UPDATED_DATE", * "shown": true * }, * { * "fieldType": "PARTY_SIZE", * "shown": true * }, * { * "fieldType": "FIRST_NAME", * "shown": true * }, * { * "fieldType": "LAST_NAME", * "shown": true * }, * { * "fieldType": "EMAIL", * "shown": true * }, * { * "fieldType": "PHONE", * "shown": true * }, * { * "fieldType": "ADDITIONAL_INFO", * "shown": true * }, * { * "fieldType": "TEAM_MESSAGE", * "shown": true * }, * { * "fieldType": "STATUS", * "shown": true * } * ], * "tableManagement": { * "tableDefinitions": [ * { * "name": "Small table", * "seatsMin": 1, * "seatsMax": 4, * "isActive": true, * "_id": "ec4adfb0-568f-4846-8f92-86059ef94ec8" * }, * { * "name": "Big table", * "seatsMin": 3, * "seatsMax": 6, * "isActive": true, * "_id": "63b73378-5e79-401c-9a69-3e4da76558d3" * } * ], * "deletedTableDefinitions": [], * "tableCombinations": [] * } * }, * "default": false, * "archived": false, * "_id": "800c581a-1942-4079-8198-2eee44463eb7", * "_createdDate": "2023-10-08T07:07:39.123Z", * "_updatedDate": "2024-01-17T12:56:25.112Z" * }, * { * "revision": "39", * "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": { * "seatPacing": { * "number": 11, * "enabled": false * }, * "partyPacing": { * "number": 6, * "enabled": true * }, * "partiesSize": { * "min": 1, * "max": 6 * }, * "partySize": { * "min": 1, * "max": 6 * }, * "minimumReservationNotice": { * "number": 20, * "unit": "MINUTES" * }, * "defaultTurnoverTime": 90, * "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": [ * { * "fieldType": "TABLE", * "shown": true * }, * { * "fieldType": "START_DATE", * "shown": true * }, * { * "fieldType": "END_DATE", * "shown": true * }, * { * "fieldType": "CREATED_DATE", * "shown": true * }, * { * "fieldType": "UPDATED_DATE", * "shown": true * }, * { * "fieldType": "PARTY_SIZE", * "shown": true * }, * { * "fieldType": "FIRST_NAME", * "shown": true * }, * { * "fieldType": "LAST_NAME", * "shown": true * }, * { * "fieldType": "EMAIL", * "shown": true * }, * { * "fieldType": "PHONE", * "shown": true * }, * { * "fieldType": "ADDITIONAL_INFO", * "shown": true * }, * { * "fieldType": "TEAM_MESSAGE", * "shown": true * }, * { * "fieldType": "STATUS", * "shown": true * }, * { * "fieldType": "CUSTOM_FIELD", * "customFieldId": "f4283b2d-6340-4cf9-bae7-8769e6b62127", * "shown": false * } * ], * "tableManagement": { * "tableDefinitions": [ * { * "name": "Small table", * "seatsMin": 1, * "seatsMax": 4, * "isActive": true, * "_id": "1ed802ae-708f-4da6-9177-54c3df5d3dd5" * }, * { * "name": "Big table", * "seatsMin": 3, * "seatsMax": 6, * "isActive": true, * "_id": "2c8aed3a-20c5-404c-b075-84a92f90a996" * } * ], * "deletedTableDefinitions": [], * "tableCombinations": [ * { * "tableIds": [ * "1ed802ae-708f-4da6-9177-54c3df5d3dd5", * "2c8aed3a-20c5-404c-b075-84a92f90a996" * ], * "seatsMin": 7, * "seatsMax": 10, * "isActive": true, * "_id": "6df9a875-d30d-4c0f-9faa-0a5ae18cd6f6" * } * ] * } * }, * "default": true, * "archived": false, * "_id": "fab8cc1f-31cf-462f-b5bb-392594624bf2", * "_createdDate": "2023-07-10T09:06:07.507Z", * "_updatedDate": "2024-01-17T12:56:26.047Z" * } * ], * "_originQuery": { * "filterTree": { * "$and": [] * }, * "invalidArguments": [], * "encoder": {}, * "transformationPaths": {}, * "sort": [], * "paging": {}, * "pagingMethod": "CURSOR", * "builderOptions": { * "cursorWithEmptyFilterAndSort": true * } * }, * "_limit": 50, * "_nextCursor": "", * "_prevCursor": "", * "cursors": { * "next": "", * "prev": "" * } * } */ ``` ### Query all reservation locations ```javascript import { reservationLocations } from '@wix/table-reservations'; reservationLocations.queryReservationLocations().find() .then((retrievedReservationLocations) => { const nextCursor = retrievedReservationLocations.next(); const minNotice = retrievedReservationLocations.items[0].configuration.onlineReservations.minimumReservationNotice; console.log('Success! Retrieved reservation locations from query:', retrievedReservationLocations); return retrievedReservationLocations; }) .catch((error) => { console.error(error); // Handle the error }); /* Promise resolves to: * { * "_items": [ * { * "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": "00:00", * "closeDay": "MONDAY", * "closeTime": "00:00" * }, * { * "openDay": "THURSDAY", * "openTime": "00:00", * "closeDay": "SUNDAY", * "closeTime": "00:00" * } * ], * "specialHourPeriod": [] * }, * "_id": "9bd42376-12c2-483e-86c3-8ee685e718e1" * }, * "configuration": { * "onlineReservations": { * "partiesSize": { * "min": 1, * "max": 6 * }, * "minimumReservationNotice": { * "number": 15, * "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": 15, * "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" * } * ], * "_originQuery": { * "filterTree": { * "$and": [] * }, * "invalidArguments": [], * "encoder": {}, * "transformationPaths": {}, * "sort": [], * "paging": {}, * "pagingMethod": "CURSOR", * "builderOptions": { * "cursorWithEmptyFilterAndSort": true * } * }, * "_limit": 50, * "_nextCursor": "", * "_prevCursor": "", * "cursors": { * "next": "", * "prev": "" * } * } */ ``` ### queryReservationLocations (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { reservationLocations } from '@wix/table-reservations'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { reservationLocations }, // Include the auth strategy and host as relevant }); async function queryReservationLocations(query) { const response = await myWixClient.reservationLocations.queryReservationLocations(query); }; ``` ---