> 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

# Package: onlineOrders

# Namespace: operations

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

# Webhook Permissions Scopes IDs:
Manage Restaurants - all permissions: SCOPE.RESTAURANTS.MEGA-SCOPES

## Introduction

Triggered when an operation is deleted.

---

## REST API

### Schema

```
Webhook: Operation Deleted
Description: Triggered when an operation is deleted.
Event body:
 - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events.
 - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event.
 - name: slug | type: string | description: Event name.
 - name: entityId | type: string | description: ID of the entity associated with the event.
 - name: eventTime | type: string (date-time) | description: Event timestamp.
 - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR.
 - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.

```

### Examples


```curl
{
  "id": "5b159c6f-2bab-473b-b4cd-f41e48cf14c2",
  "entityFqdn": "wix.restaurants.operations.v1.operation",
  "entityId": "48605ac5-53fc-49b4-96b2-87f7636f5ce0",
  "triggeredByAnonymizeRequest": false,
  "slug": "deleted",
  "deletedEvent": {
    "deletedEntity": {
      "id": "48605ac5-53fc-49b4-96b2-87f7636f5ce0",
      "revision": "5",
      "createdDate": "2025-11-27T06:51:54.146Z",
      "updatedDate": "2025-12-10T08:32:03.316Z",
      "name": "Takeout",
      "default": true,
      "fulfillmentIds": [
        "12590791-d0d9-418f-a226-a7dcfd37b507",
        "71831b22-a043-4998-a10d-01bf9f2472f2"
      ],
      "onlineOrderingStatus": "PAUSED_UNTIL",
      "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"
          ]
        },
        "privateTags": {
          "tagIds": []
        }
      },
      "pausedUntilOptions": {
        "time": "2025-12-10T18:00:00Z"
      }
    }
  },
  "eventTime": "2025-12-12T13:34:01.436Z",
  "entityEventSequence": "6"
}

```

---

## JavaScript SDK

### Schema

```
Webhook: onOperationDeleted
Description: Triggered when an operation is deleted.
Payload: OperationDeletedEnvelope
  - name: entity | type: Operation | description: none
     - 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.
     - 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.
     - name: _createdDate | type: Date | description: Date and time the operation was created.
     - name: _updatedDate | type: Date | description: Date and time the operation was updated.
     - 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.
     - 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.
              - 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`.
                    - 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.
                                 - enum:
                                 -     MINUTES: Minutes time unit.
                                 -     HOURS: Hours time unit.
                                 -     DAYS: Days time unit.
                       - name: minDuration | type: integer | description: Minimum duration value. Unit of time specified in `timeUnit`.
                       - name: maxDuration | type: integer | description: Maximum duration value. Unit of time specified in `timeUnit`.
                 - 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.
     - 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.
     - 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).
     - 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.
        - 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: metadata | type: EventMetadata | description: none
     - name: instanceId | type: string | description: App instance GUID.
     - name: eventType | type: string | description: Event type.
     - name: identity | type: IdentificationData | description: The identification type and identity data.
        - ONE-OF:
           - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site.
           - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site.
           - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.).
           - name: appId | type: string | description: GUID of an app.
        - name: identityType | type: WebhookIdentityType | description: 
             - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
     - name: accountInfo | type: AccountInfo | description: Details related to the account
        - name: accountId | type: string | description: GUID of the Wix account associated with the event.
        - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account.
        - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site.
     - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them.
     - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
     - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
     - name: entityId | type: string | description: GUID of the entity associated with the event.
     - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`.
     - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
     - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
     - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.

```

### Examples


```javascript
import { operations } from '@wix/restaurants';

operations.onOperationDeleted((event) => {
    // handle your event here
});
```


```javascript
import { createClient, AppStrategy } from '@wix/sdk';
import { operations } from '@wix/restaurants';

const wixClient = createClient({
  auth: AppStrategy({
    appId: 'MY-APP-ID',
    publicKey: 'YOUR_APP_PUBLIC_KEY',
  }),
  modules: {
      operations,
    },
});

wixClient.operations.onOperationDeleted((event) => {
    // handle your event here
});
```

---