> 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 # BulkDeleteAddOns # Package: services # Namespace: AddOnsService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/bulk-delete-add-ons.md ## Permission Scopes: Manage Bookings: SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS ## Introduction Deletes multiple add-ons in a single request. --- ## REST API ### Schema ``` Method: bulkDeleteAddOns Description: Deletes multiple add-ons in a single request. URL: https://www.wixapis.com/addons/v1/bulk/add-ons/delete Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: addOnIds Method parameters: param name: addOnIds | type: array | description: IDs of add-ons to delete. | required: true Return type: BulkDeleteAddOnsResponse - name: results | type: array | description: Results of the bulk delete operation. - name: itemMetadata | type: ItemMetadata | description: Metadata for the individual delete operation. - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata for the bulk delete operation. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### Bulk Delete AddOns Bulk deletes some AddOns ```curl curl -X 'POST' \ 'https://manage.wix.com/_api/add-ons-service/v1/bulk/add-ons/delete' \ -H 'authorization: ' \ -H 'content-type: application/json' \ --data-raw '{ "addOnIds": ["d8aac216-fab1-4fd2-a469-a8bd12465a85"] }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.services.AddOnsService.bulkDeleteAddOns(addOnIds) Description: Deletes multiple add-ons in a single request. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: addOnIds Method parameters: param name: addOnIds | type: array | description: IDs of add-ons to delete. | required: true Return type: PROMISE - name: results | type: array | description: Results of the bulk delete operation. - name: itemMetadata | type: ItemMetadata | description: Metadata for the individual delete operation. - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata for the bulk delete operation. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### bulkDeleteAddOns ```javascript import { addOns } from '@wix/bookings'; async function bulkDeleteAddOns(addOnIds) { const response = await addOns.bulkDeleteAddOns(addOnIds); }; ``` ### bulkDeleteAddOns (with elevated permissions) ```javascript import { addOns } from '@wix/bookings'; import { auth } from '@wix/essentials'; async function myBulkDeleteAddOnsMethod(addOnIds) { const elevatedBulkDeleteAddOns = auth.elevate(addOns.bulkDeleteAddOns); const response = await elevatedBulkDeleteAddOns(addOnIds); } ``` ### bulkDeleteAddOns (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 { addOns } from '@wix/bookings'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { addOns }, // Include the auth strategy and host as relevant }); async function bulkDeleteAddOns(addOnIds) { const response = await myWixClient.addOns.bulkDeleteAddOns(addOnIds); }; ``` ---