Deleting a product variation

Learn how to delete a product programmatically.

The request returns a task identifier (taskId) in the asynchronous response. You cannot delete a base or individual product. You must retire the product to make a base or individual product unavailable to the shopper. However, you can delete a product variation or locale.

Deleting a specific product variation

The following DELETE /v1/products/variations/{variationProductId or variationERID} request deletes the specified product variation. To delete a product variation for a particular base product, you must provide the variationProductId or variationERID. If the request finds multiple products associated with the variationERID, the response will delete all of them.

Duplicate ERIDs are not allowed. To prevent duplicate ERIDs, enable the Enforce Unique Value when configuring company settings in Global Commerce to ensure that you won't accidentally provide an ERID that would result in duplicate products in the response if you searched for a product by ERID.

The following example deletes a specific product variation with a productId.

curl --location --request DELETE '{variationProductId}' \
--header 'Authorization: Basic <API_key>' \

An ERID request requires the x-erid-as-pid=true header.

curl --location --request DELETE '{variationERID}' \
--header 'Authorization: Basic <API_key>' \
--header 'header x-erid-as-pid=true' \

Verifying the deletion of a product variation in Global Commerce

When you delete a product variation, that product variation will no longer appear associated with the base product in Global Commerce.

  1. Sign in to Global Commerce.

  2. Select Catalog, select Products, and then click Manage Products. The Products page appears.

  3. Click the Search tab, select Product from the Search In drop-down list, and choose ID from the Search By list. Enter the product identifier or ERID for the base product in the Search For field, then click Search.

  4. Click the link for the base product under the Internal Product Name column. The Edit Product page appears.

  5. Click the Details tab and verify the deleted product variation no longer appears under the Choose a Product column.

Last updated