---
title: Archive a product
description: Soft-archive a product — hidden from listings, blocks new passports. Existing passports keep resolving. Reversible. 409 if non-archived passports remain.
canonical: "https://www.tracepass.eu/docs/archive-product"
locale: en
source: "https://www.tracepass.eu/docs/archive-product"
---

# Archive a product

> Soft-archive a product — hidden from listings, blocks new passports. Existing passports keep resolving. Reversible. 409 if non-archived passports remain.

```http
POST /api/v1/products/{id}/archive
```

Soft-archive. `Product.status` flips to `archived`; the product disappears from default listings (still visible with the `?showArchived=true` filter). Existing passports keep resolving — archive blocks NEW passport creation against this product going forward, it doesn't break any QR already in customers' hands.

Returns `409 Conflict` when any non-archived passport still references the product — archive every passport first, then re-call this endpoint. Available on every paid plan. Counts as one v1 write. Honours `Idempotency-Key`.

There's no DELETE verb here at the same path: `DELETE /api/v1/products/{id}` is the hard-delete endpoint, with stricter eligibility (zero passports of any status). Archive is the safe-default cleanup verb.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Authorization` | header | string | yes | `Bearer <token>` — either a `tp_` API key (Developer → API Keys; simplest, for server-to-server) or an OAuth 2.0 access token (Developer → OAuth Apps; for user-authorized apps, scoped + revocable). The Authentication page has the full OAuth flow and scope list. |
| `Idempotency-Key` | header | string | no | UUID v4. |
| `id` | path | ObjectId | yes | Product ID. |

## Examples

```bash
curl -sS -X POST \
  https://app.tracepass.eu/api/v1/products/6650b2c3d4e5f6a7b8c9d0e1/archive \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx"
```

```typescript
await fetch(
  `https://app.tracepass.eu/api/v1/products/${id}/archive`,
  {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.TRACEPASS_API_KEY}` },
  },
);
```

```python
import os, requests
res = requests.post(
    f"https://app.tracepass.eu/api/v1/products/{product_id}/archive",
    headers={"Authorization": f"Bearer {os.environ['TRACEPASS_API_KEY']}"},
)
res.raise_for_status()
```

## Responses

### 200 — Archived

```json
{
  "_id": "6650b2c3d4e5f6a7b8c9d0e1",
  "name": "Demo product",
  "status": "archived",
  "updatedAt": "2026-05-23T17:00:00.000Z"
}
```

### 409 — Active passports

```json
{
  "error": "Cannot archive product with 3 active passport(s). Archive every passport first."
}
```

### 404 — Not found

```json
{ "error": "Product not found" }
```

## Related

- [Delete a product permanently](https://www.tracepass.eu/docs/delete-product.md)
- [Update product](https://www.tracepass.eu/docs/update-product.md)
