TracePass
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.

POST/api/v1/passports
Download OpenAPI 3.1
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.

GTIN must be 14 digits with a valid GS1 check digit and not yet registered to another tenant. Counts as one v1 write AND consumes one DPP slot from your plan's `maxDpps` quota — when that quota is exhausted and your plan supports overage, the call returns 402 with an `overage_required` body; retry with `confirmOverage: true` to accept the per-passport charge.

Honours the optional `Idempotency-Key` header — the platform replays the original 201 response for 24 hours on the same key, so a network retry is safe.

Headers

  • Authorizationrequired

    string

    `Bearer <api-key>`. Mint keys at Developer → API keys (every plan, including Free; per-day call cap scales with the plan).

    e.g. Bearer tp_REDACTED_xxxxxxxxxxxx

  • Idempotency-Key

    string

    UUID v4 (or any opaque string ≤ 255 chars) per logical operation. The first response is replayed for 24 hours.

Body fields

  • productIdrequired

    ObjectId

    ID of the product the passport belongs to. Must belong to the API key's company.

    e.g. 6650a1b2c3d4e5f6a7b8c9d0

  • gs1.gtinrequired

    string (14 digits)

    GTIN-14 with a valid GS1 check digit. Must not already be registered by another tenant.

    e.g. 04012345000015

  • gs1.serialNumberrequired

    string (1-100 chars)

    Serial unique within the GTIN. The most common pattern is the product model + a sequence (BP-48V-100-000001).

    e.g. BP-48V-100-000001

  • parties

    Record<role, Party>

    Optional structural parties block. A map keyed by role — `manufacturer`, `importer`, `authorisedRepresentative`, `distributor`, `recycler`, `producerResponsibilityOrg`. Each value is a Party. See the Upsert party endpoint for the per-Party body shape. Roles can also be added or replaced after creation via PATCH /api/v1/passports/{id}/parties/{role}.

  • confirmOverage

    boolean

    Accept the per-passport overage charge when the plan's `maxDpps` quota is already exhausted. Required only after a 402 response on a previous attempt.

Request

curl -sS https://app.tracepass.eu/api/v1/passports \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx" \
  -H "Idempotency-Key: 7b4f1e2c-9a3d-4e5b-8c1a-2d3e4f5a6b7c" \
  -H "Content-Type: application/json" \
  -d '{
    "productId": "6650a1b2c3d4e5f6a7b8c9d0",
    "gs1": {
      "gtin": "04012345000015",
      "serialNumber": "BP-48V-100-000001"
    }
  }'

Response

{
  "_id": "6650b2c3d4e5f6a7b8c9d0e1",
  "companyId": "6650a0b1c2d3e4f5a6b7c8d9",
  "productId": "6650a1b2c3d4e5f6a7b8c9d0",
  "templateId": "6650a1b2c3d4e5f6a7b8c9d1",
  "gs1": {
    "gtin": "04012345000015",
    "serialNumber": "BP-48V-100-000001",
    "digitalLinkUri": "https://id.tracepass.eu/p/01/04012345000015/21/BP-48V-100-000001"
  },
  "status": "draft",
  "completionPercentage": 32,
  "fieldCounts": {
    "total": 52,
    "empty": 35,
    "approved": 17,
    "pendingReview": 0,
    "flagged": 0
  },
  "fields": { "...": "...seeded from product defaults + template defaults + company prefill..." },
  "createdAt": "2026-05-09T10:00:00.000Z"
}