---
title: Create a product
description: Create a product (SKU layer above passports). Category picks the template. Accepts imageUrls[] for CDN images (max 20). Idempotency-Key supported.
canonical: "https://www.tracepass.eu/docs/create-product"
locale: en
source: "https://www.tracepass.eu/docs/create-product"
---

# Create a product

> Create a product (SKU layer above passports). Category picks the template. Accepts imageUrls[] for CDN images (max 20). Idempotency-Key supported.

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

Create a product. The category template is resolved automatically from the `category` slug — must match a seeded category (e.g. `batteries`, `textiles`, `jewelry`). Model strings are unique within the workspace.

Counts as one v1 write. Honours `Idempotency-Key`. Optional `imageUrls` accepts an array of public HTTPS URLs (max 20 per product, max 2048 chars each); the customer's CDN remains canonical and TracePass doesn't re-host them. Use the multipart upload endpoint when you don't have CDN URLs ready.

## 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. |
| `Idempotency-Key` | header | string | no | UUID v4 per logical operation. |
| `name` | body | string (1-200) | yes | Display name. |
| `model` | body | string (1-100) | yes | Model identifier. Must be unique within your workspace. |
| `category` | body | string | yes | Seeded category slug — `batteries`, `textiles`, `jewelry`, `electronics`, `furniture`, `chemicals`, `packaging`, `toys`, `fmcg`, `tyres`, `iron-steel`, `construction`. |
| `description` | body | string (≤ 2000) | no | Optional description. |
| `defaultFieldValues` | body | object | no | Seed values applied to every passport created from this product. Each entry's key must exist on the category template. |
| `imageUrls` | body | string\[\] (max 20) | no | Public HTTPS image URLs. Replaces the existing array on PATCH; appends on the multipart upload endpoint. |
| `sourceLocale` | body | string (ISO 639-1) | no | Locale of `name` and `description`. Defaults to your workspace's `defaultSourceLocale` (typically `en`). |

## 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 — Created

```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 — No template

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

### 409 — Duplicate model

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

## Related

- [List products](https://www.tracepass.eu/docs/list-products.md)
- [Update a product](https://www.tracepass.eu/docs/update-product.md)
- [Upload product image](https://www.tracepass.eu/docs/upload-product-image.md)
