> 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 # DeleteGiftCardProduct # Package: giftCards # Namespace: GiftCardProductService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/gift-cards/gift-card-products/delete-gift-card-product.md ## Permission Scopes: Manage eCommerce - all permissions: SCOPE.DC-ECOM-MEGA.MANAGE-ECOM ## Introduction Deletes a gift card product. Gift cards that were already purchased from the deleted product remain valid. --- ## REST API ### Schema ``` Method: deleteGiftCardProduct Description: Deletes a gift card product. Gift cards that were already purchased from the deleted product remain valid. URL: https://www.wixapis.com/gift-cards/v1/gift-card-products/{giftCardProductId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: giftCardProductId Method parameters: param name: giftCardProductId | type: none | required: true Return type: DeleteGiftCardProductResponse EMPTY-OBJECT {} ``` ### Examples ### Delete Gift Card Product Deletes a gift card product by ID. ```curl curl -X DELETE \ 'https://www.wixapis.com/gift-cards/v1/gift-card-products/9041ce44-2efe-4d07-a3ae-b7084be31339' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.giftCards.GiftCardProductService.deleteGiftCardProduct(giftCardProductId) Description: Deletes a gift card product. Gift cards that were already purchased from the deleted product remain valid. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: giftCardProductId Method parameters: param name: giftCardProductId | type: string | description: GUID of the gift card product to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteGiftCardProduct ```javascript import { giftVoucherProducts } from '@wix/gift-vouchers'; async function deleteGiftCardProduct(giftCardProductId) { const response = await giftVoucherProducts.deleteGiftCardProduct(giftCardProductId); }; ``` ### deleteGiftCardProduct (with elevated permissions) ```javascript import { giftVoucherProducts } from '@wix/gift-vouchers'; import { auth } from '@wix/essentials'; async function myDeleteGiftCardProductMethod(giftCardProductId) { const elevatedDeleteGiftCardProduct = auth.elevate(giftVoucherProducts.deleteGiftCardProduct); const response = await elevatedDeleteGiftCardProduct(giftCardProductId); } ``` ### deleteGiftCardProduct (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 { giftVoucherProducts } from '@wix/gift-vouchers'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { giftVoucherProducts }, // Include the auth strategy and host as relevant }); async function deleteGiftCardProduct(giftCardProductId) { const response = await myWixClient.giftVoucherProducts.deleteGiftCardProduct(giftCardProductId); }; ``` ---