---
title: Produkt anlegen
description: Produkt anlegen (SKU-Ebene über Pässen). Kategorie bestimmt das Template. Akzeptiert imageUrls[] (max 20). Idempotency-Key unterstützt.
canonical: "https://www.tracepass.eu/de/docs/create-product"
locale: de
source: "https://www.tracepass.eu/de/docs/create-product"
---

# Produkt anlegen

> Produkt anlegen (SKU-Ebene über Pässen). Kategorie bestimmt das Template. Akzeptiert imageUrls[] (max 20). Idempotency-Key unterstützt.

```http
POST /api/v1/products
```

Erstellt ein Produkt. Die Kategorienvorlage wird automatisch aus dem `category`-Slug aufgelöst — muss einer gesäten Kategorie entsprechen (z. B. `batteries`, `textiles`, `jewelry`). Modell-Strings sind innerhalb des Workspaces eindeutig.

Zählt als ein v1-Schreibvorgang. Unterstützt Idempotency-Key. Optional `imageUrls` akzeptiert ein Array öffentlicher HTTPS-URLs (max. 20 pro Produkt, max. 2048 Zeichen je); das Kunden-CDN bleibt kanonisch — TracePass hostet die Bilder nicht erneut. Multipart-Upload-Endpoint nutzen, wenn keine CDN-URLs vorliegen.

## 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. |
| `Idempotency-Key` | header | string | no | UUID v4 pro logischer Operation. |
| `name` | body | string (1-200) | yes | Anzeigename. |
| `model` | body | string (1-100) | yes | Modellbezeichnung. Muss im Workspace eindeutig sein. |
| `category` | body | string | yes | Gesäter Kategorie-Slug. |
| `description` | body | string (≤ 2000) | no | Optionale Beschreibung. |
| `defaultFieldValues` | body | object | no | Seed-Werte, die für jeden aus diesem Produkt erstellten Pass übernommen werden. |
| `imageUrls` | body | string\[\] (max 20) | no | Öffentliche HTTPS-Bild-URLs. |
| `sourceLocale` | body | string (ISO 639-1) | no | Locale von `name` und `description`. |

## Examples

```bash
curl -sS https://app.tracepass.eu/api/v1/products \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx" \
  -H "Idempotency-Key: 7b4f1e2c-9a3d-4e5b-8c1a-2d3e4f5a6b7c" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Li-Ion 48V Battery Pack",
    "model": "BP-48V-100",
    "category": "batteries",
    "defaultFieldValues": {
      "batteryChemistry": "NMC",
      "nominalVoltage": 48
    }
  }'
```

```typescript
import { randomUUID } from "node:crypto";
const res = await fetch("https://app.tracepass.eu/api/v1/products", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TRACEPASS_API_KEY}`,
    "Idempotency-Key": randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Li-Ion 48V Battery Pack",
    model: "BP-48V-100",
    category: "batteries",
    defaultFieldValues: { batteryChemistry: "NMC", nominalVoltage: 48 },
  }),
});
if (!res.ok) throw new Error(`Create failed: ${res.status}`);
const product = await res.json();
```

```python
import os, uuid, requests
res = requests.post(
    "https://app.tracepass.eu/api/v1/products",
    headers={
        "Authorization": f"Bearer {os.environ['TRACEPASS_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
        "Content-Type": "application/json",
    },
    json={
        "name": "Li-Ion 48V Battery Pack",
        "model": "BP-48V-100",
        "category": "batteries",
        "defaultFieldValues": {"batteryChemistry": "NMC", "nominalVoltage": 48},
    },
)
res.raise_for_status()
```

## Responses

### 201 — Erstellt

```json
{
  "_id": "6650a1b2c3d4e5f6a7b8c9d0",
  "name": "Li-Ion 48V Battery Pack",
  "model": "BP-48V-100",
  "category": "batteries",
  "templateId": "6650a1b2c3d4e5f6a7b8c9d1",
  "defaultFieldValues": { "batteryChemistry": "NMC", "nominalVoltage": 48 },
  "passportCount": 0,
  "status": "active",
  "createdAt": "2026-05-09T10:00:00.000Z"
}
```

### 400 — Keine Vorlage

```json
{ "error": "No template found for category: foo-bar" }
```

### 409 — Doppeltes Modell

```json
{ "error": "A product with this model already exists for your company" }
```

## Related

- [Produkte auflisten](https://www.tracepass.eu/de/docs/list-products.md)
- [Produkt aktualisieren](https://www.tracepass.eu/de/docs/update-product.md)
- [Produktbild hochladen](https://www.tracepass.eu/de/docs/upload-product-image.md)
