TracePass
Products

Archive a product

Soft-archive. Product.status flips to archived; the change is one-way (no endpoint unarchives a product). Archived products still appear in GET /api/v1/products; pass status=active to leave them out. Allowed only once every passport of the product is archived (409 otherwise) — and archiving a product does not prevent new passport creation against it.

POST/api/v1/products/{id}/archive
Download OpenAPI 3.1
POST/api/v1/products/{id}/archive

Archive a product

Soft-archive. Product.status flips to archived; the change is one-way (no endpoint unarchives a product). Archived products still appear in GET /api/v1/products; pass status=active to leave them out. Allowed only once every passport of the product is archived (409 otherwise) — and archiving a product does not prevent new passport creation against it.

Returns 409 Conflict when any non-archived passport still references the product — archive every passport first, then re-call this endpoint. Available on every plan, Free included. 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.

Path parameters

  • idrequired

    string (24 hex chars)

    Product ID.

Headers

  • Authorizationrequired

    string

    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.

    e.g. Bearer tp_REDACTED_xxxxxxxxxxxx

  • Idempotency-Key

    string

    UUID v4.

Request

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

Response

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