> 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 # DeleteVariant # Package: items # Namespace: VariantsService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/menus/items/item-variants/delete-variant.md ## Permission Scopes: Manage Restaurants - all permissions: SCOPE.RESTAURANTS.MEGA-SCOPES ## Introduction > **Note:** The Item Variants API only works with the Wix Restaurants Menus app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). Permanently deletes an item variant. --- ## REST API ### Schema ``` Method: deleteVariant Description: > **Note:** The Item Variants API only works with the Wix Restaurants Menus app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). Permanently deletes an item variant. URL: https://www.wixapis.com/restaurants/menus/v1/variants/{variantId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: variantId Method parameters: param name: variantId | type: none | required: true Return type: DeleteVariantResponse EMPTY-OBJECT {} ``` ### Examples ### Delete a variant ```curl curl -X DELETE https://www.wixapis.com/restaurants/item-variants/v1/variants/cbbf4358-292c-4e9e-a820-7e75b4551120 \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.items.VariantsService.deleteVariant(variantId) Description: > **Note:** The Item Variants API only works with the Wix Restaurants Menus app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). Permanently deletes an item variant. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: variantId Method parameters: param name: variantId | type: string | description: Item variant GUID. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteVariant ```javascript import { itemVariants } from '@wix/restaurants'; async function deleteVariant(variantId) { const response = await itemVariants.deleteVariant(variantId); }; ``` ### deleteVariant (with elevated permissions) ```javascript import { itemVariants } from '@wix/restaurants'; import { auth } from '@wix/essentials'; async function myDeleteVariantMethod(variantId) { const elevatedDeleteVariant = auth.elevate(itemVariants.deleteVariant); const response = await elevatedDeleteVariant(variantId); } ``` ### deleteVariant (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 { itemVariants } from '@wix/restaurants'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { itemVariants }, // Include the auth strategy and host as relevant }); async function deleteVariant(variantId) { const response = await myWixClient.itemVariants.deleteVariant(variantId); }; ``` ---