---
title: "Batch-create products (up to 100 per call)."
method: POST
path: "/api/v1/products/batch"
tags: ["Products"]
---

# Batch-create products (up to 100 per call).

`POST /api/v1/products/batch`

## Request

- Base URL: `https://app.tracepass.eu`
- URL: `https://app.tracepass.eu/api/v1/products/batch`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.tracepass.eu/api/oauth/authorize`, token URL `https://app.tracepass.eu/api/oauth/token`, scopes: `passports:write`)

Create up to 100 products in one call. Each item carries
the same body shape as the single-create endpoint.
Partial-success per item — each gets its own status in
the response array.

The whole batch consumes N writes upfront against the
daily-write budget; if that would overflow, the entire
batch returns 429 (no partial billing).

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `products` CreateProductInput[], required
    - `name` string, required
    - `model` string, required: Unique within the workspace.
    - `category` string, required: Seeded category slug — `batteries`, `textiles`, `jewelry`, `electronics`, `furniture`, `detergents`, `paints-coatings`, `packaging`, `toys`, `fmcg`, `tyres`, `iron-steel`, `construction`.
    - `description` string
    - `defaultFieldValues` object: Seed values for passports created from this product, keyed by template field. Each value is checked against the template: a numeric string for a number field is stored as a number, and any other value the template rejects answers 400 `Invalid default field values` with `details` (in a batch, that item's result is an error).
    - `imageUrls` string[]
    - `sourceLocale` string

## Response `200`

Partial-success batch result.

- BatchProductsResponse
  - `results` BatchProductResultItem[], required
    - union
      - object
        - `index` integer, required
        - `status` 'created', required
        - `data` Product, required
          - `_id` string: MongoDB ObjectId hex string (24 chars).
          - `name` string
          - `model` string
          - `category` string
          - `templateId` string: MongoDB ObjectId hex string (24 chars).
          - `defaultFieldValues` object: Seed values for passports created from this product, keyed by template field. Each value is checked against the template: a numeric string for a number field is stored as a number, and any other value the template rejects answers 400 `Invalid default field values` with `details` (in a batch, that item's result is an error).
          - `imageUrls` string[]
          - `passportCount` integer
          - `status` 'active' | 'archived'
          - `sourceLocale` string
          - `createdAt` string, date-time
          - `updatedAt` string, date-time
      - object
        - `index` integer, required
        - `status` 'error', required
        - `error` string, required
  - `summary` BatchSummary, required
    - `created` integer, required
    - `errors` integer, required
    - `total` integer, required

## Other responses

- `400`: Validation error or malformed request.
- `401`: Missing or invalid API key.
- `403`: Plan-gate or workspace permission denied.
- `422`: Idempotency-Key reused with a different request body. Use a new key for the new request, or reuse the original body.
- `429`: Daily v1 write or passport-read budget exhausted. Resets at 00:00 UTC.

---

[API](https://skmtc.dev/tracepass/apis/tracepass-api.md) · [All operations](https://skmtc.dev/tracepass/apis/tracepass-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tracepass/apis/tracepass-api/revisions/60ddeb25638b?raw)
