> 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 # DeleteCustomization # Package: catalogV3 # Namespace: CustomizationService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/customizations-v3/delete-customization.md ## Permission Scopes: Customization write in v3 catalog: SCOPE.STORES.CUSTOMIZATION_WRITE ## Introduction Deletes a customization. > **Notes:** > + **Options** (customizations with `customizationType: PRODUCT_OPTION`) can't be deleted while assigned to any product because they affect product variants and inventory. > + **Modifiers** can be deleted freely. When deleted, they are automatically removed from all products that reference them. --- ## REST API ### Schema ``` Method: deleteCustomization Description: Deletes a customization. > **Notes:** > + **Options** (customizations with `customizationType: PRODUCT_OPTION`) can't be deleted while assigned to any product because they affect product variants and inventory. > + **Modifiers** can be deleted freely. When deleted, they are automatically removed from all products that reference them. URL: https://www.wixapis.com/stores/v3/customizations/{customizationId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: customizationId Method parameters: param name: customizationId | type: none | required: true Return type: DeleteCustomizationResponse EMPTY-OBJECT {} Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NOT_ALLOWED_DELETE_CUSTOMIZATION_ASSIGNED_TO_PRODUCT | Description: Product option customization is assigned to 1 or more products. Remove the customization from all products before deleting. ``` ### Examples ### Delete Customization Deletes a Customization based on its id ```curl curl -X DELETE \ 'https://www.wixapis.com/stores/v3/customizations/c4a4cc7b-caff-41dd-b23a-1f0bf4730c06' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.catalogV3.CustomizationService.deleteCustomization(customizationId) Description: Deletes a customization. > **Notes:** > + **Options** (customizations with `customizationType: PRODUCT_OPTION`) can't be deleted while assigned to any product because they affect product variants and inventory. > + **Modifiers** can be deleted freely. When deleted, they are automatically removed from all products that reference them. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: customizationId Method parameters: param name: customizationId | type: string | description: Customization GUID. | required: true Return type: PROMISE EMPTY-OBJECT {} Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NOT_ALLOWED_DELETE_CUSTOMIZATION_ASSIGNED_TO_PRODUCT | Description: Product option customization is assigned to 1 or more products. Remove the customization from all products before deleting. ``` ### Examples ### deleteCustomization ```javascript import { customizationsV3 } from '@wix/stores'; async function deleteCustomization(customizationId) { const response = await customizationsV3.deleteCustomization(customizationId); }; ``` ### deleteCustomization (with elevated permissions) ```javascript import { customizationsV3 } from '@wix/stores'; import { auth } from '@wix/essentials'; async function myDeleteCustomizationMethod(customizationId) { const elevatedDeleteCustomization = auth.elevate(customizationsV3.deleteCustomization); const response = await elevatedDeleteCustomization(customizationId); } ``` ### deleteCustomization (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 { customizationsV3 } from '@wix/stores'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { customizationsV3 }, // Include the auth strategy and host as relevant }); async function deleteCustomization(customizationId) { const response = await myWixClient.customizationsV3.deleteCustomization(customizationId); }; ``` ---