> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# QueryOperation

# Package: onlineOrders

# Namespace: OperationsService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/operations/query-operation.md

## Permission Scopes:
Manage Restaurants - all permissions: SCOPE.RESTAURANTS.MEGA-SCOPES

## Introduction

Retrieves a list of up to 100 operations, given the provided paging, filtering, and sorting.

Query Operation runs with these defaults, which you can override:

- `id` is sorted in `ASC` order
- `cursorPaging.limit` is `50`

To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).

---

## REST API

### Schema

```
 Method: queryOperation
 Description: Retrieves a list of up to 100 operations, given the provided paging, filtering, and sorting.  Query Operation runs with these defaults, which you can override:  - `id` is sorted in `ASC` order - `cursorPaging.limit` is `50`  To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).
 URL: https://www.wixapis.com/restaurants-operations/v1/operations/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: CursorQuery   | 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: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.  
        - name: sort | type: array<Sorting> | description: Sort object.  | validation: maxItems 4
           - name: fieldName | type: string | description: Supported properties: - `id` - `createdDate` - `updatedDate` - `name`  | validation: maxLength 64
           - name: order | type: SortOrder | description: Sort order. Use `ASC` for ascending order or `DESC` for descending order. <br />  Default: `ASC`  
                 - enum: ASC, DESC
 Query fields:
   - field: id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: updatedDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: name | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: default | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: fulfillmentIds | operators: $hasSome, $hasAll, $exists, $isEmpty | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: defaultFulfillmentType | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: onlineOrderingStatus | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: businessLocationDetails.archived | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: businessLocationId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: QueryOperationResponse
  - name: operations | type: array<Operation> | description: Retrieved operations.  
     - ONE-OF: 
        - name: pausedUntilOptions | type: OnlineOrderingPausedUntilOptions | description: Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`.  
           - name: time | type: string | description: Date and time until which online ordering is paused.  Before this time, the operation behaves as if `onlineOrderingStatus` is `DISABLED`. After this time, the operation behaves as if `onlineOrderingStatus` is `ENABLED`.  When this time passes, `onlineOrderingStatus` doesn't change.  | validation: format date-time
     - name: id | type: string | description: Operation GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the operation is updated. To prevent conflicting changes, the current revision must be passed when updating the operation.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the operation was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the operation was updated.  | read-only: true | validation: format date-time
     - name: name | type: string | description: Operation name.  
     - name: default | type: boolean | description: Whether the operation is the default operation.  Default: `false`  
     - name: fulfillmentIds | type: array<string> | description: IDs of the fulfillment methods ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/fulfillment-methods/introduction.md) | [REST](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/fulfillment-methods/introduction.md)) associated with the operation.  | validation: maxItems 500, format GUID
     - name: onlineOrderingStatus | type: OnlineOrderingStatusType | description: Online ordering status of the operation.  
         - enum:
         -     UNDEFINED_ONLINE_ORDERING_STATUS: Online ordering status is not defined.
         -     ENABLED: Operation currently accepts online orders.
         -     DISABLED: Operation currently does not accept online orders.
         -     PAUSED_UNTIL: Operation currently does not accept online orders, but will accept online orders from a specified date and time. When applied, `pausedUntilOptions` is a required field.
     - name: defaultFulfillmentType | type: FulfillmentType | description: Default fulfillment type of the operation.  
         - enum:
         -     PICKUP: Pickup fulfillment. The customer picks up the order from the restaurant.
         -     DELIVERY: Delivery fulfillment. The restaurant, or a representative, delivers the order to the customer.
     - name: orderScheduling | type: OrderScheduling | description: Information about when an order can be placed for.  
        - ONE-OF: 
           - name: asapOptions | type: AsapOrderScheduling | description: Options for scheduling. Required if `type` is `ASAP`.  
              - ONE-OF: 
                 - name: businessDaysAheadHandlingOptions | type: BusinessDaysAheadHandling | description: Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`.  
                    - name: daysCount | type: integer | description: Number of business days ahead for which orders can be scheduled.  When `0`, orders can be scheduled until the end of the current business day.  | validation: minimum 0, format int32
              - name: preparationTime | type: PreparationTime | description: Time needed to prepare the order.  
                 - ONE-OF: 
                    - name: maxTimeOptions | type: TimeDuration | description: Options for preparation time. Required when `type` is `MAX_TIME`.  
                       - name: timeUnit | type: TimeUnit | description: Unit of time for the duration.  
                                 - enum:
                                 -     MINUTES: Minutes time unit.
                                 -     HOURS: Hours time unit.
                                 -     DAYS: Days time unit.
                       - name: duration | type: integer | description: Duration value. Unit of time specified in `timeUnit`.  | validation: minimum 0, format int32
                    - name: timeRangeOptions | type: TimeDurationRange | description: Options for preparation time. Required when `type` is `TIME_RANGE`.  
                       - name: timeUnit | type: TimeUnit | description: Time unit for the time range.  
                       - name: minDuration | type: integer | description: Minimum duration value. Unit of time specified in `timeUnit`.  | validation: minimum 1, format int32
                       - name: maxDuration | type: integer | description: Maximum duration value. Unit of time specified in `timeUnit`.  | validation: minimum 1, format int32
                 - name: type | type: PreparationTimeType | description: Preparation time type.  
                         - enum:
                         -     MAX_TIME: Preparation time has a maximum.
                         -     TIME_RANGE: Preparation time has a minimum and a maximum.
              - name: asapFutureHandlingType | type: AsapFutureHandlingType | description: Whether and how orders can be placed for a later time.  When `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is required.  
                     - enum:
                     -     NO_FUTURE_HANDLING: Orders can't be placed for a later time.
                     -     BUSINESS_DAYS_AHEAD_HANDLING: Allows future orders for up to a specified number of business days ahead.
           - name: preorderOptions | type: PreorderScheduling | description: Options for scheduling. Required if `type` is `PREORDER`.  
              - name: method | type: PreorderMethod | description:   
                 - ONE-OF: 
                    - name: timeBoundedOptions | type: TimeBounded | description: Options for the method. Required when `type` is `TIME_BOUNDED`.  
                       - name: minTimeInAdvance | type: TimeDuration | description: Minimum time required to schedule the order.  
                       - name: maxTimeInAdvance | type: TimeDuration | description: Maximum time allowed to schedule the order.  
                    - name: weeklyScheduleOptions | type: WeeklySchedule | description: Options for the method. Required when `type` is `WEEKLY_SCHEDULE`.  
                       - name: cutOffTime | type: DayAndTime | description: Weekly cutoff time.  Orders placed before the cutoff time are scheduled for the current week. Orders placed after the cutoff time are scheduled for the next week.  
                          - name: dayOfWeek | type: DayOfWeek | description: Day of the week.  
                                     - enum:
                                     -     MON: Monday.
                                     -     TUE: Tuesday.
                                     -     WED: Wednesday.
                                     -     THU: Thursday.
                                     -     FRI: Friday.
                                     -     SAT: Saturday.
                                     -     SUN: Sunday.
                          - name: timeOfDay | type: TimeOfDay | description: Time of the day.  
                             - name: hours | type: integer | description: Hours. <br /> Min: `0`. <br /> Max: `23`.  
                             - name: minutes | type: integer | description: Minutes. <br /> Min: `0`. <br /> Max: `23`.  
                 - name: type | type: MethodType | description: Type of time frame for how long in advance preorders can be made.  
                         - enum:
                         -     TIME_BOUNDED: Preorder time has a minimum and a maximum.
                         -     WEEKLY_SCHEDULE: Preorders have a weekly schedule with a weekly cutoff time.
              - name: fulfillmentTimesDisplay | type: FulfillmentTimesDisplayConfig | description: How fulfillment times are displayed.  Currently supports `TIME_WINDOWS`.  
                 - ONE-OF: 
                    - name: timeWindowsOptions | type: TimeDuration | description: Duration of each time window. Required when `type` is `TIME_WINDOWS`.  
                 - name: type | type: FulfillmentTimesType | description: Fulfillment times type.  
                         - enum:
                         -     TIME_WINDOWS: Display fulfillment times as time windows.
        - name: type | type: SchedulingType | description: Order scheduling type.  
             - enum:
             -     ASAP: Orders are handled as soon as possible. Depending on the configuration, orders can also be scheduled for a later time.
             -     PREORDER: Orders must be scheduled in advance.
     - name: operationGroupId | type: string | description: GUID of the operation group this operation belongs to. Set automatically when the operation is created.  | validation: format GUID, immutable
     - name: businessLocationId | type: string | description: GUID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations.md) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations.md)) of this operation.  | read-only: true | validation: format GUID, immutable
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the operation object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.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).  | validation: format map
     - name: tags | type: Tags | description: Tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction.md)) used to classify and sort different types of operations.  
        - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
           - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
        - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Metadata of the paginated results.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### Query operations by online ordering status
```curl
curl -X POST \
'https://www.wixapis.com/restaurants-operations/v1/operations/query' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "query": {
    "filter": {
      "onlineOrderingStatus": {
        "$eq": "ENABLED"
      }
    },
    "sort": [
      {
        "fieldName": "createdDate",
        "order": "ASC"
      }
    ],
    "cursorPaging": {
      "limit": 50
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.restaurants.operations.queryOperation(query)
 Description: Retrieves a list of up to 100 operations, given the provided paging, filtering, and sorting.  Query Operation runs with these defaults, which you can override:  - `id` is sorted in `ASC` order - `cursorPaging.limit` is `50`  To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).
 # 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: OperationQuery   | 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: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.  
        - name: sort | type: array<Sorting> | description: Sort object.  | validation: maxItems 4
           - name: fieldName | type: string | description: Supported properties: - `id` - `createdDate` - `updatedDate` - `name`  | validation: maxLength 64
           - name: order | type: SortOrder | description: Sort order. Use `ASC` for ascending order or `DESC` for descending order. <br />  Default: `ASC`  
                 - enum: ASC, DESC
 Query fields:
   - field: _id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _updatedDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: name | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: default | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: fulfillmentIds | operators: $hasSome, $hasAll, $exists, $isEmpty | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: defaultFulfillmentType | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: onlineOrderingStatus | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: businessLocationId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryOperationResponse>
  - name: operations | type: array<Operation> | description: Retrieved operations.  
     - ONE-OF: 
        - name: pausedUntilOptions | type: OnlineOrderingPausedUntilOptions | description: Options for online ordering status. Required when `onlineOrderingStatus` is `PAUSED_UNTIL`.  
           - name: time | type: Date | description: Date and time until which online ordering is paused.  Before this time, the operation behaves as if `onlineOrderingStatus` is `DISABLED`. After this time, the operation behaves as if `onlineOrderingStatus` is `ENABLED`.  When this time passes, `onlineOrderingStatus` doesn't change.  
     - name: _id | type: string | description: Operation GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the operation is updated. To prevent conflicting changes, the current revision must be passed when updating the operation.  | read-only: true | validation: format int64
     - name: _createdDate | type: Date | description: Date and time the operation was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the operation was updated.  | read-only: true 
     - name: name | type: string | description: Operation name.  
     - name: default | type: boolean | description: Whether the operation is the default operation.  Default: `false`  
     - name: fulfillmentIds | type: array<string> | description: IDs of the fulfillment methods ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/fulfillment-methods/introduction.md) | [REST](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/fulfillment-methods/introduction.md)) associated with the operation.  | validation: maxItems 500, format GUID
     - name: onlineOrderingStatus | type: OnlineOrderingStatusType | description: Online ordering status of the operation.  
         - enum:
         -     UNDEFINED_ONLINE_ORDERING_STATUS: Online ordering status is not defined.
         -     ENABLED: Operation currently accepts online orders.
         -     DISABLED: Operation currently does not accept online orders.
         -     PAUSED_UNTIL: Operation currently does not accept online orders, but will accept online orders from a specified date and time. When applied, `pausedUntilOptions` is a required field.
     - name: defaultFulfillmentType | type: FulfillmentType | description: Default fulfillment type of the operation.  
         - enum:
         -     PICKUP: Pickup fulfillment. The customer picks up the order from the restaurant.
         -     DELIVERY: Delivery fulfillment. The restaurant, or a representative, delivers the order to the customer.
     - name: orderScheduling | type: OrderScheduling | description: Information about when an order can be placed for.  
        - ONE-OF: 
           - name: asapOptions | type: AsapOrderScheduling | description: Options for scheduling. Required if `type` is `ASAP`.  
              - ONE-OF: 
                 - name: businessDaysAheadHandlingOptions | type: BusinessDaysAheadHandling | description: Options for future handling. Required when `asapFutureHandlingType` is `BUSINESS_DAYS_AHEAD_HANDLING`.  
                    - name: daysCount | type: integer | description: Number of business days ahead for which orders can be scheduled.  When `0`, orders can be scheduled until the end of the current business day.  | validation: minimum 0, format int32
              - name: preparationTime | type: PreparationTime | description: Time needed to prepare the order.  
                 - ONE-OF: 
                    - name: maxTimeOptions | type: TimeDuration | description: Options for preparation time. Required when `type` is `MAX_TIME`.  
                       - name: timeUnit | type: TimeUnit | description: Unit of time for the duration.  
                                 - enum:
                                 -     MINUTES: Minutes time unit.
                                 -     HOURS: Hours time unit.
                                 -     DAYS: Days time unit.
                       - name: duration | type: integer | description: Duration value. Unit of time specified in `timeUnit`.  | validation: minimum 0, format int32
                    - name: timeRangeOptions | type: TimeDurationRange | description: Options for preparation time. Required when `type` is `TIME_RANGE`.  
                       - name: timeUnit | type: TimeUnit | description: Time unit for the time range.  
                       - name: minDuration | type: integer | description: Minimum duration value. Unit of time specified in `timeUnit`.  | validation: minimum 1, format int32
                       - name: maxDuration | type: integer | description: Maximum duration value. Unit of time specified in `timeUnit`.  | validation: minimum 1, format int32
                 - name: type | type: PreparationTimeType | description: Preparation time type.  
                         - enum:
                         -     MAX_TIME: Preparation time has a maximum.
                         -     TIME_RANGE: Preparation time has a minimum and a maximum.
              - name: asapFutureHandlingType | type: AsapFutureHandlingType | description: Whether and how orders can be placed for a later time.  When `BUSINESS_DAYS_AHEAD_HANDLING`, `businessDaysAheadHandlingOptions` is required.  
                     - enum:
                     -     NO_FUTURE_HANDLING: Orders can't be placed for a later time.
                     -     BUSINESS_DAYS_AHEAD_HANDLING: Allows future orders for up to a specified number of business days ahead.
           - name: preorderOptions | type: PreorderScheduling | description: Options for scheduling. Required if `type` is `PREORDER`.  
              - name: method | type: PreorderMethod | description:   
                 - ONE-OF: 
                    - name: timeBoundedOptions | type: TimeBounded | description: Options for the method. Required when `type` is `TIME_BOUNDED`.  
                       - name: minTimeInAdvance | type: TimeDuration | description: Minimum time required to schedule the order.  
                       - name: maxTimeInAdvance | type: TimeDuration | description: Maximum time allowed to schedule the order.  
                    - name: weeklyScheduleOptions | type: WeeklySchedule | description: Options for the method. Required when `type` is `WEEKLY_SCHEDULE`.  
                       - name: cutOffTime | type: DayAndTime | description: Weekly cutoff time.  Orders placed before the cutoff time are scheduled for the current week. Orders placed after the cutoff time are scheduled for the next week.  
                          - name: dayOfWeek | type: DayOfWeek | description: Day of the week.  
                                     - enum:
                                     -     MON: Monday.
                                     -     TUE: Tuesday.
                                     -     WED: Wednesday.
                                     -     THU: Thursday.
                                     -     FRI: Friday.
                                     -     SAT: Saturday.
                                     -     SUN: Sunday.
                          - name: timeOfDay | type: TimeOfDay | description: Time of the day.  
                             - name: hours | type: integer | description: Hours. <br /> Min: `0`. <br /> Max: `23`.  
                             - name: minutes | type: integer | description: Minutes. <br /> Min: `0`. <br /> Max: `23`.  
                 - name: type | type: MethodType | description: Type of time frame for how long in advance preorders can be made.  
                         - enum:
                         -     TIME_BOUNDED: Preorder time has a minimum and a maximum.
                         -     WEEKLY_SCHEDULE: Preorders have a weekly schedule with a weekly cutoff time.
              - name: fulfillmentTimesDisplay | type: FulfillmentTimesDisplayConfig | description: How fulfillment times are displayed.  Currently supports `TIME_WINDOWS`.  
                 - ONE-OF: 
                    - name: timeWindowsOptions | type: TimeDuration | description: Duration of each time window. Required when `type` is `TIME_WINDOWS`.  
                 - name: type | type: FulfillmentTimesType | description: Fulfillment times type.  
                         - enum:
                         -     TIME_WINDOWS: Display fulfillment times as time windows.
        - name: type | type: SchedulingType | description: Order scheduling type.  
             - enum:
             -     ASAP: Orders are handled as soon as possible. Depending on the configuration, orders can also be scheduled for a later time.
             -     PREORDER: Orders must be scheduled in advance.
     - name: operationGroupId | type: string | description: GUID of the operation group this operation belongs to. Set automatically when the operation is created.  | validation: format GUID, immutable
     - name: businessLocationId | type: string | description: GUID of the business location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations.md) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations.md)) of this operation.  | read-only: true | validation: format GUID, immutable
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the operation object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.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).  | validation: format map
     - name: tags | type: Tags | description: Tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction.md)) used to classify and sort different types of operations.  
        - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
           - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
        - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Metadata of the paginated results.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### Query operations by online ordering status
```javascript
import { operations } from "@wix/restaurants";

async function queryOperation() {
  const response = await operations
    .queryOperation()
    .eq("onlineOrderingStatus", "ENABLED")
    .ascending("_createdDate")
    .limit(50)
    .find();

  return response.items;
}

/* Promise resolves to:
 * [
 *   {
 *     "_id": "48605ac5-53fc-49b4-96b2-87f7636f5ce0",
 *     "revision": "4",
 *     "_createdDate": "2025-11-27T06:51:54.146Z",
 *     "_updatedDate": "2025-12-03T13:18:04.382Z",
 *     "name": "Takeout",
 *     "default": true,
 *     "fulfillmentIds": [
 *       "12590791-d0d9-418f-a226-a7dcfd37b507",
 *       "71831b22-a043-4998-a10d-01bf9f2472f2"
 *     ],
 *     "onlineOrderingStatus": "ENABLED",
 *     "defaultFulfillmentType": "PICKUP",
 *     "orderScheduling": {
 *       "type": "ASAP",
 *       "asapOptions": {
 *         "preparationTime": {
 *           "type": "MAX_TIME",
 *           "maxTimeOptions": {
 *             "timeUnit": "MINUTES",
 *             "duration": 30
 *           }
 *         },
 *         "asapFutureHandlingType": "BUSINESS_DAYS_AHEAD_HANDLING",
 *         "businessDaysAheadHandlingOptions": {
 *           "daysCount": 2
 *         }
 *       }
 *     },
 *     "operationGroupId": "c3d5e7f9-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
 *     "businessLocationId": "e8a4b6c2-5d1f-4a3e-9b7c-1f2d3e4a5b6c",
 *     "tags": {
 *       "tags": {
 *         "tagIds": [
 *           "5b1e9f2c-7a3d-4c8e-b6f0-2d4a8c1e3f57"
 *         ]
 *       }
 *     }
 *   },
 *   {
 *     "_id": "b7c2f1e9-3d4a-4f6b-9e8c-2a1d5f7e9c03",
 *     "revision": "2",
 *     "_createdDate": "2025-11-28T09:12:41.020Z",
 *     "_updatedDate": "2025-11-30T10:05:11.733Z",
 *     "name": "Catering",
 *     "default": false,
 *     "fulfillmentIds": [
 *       "12590791-d0d9-418f-a226-a7dcfd37b507",
 *       "71831b22-a043-4998-a10d-01bf9f2472f2"
 *     ],
 *     "onlineOrderingStatus": "ENABLED",
 *     "defaultFulfillmentType": "DELIVERY",
 *     "orderScheduling": {
 *       "type": "PREORDER",
 *       "preorderOptions": {
 *         "method": {
 *           "type": "TIME_BOUNDED",
 *           "timeBoundedOptions": {
 *             "minTimeInAdvance": {
 *               "timeUnit": "DAYS",
 *               "duration": 1
 *             },
 *             "maxTimeInAdvance": {
 *               "timeUnit": "DAYS",
 *               "duration": 14
 *             }
 *           }
 *         },
 *         "fulfillmentTimesDisplay": {
 *           "type": "TIME_WINDOWS",
 *           "timeWindowsOptions": {
 *             "timeUnit": "HOURS",
 *             "duration": 2
 *           }
 *         }
 *       }
 *     },
 *     "operationGroupId": "c3d5e7f9-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
 *     "businessLocationId": "e8a4b6c2-5d1f-4a3e-9b7c-1f2d3e4a5b6c",
 *     "tags": {
 *       "tags": {
 *         "tagIds": [
 *           "5b1e9f2c-7a3d-4c8e-b6f0-2d4a8c1e3f57"
 *         ]
 *       }
 *     }
 *   }
 * ]
 */

```

### queryOperation (self-managed)
Self-managed 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 { operations } from '@wix/restaurants';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { operations },
  // Include the auth strategy and host as relevant
});


async function queryOperation(query) {
  const response = await myWixClient.operations.queryOperation(query);
};
```

---