TracePass
EPCIS 2.0

Capture EPCIS events

The GS1 EPCIS 2.0 Capture interface. Submit supply-chain events from partners, ERP systems, or shop-floor scanners and TracePass attaches them to the matching passports. The request body accepts four shapes: a full EPCISDocument, an EPCISQueryDocument, a single bare event, or a bare JSON-LD array of events. Send Content-Type: application/ld+json.

POST/api/v1/epcis/capture
Download OpenAPI 3.1
POST/api/v1/epcis/capture

Capture EPCIS events

The GS1 EPCIS 2.0 Capture interface. Submit supply-chain events from partners, ERP systems, or shop-floor scanners and TracePass attaches them to the matching passports. The request body accepts four shapes: a full EPCISDocument, an EPCISQueryDocument, a single bare event, or a bare JSON-LD array of events. Send Content-Type: application/ld+json.

Each event is checked for structural validity (required envelope keys, mandatory event fields, epcList presence), then each EPC in epcList / quantityList is resolved to a passport in your workspace. Valid events are stored and the call returns 202 Accepted with a captureJobId. Processing completes before the response is sent; the 202 status reflects EPCIS 2.0 capture-interface convention. Counts as one v1 write regardless of how many events the document carries.

Volume metered against the plan's maxEpcisEventsPerMonth (1,000 on Basic up to 10,000,000 on Pro, 10 on Free, unlimited on Enterprise). When a single capture call would push the period total over the cap on a paid plan the endpoint returns 402 {"error":"epcis_events_overage_required"} with overageBlocks + totalOverageCents populated — retry the same call with "confirmOverage":true in the body to opt into the per-1,000-event block charge. On Free the same overflow returns 402 {"error":"epcis_events_hard_block"} with an upgrade CTA; no per-block overage path. The call is idempotent two ways — supply an Idempotency-Key header to make the whole request replay-safe, and the platform additionally de-duplicates on each event's EPCIS eventID, so re-sending a document that overlaps a prior capture will not double-store events or double-count against the meter.

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 — replaying the same key returns the original capture result. Independent of the per-event eventID de-duplication.

Body fields

  • bodyrequired

    EPCISDocument | EPCISQueryDocument | EPCISEvent | EPCISEvent[]

    JSON-LD payload sent with Content-Type: application/ld+json. Accepts a full EPCISDocument, an EPCISQueryDocument, a bare event, or a bare array of events.

  • confirmOverage

    boolean

    Opt-in flag to accept the per-1,000-event block overage charge when a capture would exceed maxEpcisEventsPerMonth. Without it, the first over-cap call returns 402 with overageBlocks + totalOverageCents in the body — re-send the same payload with confirmOverage:true to acknowledge the charge and proceed. Free tier has no overage path; the upgrade-required hard block ignores this flag.

    e.g. true

Request

curl -sS -X POST https://app.tracepass.eu/api/v1/epcis/capture \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx" \
  -H "Idempotency-Key: 7b4f1e2c-9a3d-4e5b-8c1a-2d3e4f5a6b7c" \
  -H "Content-Type: application/ld+json" \
  -d '{
    "@context": "https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld",
    "type": "EPCISDocument",
    "schemaVersion": "2.0",
    "creationDate": "2026-05-09T12:00:00.000Z",
    "epcisBody": {
      "eventList": [
        {
          "type": "ObjectEvent",
          "eventID": "ni:///sha-256;9f86d0...?ver=CBV2.0",
          "eventTime": "2026-05-09T11:58:00.000Z",
          "eventTimeZoneOffset": "+02:00",
          "epcList": ["https://id.tracepass.eu/p/01/04012345000016/21/BP-48V-100-000001"],
          "action": "OBSERVE",
          "bizStep": "shipping",
          "bizLocation": { "id": "https://id.tracepass.eu/loc/acme-batteries-de" }
        }
      ]
    }
  }'

Response

{
  "captureJobId": "6650c4d5e6f7a8b9c0d1e2f3",
  "status": "success",
  "eventCount": 1,
  "capturedCount": 1,
  "errors": []
}