Retiring a product

Learn how to retire a product programmatically.

You can retire a base or individual product when you no longer need it. However, you cannot delete the product. You can only delete product variations associated with a base product.

You can find a retired product by sending a GET /v1/products/{productId or ERID}?version=RETIRED request or searching for the retired product in Global Commerce. The shoppers visiting your store cannot see or purchase the retired product.

Here are a few notes regarding retired products:

  • The retired product remains in your catalog, where you can get the product's attributes. You can use the attributes in the response to create and deploy a new product with similar details. If you edit a retired product, it goes into a design state where you can apply the change and then deploy the updated product.

  • Global Commerce does not maintain the stock status for a retired product. Therefore, it does not display the current inventory number for the retired product.

The following POST /v1/products/{productId or ERID}/retire request retires the specified product. To retire a specific product, you must provide either a productId or ERID.

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 retires a specific product with a productId.

curl --location --request POST 'https://api.digitalriver.com/v1/products/{productID}/retire' \
--header 'Authorization: Basic <API_key>' \
...

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

curl --location --request POST 'https://api.digitalriver.com/v1/products/{ERID}/retire' \
--header 'Authorization: Basic <API_key>' \
--header 'header x-erid-as-pid=true' \
...

Verifying the retirement of a product in Global Commerce

When you retire an individual or base product, that product will be marked as retired 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 in the Search For field, then click Search.

  4. Click the link for the product under the Internal Product Name column. The Edit Product page appears, and (Retired) will appear after the product name at the top of the page.

Last updated