> For the complete documentation index, see [llms.txt](https://docs.digitalriver.com/commerce-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalriver.com/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/retiring-a-product.md).

# Retiring a product

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](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/deleting-a-product-variation.md) associated with a base product.

You can find a retired product by sending a [`GET /v1/products/{productId or ERID}?version=RETIRED`](https://docs.digitalriver.com/commerce-api-references/admin-apis/product-management/retrieve-a-product-synchronous-api#v1-products-productid) request or [searching for the retired product](https://help.digitalriver.com/help/gc/Products/All-Products/Editing-a-product.htm#HowToSearchForProduct) in [Global Commerce](https://gc.digitalriver.com/gc/ent/login.do). The shoppers visiting your store cannot see or purchase the retired product.&#x20;

{% hint style="info" %}
Here are a few notes regarding retired products:

* The retired product remains in your catalog, where you can [get the product's attributes](/commerce-api/shopper-apis/product-discovery/products.md#getting-a-product-by-identifier). You can use the attributes in the response to [create](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/creating-or-updating-a-product.md) and [deploy a new product](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/deploying-a-product.md) 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.&#x20;
* [Global Commerce](https://gc.digitalriver.com/gc/ent/login.do) does not maintain the stock status for a retired product, so it does not display its current inventory number.
  {% endhint %}

The following [`POST /v1/products/{productId or ERID}/retire`](https://docs.digitalriver.com/commerce-api-references/admin-apis/product-management/manage-products-asynchronous-api#v1-products-productid-retire) request retires the specified product. To retire a specific product, you must provide either a  [`productId`](https://docs.digitalriver.com/commerce-api-references/commerce-api-reference-guide/api-structure/product-identifier) or [`ERID`](https://docs.digitalriver.com/commerce-api-references/commerce-api-reference-guide/api-structure/product-external-reference-identifier-erid).&#x20;

{% hint style="info" %}
Duplicate ERIDs are not allowed. To prevent duplicate ERIDs, [enable the Enforce Unique Value](https://docs.digitalriver.com/commerce-api-references/commerce-api-reference-guide/api-structure/product-external-reference-identifier-erid#enabling-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.
{% endhint %}

{% tabs %}
{% tab title="cURL" %}
The following example retires a specific product with a `productId`.

```http
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.

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

{% endtab %}

{% tab title="202 Accepted response" %}
The request returns a task identifier (`taskId`) in the [asynchronous ](/commerce-api/admin-apis/product-management/getting-started.md#asynchronous-and-synchronous-calls)response.

```json
{
    "taskId": "4ea32c9b-2019-4421-863c-1acfb794033c",
    "requestType": "RETIRE_PRODUCT",
    "taskStatus": "PUBLISHED",
    "receivedTime": "2022-08-24T19:31:56.434Z"
}
```

Use the `taskId` in the response to [verify the successful completion of the request](/commerce-api/admin-apis/product-management/get-the-task-status-for-a-product-synchronous-api/getting-the-latest-information-on-a-product-task.md). You can also verify the successful completion of the task by [checking the product history](#product-history-attributes) in [Global Commerce](https://gc.digitalriver.com/gc/ent/login.do). Note that there may be a delay before these changes appear in Global Commerce.&#x20;
{% endtab %}
{% endtabs %}

## 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](https://gc.digitalriver.com/gc/ent/login.do).
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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digitalriver.com/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/retiring-a-product.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
