> 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 # DeletePoolDefinition # Package: benefitPrograms # Namespace: PoolDefinitionService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/benefit-programs/pool-definitions/delete-pool-definition.md ## Permission Scopes: Manage benefit programs: SCOPE.BENEFIT_PROGRAMS.MANAGE ## Introduction Deletes a pool definition. --- ## REST API ### Schema ``` Method: deletePoolDefinition Description: Deletes a pool definition. URL: https://www.wixapis.com/_api/benefit-programs/v1/pool-definitions/{poolDefinitionId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: poolDefinitionId, cascade Method parameters: param name: cascade | type: Cascade | required: true - enum: UNKNOWN_CASCADE - Unknown cascade. NEXT_RENEWAL - Changes are applied to existing programs and pools when they are next renewed. IMMEDIATELY - Changes are applied to associated programs and pools immediately. FUTURE_PROVISIONS - Changes are not applied to existing associated programs and pools. They are only applied to future programs and pools. param name: poolDefinitionId | type: none | required: true Return type: DeletePoolDefinitionResponse EMPTY-OBJECT {} ``` ### Examples ### DeletePoolDefinition ```curl ~~~cURL curl --request DELETE https://www.wixapis.com/benefit-programs/v1/pool-definitions/9c78dd9c-4b80-4e9c-a187-9ea06ce70060?cascade=IMMEDIATELY \ -H 'Content-type: application/json' \ -H 'Authorization: ' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.benefitPrograms.PoolDefinitionService.deletePoolDefinition(poolDefinitionId, cascade) Description: Deletes a pool definition. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: poolDefinitionId, cascade Method parameters: param name: cascade | type: Cascade | required: true - enum: UNKNOWN_CASCADE - Unknown cascade. NEXT_RENEWAL - Changes are applied to existing programs and pools when they are next renewed. IMMEDIATELY - Changes are applied to associated programs and pools immediately. FUTURE_PROVISIONS - Changes are not applied to existing associated programs and pools. They are only applied to future programs and pools. param name: poolDefinitionId | type: string | description: GUID of the pool definition to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deletePoolDefinition ```javascript import { poolDefinitions } from '@wix/benefit-programs'; async function deletePoolDefinition(poolDefinitionId,cascade) { const response = await poolDefinitions.deletePoolDefinition(poolDefinitionId,cascade); }; ``` ### deletePoolDefinition (with elevated permissions) ```javascript import { poolDefinitions } from '@wix/benefit-programs'; import { auth } from '@wix/essentials'; async function myDeletePoolDefinitionMethod(poolDefinitionId,cascade) { const elevatedDeletePoolDefinition = auth.elevate(poolDefinitions.deletePoolDefinition); const response = await elevatedDeletePoolDefinition(poolDefinitionId,cascade); } ``` ### deletePoolDefinition (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 { poolDefinitions } from '@wix/benefit-programs'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { poolDefinitions }, // Include the auth strategy and host as relevant }); async function deletePoolDefinition(poolDefinitionId,cascade) { const response = await myWixClient.poolDefinitions.deletePoolDefinition(poolDefinitionId,cascade); }; ``` ---