> 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

# BulkDeleteServicesByFilter

# Package: services

# Namespace: ServicesService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/bulk-delete-services-by-filter.md

## Permission Scopes:
Manage Bookings: SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS

## Introduction

Deletes multiple services by filter.


See [Delete Service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/delete-service.md)
for more details about deleting a service.

The call succeeds even if one or more individual services can't be deleted.
Information about failures is returned in `bulkActionMetadata`.

Refer to the [supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction.md#services-filtering-and-sorting)
for more details.

To learn about working with filters in general, see
[API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#filters).

---

## REST API

### Schema

```
 Method: bulkDeleteServicesByFilter
 Description: Deletes multiple services by filter.   See [Delete Service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/delete-service.md) for more details about deleting a service.  The call succeeds even if one or more individual services can't be deleted. Information about failures is returned in `bulkActionMetadata`.  Refer to the [supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction.md#services-filtering-and-sorting) for more details.  To learn about working with filters in general, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#filters).
 URL: https://www.wixapis.com/bookings/v2/bulk/services/delete-by-filter
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  filter
 Method parameters: 
   param name: filter | type: filter | description: Filter to identify the services that need to be deleted. | required: true 
   param name: participantNotification | type: ParticipantNotification    
        - name: notifyParticipants | type: boolean | description: Whether to send a message about the changes to the customer.  Default: `false`  
        - name: message | type: string | description: Custom message to send to the participants about the changes to the booking.  | validation: maxLength 2000
   param name: preserveFutureSessionsWithParticipants | type: preserveFutureSessionsWithParticipants | description: Whether to preserve future sessions with participants.  Default: `false`.  
 Return type: BulkDeleteServicesByFilterResponse
  - name: jobId | type: string | description: GUID of the service deletion job.  Pass this GUID to [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction.md) to retrieve job details and metadata.  | validation: format GUID


```

### Examples

### Delete all classes
```curl
curl -X POST 'https://www.wixapis.com/bookings/v2/bulk/services/delete-by-filter' \
-H 'Authorization: <AUTH>' \
-d '{
  "filter": {
    "type": "CLASS"
  },
  "preserveFutureSessionsWithParticipants": false,
  "participantNotification": {
    "notifyParticipants": true
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bookings.services.bulkDeleteServicesByFilter(filter, options)
 Description: Deletes multiple services by filter.   See [Delete Service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/delete-service.md) for more details about deleting a service.  The call succeeds even if one or more individual services can't be deleted. Information about failures is returned in `bulkActionMetadata`.  Refer to the [supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/introduction.md#services-filtering-and-sorting) for more details.  To learn about working with filters in general, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#filters).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  filter
 Method parameters: 
   param name: filter | type: object | description: Filter to identify the services that need to be deleted. | required: true 
   param name: options | type: BulkDeleteServicesByFilterOptions  none  
        - name: preserveFutureSessionsWithParticipants | type: boolean | description: Whether to preserve future sessions with participants.  Default: `false`.  
        - name: participantNotification | type: ParticipantNotification | description: Whether to notify participants about the change and an optional custom message.  
           - name: notifyParticipants | type: boolean | description: Whether to send a message about the changes to the customer.  Default: `false`  
           - name: message | type: string | description: Custom message to send to the participants about the changes to the booking.  | validation: maxLength 2000
 Return type: PROMISE<BulkDeleteServicesByFilterResponse>
  - name: jobId | type: string | description: GUID of the service deletion job.  Pass this GUID to [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction.md) to retrieve job details and metadata.  | validation: format GUID


```

### Examples

### bulkDeleteServicesByFilter
```javascript
import { services } from '@wix/bookings';

async function bulkDeleteServicesByFilter(filter,options) {
  const response = await services.bulkDeleteServicesByFilter(filter,options);
};
```

### bulkDeleteServicesByFilter (with elevated permissions)
```javascript
import { services } from '@wix/bookings';
import { auth } from '@wix/essentials';

async function myBulkDeleteServicesByFilterMethod(filter,options) {
  const elevatedBulkDeleteServicesByFilter = auth.elevate(services.bulkDeleteServicesByFilter);
  const response = await elevatedBulkDeleteServicesByFilter(filter,options);
}
```

### bulkDeleteServicesByFilter (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 { services } from '@wix/bookings';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function bulkDeleteServicesByFilter(filter,options) {
  const response = await myWixClient.services.bulkDeleteServicesByFilter(filter,options);
};
```

---