> 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 # DeleteItem # Package: benefitPrograms # Namespace: ItemService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/benefit-programs/items/delete-item.md ## Permission Scopes: Manage benefit programs: SCOPE.BENEFIT_PROGRAMS.MANAGE ## Introduction Deletes a benefit item.
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: deleteItem Description: Deletes a benefit item.
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/items/{itemId}/delete Method: POST Return type: DeleteItemResponse EMPTY-OBJECT {} ``` ### Examples ### DeleteItem ```curl ~~~cURL curl -X POST \ "https://www.wixapis.com/benefit-programs/v1/items/9d030ee9-f656-4a5c-8318-266a22aff552/delete" -H 'Content-type: application/json' \ -H 'Authorization: ' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.benefitPrograms.ItemService.deleteItem(itemId) Description: Deletes a benefit item.
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: itemId Method parameters: param name: itemId | type: string | description: Item GUID. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteItem ```javascript import { items } from '@wix/benefit-programs'; async function deleteItem(itemId) { const response = await items.deleteItem(itemId); }; ``` ### deleteItem (with elevated permissions) ```javascript import { items } from '@wix/benefit-programs'; import { auth } from '@wix/essentials'; async function myDeleteItemMethod(itemId) { const elevatedDeleteItem = auth.elevate(items.deleteItem); const response = await elevatedDeleteItem(itemId); } ``` ### deleteItem (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 deleteItem(itemId) { const response = await myWixClient.items.deleteItem(itemId); }; ``` ---