Archive & Unarchive Product
4/7/26Less than 1 minute
Archive & Unarchive Product
Description
These APIs allow merchants to manage the visibility of their products without permanently deleting them.
- Archiving a product hides it from the public storefront while retaining all its data, associations, and historical records.
- Unarchiving restores a previously archived product, making it visible to customers again.
[!IMPORTANT]
By default, archived products are not returned by the Fetch Products API. This ensures that customers only see active products in the storefront.
1. Archive Product
Endpoint
PATCH /v2/products/{productId}/archive
Required Headers
{
"Authorization": "Bearer JWT_TOKEN",
"X-MerchantApiKey": "MERCHANT_API_KEY",
"Content-Type": "application/json"
}π₯ Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
productId | string | Yes | The unique identifier of the product to archive. |
β Sample 200 Response (Success)
{
"status": true,
"message": "Product archived successfully",
"data": {
"id": "prod-123",
"name": "LG 45 Inch TV",
"isArchived": true
}
}2. Unarchive Product
Endpoint
PATCH /v2/products/{productId}/unarchive
Required Headers
{
"Authorization": "Bearer JWT_TOKEN",
"X-MerchantApiKey": "MERCHANT_API_KEY",
"Content-Type": "application/json"
}π₯ Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
productId | string | Yes | The unique identifier of the product to unarchive. |
β Sample 200 Response (Success)
{
"status": true,
"message": "Product unarchived successfully",
"data": {
"id": "prod-123",
"name": "LG 45 Inch TV",
"isArchived": false
}
}