---
title: Update a product
description: Update product fields by sending only what changes. imageUrls REPLACES the existing array (your CMS stays canonical). Idempotency-Key supported.
canonical: "https://www.tracepass.eu/docs/update-product"
locale: en
source: "https://www.tracepass.eu/docs/update-product"
---

# Update a product

> Update product fields by sending only what changes. imageUrls REPLACES the existing array (your CMS stays canonical). Idempotency-Key supported.

```http
PATCH /api/v1/products/{id}
```

Patch one or more product fields. Send only the keys you want to change — omitted fields stay untouched. The whole-array semantics on `imageUrls` are intentional: your CMS is the canonical image set, so a PATCH with `imageUrls: ["a","b"]` replaces whatever was there. To append a single image without rewriting the list, use the multipart upload endpoint instead.

Counts as one v1 write. Honours `Idempotency-Key`. `model` uniqueness is re-checked when changed; `description: null` clears the description (distinct from omitting the key).

## 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. |
| `id` | path | ObjectId | yes | Product ID. |
| `name` | body | string (1-200) | no | Display name. |
| `model` | body | string (1-100) | no | Model identifier. Uniqueness re-checked when changed. |
| `description` | body | string \| null (≤ 2000) | no | Pass `null` to clear. |
| `defaultFieldValues` | body | object | no | Replaces seed values for future passports. |
| `imageUrls` | body | string\[\] (max 20) | no | Replaces the full image array. |
| `status` | body | enum | no | `active` or `archived`. |
| `sourceLocale` | body | string (ISO 639-1) | no | Update the locale of `name` / `description`. |

## Examples

```bash
curl -sS -X PATCH \
  https://app.tracepass.eu/api/v1/products/6650a1b2c3d4e5f6a7b8c9d0 \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Li-Ion 48V Battery Pack (revised)",
    "imageUrls": ["https://cdn.example.com/new-hero.jpg"]
  }'
```

```typescript
await fetch(`https://app.tracepass.eu/api/v1/products/${id}`, {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.TRACEPASS_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Li-Ion 48V Battery Pack (revised)",
    imageUrls: ["https://cdn.example.com/new-hero.jpg"],
  }),
});
```

```python
import os, requests
res = requests.patch(
    f"https://app.tracepass.eu/api/v1/products/{product_id}",
    headers={"Authorization": f"Bearer {os.environ['TRACEPASS_API_KEY']}"},
    json={
        "name": "Li-Ion 48V Battery Pack (revised)",
        "imageUrls": ["https://cdn.example.com/new-hero.jpg"],
    },
)
res.raise_for_status()
```

## Responses

### 200 — Updated

```json
{
  "_id": "6650a1b2c3d4e5f6a7b8c9d0",
  "name": "Li-Ion 48V Battery Pack (revised)",
  "imageUrls": ["https://cdn.example.com/new-hero.jpg"],
  "updatedAt": "2026-05-09T15:30:00.000Z"
}
```

### 404 — Not found

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

### 409 — Duplicate model

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

## Related

- [Create a product](https://www.tracepass.eu/docs/create-product.md)
- [Upload product image](https://www.tracepass.eu/docs/upload-product-image.md)
