> 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 # BulkDeleteProducts # Package: suppliersHub # Namespace: MarketplaceProduct # Method link: https://dev.wix.com/docs/api-reference/business-solutions/suppliers-hub/products/bulk-delete-products.md ## Permission Scopes: Write Marketplace: SCOPE.SUPPLIERS_HUB.WRITE_MARKETPLACE ## Introduction Deletes multiple products permanently in a single request. Supports partial success. Each result includes an `itemMetadata` object indicating success or failure with error details. When handling failures, distinguish between validation errors which shouldn't be retried, and transient errors which can be retried. Only retry failed items, not the entire batch. --- ## REST API ### Schema ``` Method: bulkDeleteProducts Description: Deletes multiple products permanently in a single request. Supports partial success. Each result includes an `itemMetadata` object indicating success or failure with error details. When handling failures, distinguish between validation errors which shouldn't be retried, and transient errors which can be retried. Only retry failed items, not the entire batch. URL: https://www.wixapis.com/suppliers-hub/v1/bulk/products/delete Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: productIds Method parameters: param name: productIds | type: array | description: Product GUIDs to delete. | required: true Return type: BulkDeleteProductsResponse - name: results | type: array | description: Results - name: itemMetadata | type: ItemMetadata | description: Metadata regarding the specific single delete operation - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible. For example, when failing to create an item. - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata regarding the bulk delete operation - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### Bulk delete products Permanently deletes multiple products in a single request ```curl curl -X POST \ 'https://www.wixapis.com/suppliers-hub/v1/bulk/products/delete' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d '{ "productIds": [ "e424dda7-2041-4cb4-a554-6b79fb18cef7", "f88c6051-2e5b-4db2-9f89-2629893ea5f3" ] }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.suppliersHub.MarketplaceProduct.bulkDeleteProducts(productIds) Description: Deletes multiple products permanently in a single request. Supports partial success. Each result includes an `itemMetadata` object indicating success or failure with error details. When handling failures, distinguish between validation errors which shouldn't be retried, and transient errors which can be retried. Only retry failed items, not the entire batch. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: productIds Method parameters: param name: productIds | type: array | description: Product GUIDs to delete. | required: true Return type: PROMISE - name: results | type: array | description: Results - name: itemMetadata | type: ItemMetadata | description: Metadata regarding the specific single delete operation - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible. For example, when failing to create an item. - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata regarding the bulk delete operation - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### bulkDeleteProducts ```javascript import { products } from '@wix/suppliers-hub'; async function bulkDeleteProducts(productIds) { const response = await products.bulkDeleteProducts(productIds); }; ``` ### bulkDeleteProducts (with elevated permissions) ```javascript import { products } from '@wix/suppliers-hub'; import { auth } from '@wix/essentials'; async function myBulkDeleteProductsMethod(productIds) { const elevatedBulkDeleteProducts = auth.elevate(products.bulkDeleteProducts); const response = await elevatedBulkDeleteProducts(productIds); } ``` ### bulkDeleteProducts (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 { products } from '@wix/suppliers-hub'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { products }, // Include the auth strategy and host as relevant }); async function bulkDeleteProducts(productIds) { const response = await myWixClient.products.bulkDeleteProducts(productIds); }; ``` ---