# PUT /api/v1/inventory/products/{id}

> Update product

- **Tag:** inventory:products
- **Operation ID:** `update_product_api_v1_inventory_products__id__put`

## Description

Update an existing product.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `id` (path, string · uuid, required)
- `include_variants` (query, boolean, optional) — Whether to include variant details

## Request body

Schema: `ProductUpdateRequest`

- `id` (string) — Product UUID (set from URL path).
- `name` (string) — Updated product name.
- `type` (string) — Updated product type: 'manual' or 'shopify'.
- `category` (string) — Updated product category.
- `archived` (boolean) — Set to true to archive (hide) the product.

## Responses

### 200 — Successful Response

Schema: `ProductResponse`

- `id` (string · required) — Product UUID.
- `business_id` (string · required) — Business UUID.
- `created_at` (string · date-time · required) — Creation timestamp.
- `updated_at` (string · date-time · required) — Last update timestamp.
- `name` (string · required) — Product name.
- `type` (string · required) — Product type: 'manual' or 'shopify'.
- `category` (string) — Product category (e.g. 'Finished Goods', 'Intermediate Goods', 'Ingredients').
- `stripe_product_id` (string) — Stripe product ID if synced to Stripe.
- `shopify_product_id` (string) — Shopify product ID if synced from Shopify.
- `archived` (boolean) — Whether product is archived (hidden from lists).
- `variant_count` (integer) — Number of variants this product has.
- `variants` (array · VariantResponse) — List of product variants (when include_variants=true).

### 400 — Bad request - invalid data

### 404 — Business or product not found

### 422 — Validation error

## Code samples

### cURL

```bash
curl -X PUT 'https://api.ondayzero.com/api/v1/inventory/products/{id}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "string",
  "name": "string",
  "type": "string",
  "category": "string",
  "archived": false
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/inventory/products/{id}', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "id": "string",
  "name": "string",
  "type": "string",
  "category": "string",
  "archived": false
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "id": "string",
  "name": "string",
  "type": "string",
  "category": "string",
  "archived": false
}

response = httpx.put("https://api.ondayzero.com/api/v1/inventory/products/{id}", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/inventory-products/update-product
- OpenAPI slice: https://www.ondayzero.com/docs/reference/inventory-products/update-product/openapi.json
- Other endpoints in **inventory:products**: https://www.ondayzero.com/docs/reference/inventory-products
