> 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 # BulkDeleteRecipients # Package: onlineOrders # Namespace: NotificationRecipientsService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/notification-recipients/bulk-delete-recipients.md ## Permission Scopes: Manage Restaurants - all permissions: SCOPE.RESTAURANTS.MEGA-SCOPES ## Introduction Deletes multiple recipients in a single request. This is a synchronous operation that deletes up to 100 recipients at once. --- ## REST API ### Schema ``` Method: bulkDeleteRecipients Description: Deletes multiple recipients in a single request. This is a synchronous operation that deletes up to 100 recipients at once. URL: https://www.wixapis.com/rest-notification-recipients/v1/bulk/recipients/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: recipientIds Method parameters: param name: recipientIds | type: array | description: IDs of recipients to delete. | required: true Return type: BulkDeleteRecipientsResponse - name: results | type: array | description: Results of the bulk delete operation. - name: itemMetadata | type: ItemMetadata | description: Metadata regarding the specific single delete operation. - name: id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed. - 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 for this item was successful. When `false`, the `error` field is returned. - 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 regarding 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. ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.onlineOrders.NotificationRecipientsService.bulkDeleteRecipients(recipientIds) Description: Deletes multiple recipients in a single request. This is a synchronous operation that deletes up to 100 recipients at once. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: recipientIds Method parameters: param name: recipientIds | type: array | description: IDs of recipients to delete. | required: true Return type: PROMISE - name: results | type: array | description: Results of the bulk delete operation. - name: itemMetadata | type: ItemMetadata | description: Metadata regarding the specific single delete operation. - name: _id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed. - 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 for this item was successful. When `false`, the `error` field is returned. - 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 regarding 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 ### bulkDeleteRecipients ```javascript import { recipients } from '@wix/restaurants'; async function bulkDeleteRecipients(recipientIds) { const response = await recipients.bulkDeleteRecipients(recipientIds); }; ``` ### bulkDeleteRecipients (with elevated permissions) ```javascript import { recipients } from '@wix/restaurants'; import { auth } from '@wix/essentials'; async function myBulkDeleteRecipientsMethod(recipientIds) { const elevatedBulkDeleteRecipients = auth.elevate(recipients.bulkDeleteRecipients); const response = await elevatedBulkDeleteRecipients(recipientIds); } ``` ### bulkDeleteRecipients (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 { recipients } from '@wix/restaurants'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { recipients }, // Include the auth strategy and host as relevant }); async function bulkDeleteRecipients(recipientIds) { const response = await myWixClient.recipients.bulkDeleteRecipients(recipientIds); }; ``` ---