---
title: "Archive a product."
method: POST
path: "/api/v1/products/{id}/archive"
tags: ["Products"]
---

# Archive a product.

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

## Request

- Base URL: `https://app.tracepass.eu`
- URL: `https://app.tracepass.eu/api/v1/products/{id}/archive`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.tracepass.eu/api/oauth/authorize`, token URL `https://app.tracepass.eu/api/oauth/token`, scopes: `passports:write`)

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 when any non-archived passport still references
the product. Honours `Idempotency-Key`.

## Response `200`

Archived.

- Product
  - `_id` string: MongoDB ObjectId hex string (24 chars).
  - `name` string
  - `model` string
  - `category` string
  - `templateId` string: MongoDB ObjectId hex string (24 chars).
  - `defaultFieldValues` object: Seed values for passports created from this product, keyed by template field. Each value is checked against the template: a numeric string for a number field is stored as a number, and any other value the template rejects answers 400 `Invalid default field values` with `details` (in a batch, that item's result is an error).
  - `imageUrls` string[]
  - `passportCount` integer
  - `status` 'active' | 'archived'
  - `sourceLocale` string
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `401`: Missing or invalid API key.
- `404`: Resource doesn't exist or is in a different workspace.
- `409`: Product still has non-archived passports.
- `429`: Daily v1 write or passport-read budget exhausted. Resets at 00:00 UTC.

---

[API](https://skmtc.dev/tracepass/apis/tracepass-api.md) · [All operations](https://skmtc.dev/tracepass/apis/tracepass-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tracepass/apis/tracepass-api/revisions/60ddeb25638b?raw)
