> 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 # BulkDeleteItemsByFilter # Package: benefitPrograms # Namespace: ItemService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/benefit-programs/items/bulk-delete-items-by-filter.md ## Permission Scopes: Manage benefit programs: SCOPE.BENEFIT_PROGRAMS.MANAGE ## Introduction Deletes benefit items that fulfill the specified filter conditions. For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting.md).
Caution: Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.
--- ## REST API ### Schema ``` Method: bulkDeleteItemsByFilter Description: Deletes benefit items that fulfill the specified filter conditions. For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting.md).
Caution: Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.
URL: https://www.wixapis.com/benefit-programs/v1/bulk/items/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: namespace Method parameters: param name: filter | type: filter | description: Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md). param name: namespace | type: namespace | description: Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created. | required: true Return type: BulkDeleteItemsByFilterResponse - name: jobId | type: string | description: Job GUID for item deletion. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction.md). ``` ### Examples ### BulkDeleteItemsByFilter ```curl ~~~cURL curl -X POST "https://www.wixapis.com/benefit-programs/v1/bulk/items/delete-by-filter" \ -H 'Content-type: application/json' \ -H 'Authorization: ' \ -d "{ "namespace":"benefit_programs_app", "filter":{ "externalId":{ "$eq":"3f9a7c91-4e2b-4d5e-b6f8-0c2e5a9d4f34" } } }" ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.benefitPrograms.ItemService.bulkDeleteItemsByFilter(namespace, options) Description: Deletes benefit items that fulfill the specified filter conditions. For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting.md).
Caution: Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.
# Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: namespace Method parameters: param name: namespace | type: string | description: Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created. | required: true param name: options | type: BulkDeleteItemsByFilterOptions none - name: filter | type: object | description: Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md). Return type: PROMISE - name: jobId | type: string | description: Job GUID for item deletion. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction.md). ``` ### Examples ### bulkDeleteItemsByFilter ```javascript import { items } from '@wix/benefit-programs'; async function bulkDeleteItemsByFilter(namespace,options) { const response = await items.bulkDeleteItemsByFilter(namespace,options); }; ``` ### bulkDeleteItemsByFilter (with elevated permissions) ```javascript import { items } from '@wix/benefit-programs'; import { auth } from '@wix/essentials'; async function myBulkDeleteItemsByFilterMethod(namespace,options) { const elevatedBulkDeleteItemsByFilter = auth.elevate(items.bulkDeleteItemsByFilter); const response = await elevatedBulkDeleteItemsByFilter(namespace,options); } ``` ### bulkDeleteItemsByFilter (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 { items } from '@wix/benefit-programs'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { items }, // Include the auth strategy and host as relevant }); async function bulkDeleteItemsByFilter(namespace,options) { const response = await myWixClient.items.bulkDeleteItemsByFilter(namespace,options); }; ``` ---