TracePass
Reference

Passports

Create, update, suspend, archive, and bulk-import Digital Product Passports. Includes the parties block for economic-operator chains.

POST/api/v1/passports

Create a passport

Create a single Digital Product Passport. The passport is bound to a product (productId) and identified by a GS1 GTIN + serial number that's unique within that GTIN. New passports start in `draft` status — fields are populated via subsequent PATCH calls and the passport is published from the dashboard once review is complete.

GET/api/v1/passports/{id}

Get a single passport

Read one passport by ID. Default response includes the full passport — translatable fields carry their `sourceLocale` and a per-locale `translations` map. Pass `?lang=<locale>` to have the server resolve every field through the public-viewer chain (viewer-locale translation → source-locale value → English → first-applied → universal source) and return one resolved value per field; the `translations` map is dropped from lang-resolved responses.

GET/api/v1/passports

List passports

Paginated list of passports the workspace owns. Filter by `productId`, `status`, or a free-text search across GTIN and serial number. Counts against the daily passport-read budget (`maxV1PassportsPerDay`); the response items use the same shape as the single-read endpoint but trimmed to the listing fields.

PATCH/api/v1/passports/{id}/fields/{key}

Update one field on a passport

Patch a single field on a passport. The value is validated against the field key (must exist on the passport's template) and persisted with an audit trail entry tagged `via API key <prefix>`. Use this in preference to writing the whole `fields` map when you only need to update one number — it's a smaller write and the per-field audit entry is what dashboard reviewers see.

PATCH/api/v1/passports/{id}/parties/{role}

Upsert an economic-operator party

Create or replace the Party for a single role on a passport. The role path segment determines the slot you're writing — `manufacturer`, `importer`, `authorisedRepresentative`, `distributor`, `recycler`, `producerResponsibilityOrg`. Sending the same role twice is an upsert: the existing block is replaced atomically.

POST/api/v1/passports/{id}/suspend

Suspend a passport

Reversible suspend. The public viewer flips to the suspended state page (HTTP 423 with structured body); QR scans effectively die without the URL going to 404. Use for recalls, disputes, internal holds, or product-quality investigations. Republish from the dashboard once resolved.

POST/api/v1/passports/{id}/archive

Archive a passport (irreversible)

**Irreversible.** Public viewer returns 404, the GS1 Digital Link URL stops resolving, the QR code dies for good. Use ONLY for products that never shipped — archiving a passport for a product already in customers' hands breaks every QR scan they'll ever make of it.

POST/api/v1/passports/batch

Batch-create passports

Create up to 100 passports in one call. Each item carries the same body shape as the single-create endpoint (`{ productId, gs1: { gtin, serialNumber }, parties?, confirmOverage? }`). Partial-success per item — each gets its own status in the response array.