---
title: EPCIS-Ereignisse eines Passes exportieren
description: Vollständige Ereignishistorie eines Passes als standardkonformes GS1 EPCIS 2.0 EPCISDocument (JSON-LD) exportieren. Direkt in EPCIS-Tools nutzbar.
canonical: "https://www.tracepass.eu/de/docs/passport-epcis-export"
locale: de
source: "https://www.tracepass.eu/de/docs/passport-epcis-export"
---

# EPCIS-Ereignisse eines Passes exportieren

> Vollständige Ereignishistorie eines Passes als standardkonformes GS1 EPCIS 2.0 EPCISDocument (JSON-LD) exportieren. Direkt in EPCIS-Tools nutzbar.

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

Exportiert die vollständige Ereignishistorie eines Passes — Lieferketten-, Service-, Eigentums- und erfasste Ereignisse — als ein einziges standardkonformes GS1-EPCIS-2.0-`EPCISDocument` in JSON-LD. Das Dokument trägt den GS1-`@context`, `type: "EPCISDocument"`, `schemaVersion: "2.0"` und eine `epcisBody.eventList` mit jedem Ereignis, das TracePass für den Pass hält. Die Digital-Link-URI des Passes ist der EPC jedes Ereignisses, sodass sich der Export direkt in jedes EPCIS-fähige Repository oder Auditor-Toolchain einfügt.

Alternative Adressierung: `GET /api/v1/passports/by-serial/{serial}/epcis` liefert dasselbe EPCISDocument für einen über seine Seriennummer statt seine ID adressierten Pass — praktisch, wenn Ihre Systeme auf die GS1-Seriennummer statt auf die TracePass-ObjectId schlüsseln. Zählt als ein Pass-Lesevorgang.

Der EPCIS-Export ist ab den Starter-Plänen verfügbar: auf einem Plan ohne ihn liefert der Endpoint `403 {"error":"epcis_export_not_available"}`. Eine unbekannte Pass-id liefert `404`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Authorization` | header | string | yes | `Bearer <token>` — entweder ein `tp_` API-Schlüssel (Developer → API Keys; am einfachsten, für Server-zu-Server) oder ein OAuth-2.0-Access-Token (Developer → OAuth Apps; für nutzerautorisierte Apps, scoped und widerrufbar). Die Authentication-Seite enthält den vollständigen OAuth-Flow und die Scope-Liste. |
| `id` | path | ObjectId | yes | Pass-ID. Verwenden Sie `GET /api/v1/passports/by-serial/{serial}/epcis`, um den Pass stattdessen über seine GS1-Seriennummer zu adressieren. |

## 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 — API-Schlüssel fehlt

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

### 403 — Nicht im Plan

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

### 404 — Nicht gefunden

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

## Related

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