---
title: Bulk-JSON-LD-Mandantenexport
description: Vollständiger Workspace-Export als ein JSON-LD-Dokument — jedes Produkt, jeder Pass, jede Template-Referenz. Nur Dashboard-JWT (Admin-Rolle); kein API-Key.
canonical: "https://www.tracepass.eu/de/docs/tenant-export"
locale: de
source: "https://www.tracepass.eu/de/docs/tenant-export"
---

# Bulk-JSON-LD-Mandantenexport

> Vollständiger Workspace-Export als ein JSON-LD-Dokument — jedes Produkt, jeder Pass, jede Template-Referenz. Nur Dashboard-JWT (Admin-Rolle); kein API-Key.

```http
GET /api/exports/tenant
```

Gibt jedes Produkt, jeden Pass (unabhängig vom Status) und jede referenzierte Kategorienvorlage des Workspaces als ein JSON-LD-Dokument zurück. Die Form spiegelt die per-Pass-JSON-LD-Emission des öffentlichen Pass-Viewers, eingebettet in einen Tenant-Envelope mit Metadaten zum Exportlauf.

**Nicht über API-Schlüssel erreichbar.** Auth ist Dashboard-JWT (Admin-Rolle) + Paying-Customer-Gate — gleiches Vertrauen wie das Löschen der Firma. Der pragmatische Flow ist: Settings → Data export im Dashboard öffnen und „Export tenant“ klicken. Programmatischer Zugriff erfordert ein Session-Cookie aus `/api/auth/login`.

Synchrone Antwort mit `Content-Disposition: attachment; filename="tracepass-tenant-export-<companyId>-<YYYY-MM-DD>.jsonld"`. Enthält Evidenz-Dokument-URLs, aber nicht die Dokument-Bytes selbst; laden Sie diese separat herunter, falls Sie Offline-Kopien benötigen. Keine Paginierung — alles oder nichts.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Cookie` | header | string | yes | Dashboard-Session-Cookie (`tp_session=...`), ausgestellt von `/api/auth/login`. Browser hängen es automatisch an, wenn der Export aus dem Dashboard heraus initiiert wird. |
| `Accept` | header | string | no | `application/ld+json` (Standard) oder `application/json`. Byte-äquivalent — nur der Response-Content-Type ändert sich. |

## Examples

```bash
# In practice: open Settings -> Data export in the dashboard.
# For curl, capture the session cookie after a login first:
curl -sS -L \
  --cookie "tp_session=$TRACEPASS_SESSION_COOKIE" \
  -H "Accept: application/ld+json" \
  -o tenant-export.jsonld \
  https://app.tracepass.eu/api/exports/tenant
```

```typescript
import { createWriteStream } from "node:fs";
import { Readable } from "node:stream";
import { finished } from "node:stream/promises";

// session cookie captured from a prior /api/auth/login call
const cookie = process.env.TRACEPASS_SESSION_COOKIE!;

const res = await fetch("https://app.tracepass.eu/api/exports/tenant", {
  headers: {
    Cookie: `tp_session=${cookie}`,
    Accept: "application/ld+json",
  },
});
if (!res.ok || !res.body) throw new Error(`Export failed: ${res.status}`);

const dest = createWriteStream("tenant-export.jsonld");
await finished(Readable.fromWeb(res.body).pipe(dest));
```

```python
import os, requests

cookie = os.environ["TRACEPASS_SESSION_COOKIE"]
with requests.get(
    "https://app.tracepass.eu/api/exports/tenant",
    cookies={"tp_session": cookie},
    headers={"Accept": "application/ld+json"},
    stream=True,
) as res:
    res.raise_for_status()
    with open("tenant-export.jsonld", "wb") as fh:
        for chunk in res.iter_content(chunk_size=1024 * 64):
            fh.write(chunk)
```

## Responses

### 200 — OK

```json
{
  "@context": "https://app.tracepass.eu/schemas/tenant-export-v1.jsonld",
  "@type": "TenantExport",
  "exportedAt": "2026-05-09T12:00:00.000Z",
  "company": { "_id": "...", "name": "Acme Batteries Ltd", "country": "DE" },
  "counts": { "products": 12, "passports": 4327, "templates": 3 },
  "products": [ { "...": "...one entry per product..." } ],
  "passports": [ { "...": "...one entry per passport, with full fieldValues + parties..." } ],
  "templates": [ { "id": "...", "category": "batteries", "version": "v3" } ]
}
```

### 401 — Nicht angemeldet

```json
{ "error": "Authentication required" }
```

### 402 — Abonnement erforderlich

```json
{ "error": "Active paid subscription required" }
```

### 403 — Verboten

```json
{ "error": "admin role required" }
```

## Related

- [Pass anlegen](https://www.tracepass.eu/de/docs/create-passport.md)
