---
title: "Export a passport's EPCIS events"
description: "Export one passport's full event history as a standards-valid GS1 EPCIS 2.0 EPCISDocument (JSON-LD). Drops straight into any EPCIS-aware tool."
canonical: "https://www.tracepass.eu/docs/passport-epcis-export"
locale: en
source: "https://www.tracepass.eu/docs/passport-epcis-export"
---

# Export a passport's EPCIS events

> Export one passport's full event history as a standards-valid GS1 EPCIS 2.0 EPCISDocument (JSON-LD). Drops straight into any EPCIS-aware tool.

```http
GET /api/v1/passports/{id}/epcis
```

Exports one passport's full event history — supply-chain, service, ownership, and captured events — as a single standards-valid GS1 EPCIS 2.0 `EPCISDocument` in JSON-LD. The document carries the GS1 `@context`, `type: "EPCISDocument"`, `schemaVersion: "2.0"`, and an `epcisBody.eventList` of every event TracePass holds for the passport. The passport's Digital Link URI is the EPC on each event, so the export drops straight into any EPCIS-aware repository or auditor toolchain.

Alternate addressing: `GET /api/v1/passports/by-serial/{serial}/epcis` returns the same EPCISDocument for a passport addressed by its serial number instead of its ID — handy when your systems key on the GS1 serial rather than the TracePass ObjectId. Counts as one passport read.

EPCIS export is available on Starter plans and up: on a plan without it the endpoint returns `403 {"error":"epcis_export_not_available"}`. An unknown passport id returns `404`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Authorization` | header | string | yes | `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. |
| `id` | path | ObjectId | yes | Passport ID. Use `GET /api/v1/passports/by-serial/{serial}/epcis` to address the passport by its GS1 serial number instead. |

## Examples

```bash
# By passport ID
curl -sS https://app.tracepass.eu/api/v1/passports/6650b2c3d4e5f6a7b8c9d0e1/epcis \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx"

# By GS1 serial number
curl -sS https://app.tracepass.eu/api/v1/passports/by-serial/BP-48V-100-000001/epcis \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx"
```

```typescript
const res = await fetch(
  `https://app.tracepass.eu/api/v1/passports/${passportId}/epcis`,
  { headers: { Authorization: `Bearer ${process.env.TRACEPASS_API_KEY}` } },
);
if (res.status === 404) return null;
const epcisDocument = await res.json(); // EPCISDocument, schemaVersion 2.0
console.log(epcisDocument.epcisBody.eventList.length, "events");
```

```python
import os, requests

res = requests.get(
    f"https://app.tracepass.eu/api/v1/passports/{passport_id}/epcis",
    headers={"Authorization": f"Bearer {os.environ['TRACEPASS_API_KEY']}"},
)
res.raise_for_status()
epcis_document = res.json()  # EPCISDocument, schemaVersion 2.0
print(len(epcis_document["epcisBody"]["eventList"]), "events")
```

## Responses

### 200 — OK

```json
{
  "@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" }
      }
    ]
  }
}
```

### 401 — Missing API key

```json
{ "error": "Missing or invalid API key" }
```

### 403 — Not on plan

```json
{ "error": "epcis_export_not_available" }
```

### 404 — Not found

```json
{ "error": "Passport not found" }
```

## Related

- [Query EPCIS events](https://www.tracepass.eu/docs/query-events.md)
- [Bulk JSON-LD tenant export](https://www.tracepass.eu/docs/tenant-export.md)
