---
title: "Update a product or adjust stock"
method: PATCH
path: "/api/v1/commerce/products/{id}"
tags: ["commerce"]
---

# Update a product or adjust stock

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

## Request

- Base URL: `https://app.blueticked.com`
- URL: `https://app.blueticked.com/api/v1/commerce/products/{id}`
- Auth: HTTP bearer

Change any product field. This is the stock-sync call: set `stock_quantity` after a delivery arrives or a till sale happens elsewhere.

A malformed UUID answers 400 validation_failed before resource access; a well-formed unknown UUID or one outside your workspace answers 404.

Send only the fields you are changing; everything else is untouched.

Set `stock_quantity: null` to stop tracking stock, `0` to mark sold out.

`images` replaces the whole gallery, in the order you send it (an empty list removes every image). `image_url` alone replaces only the cover and keeps the rest; `null` removes the cover and the next image becomes it. Never send both.

Paid orders decrement stock automatically. Only PATCH for movements Blueticked cannot see (till sales, stock takes, returns to shelf).

## Path parameters

- `id` string, required

## Request body

- object
  - `stock_quantity` number
  - `is_active` boolean
  - `image_url` string, nullable: One cover image (https). Not with images.
  - `images` object[]: The gallery in order; the first is the cover. Not with image_url.
    - `url` string, required: https only.
    - `path` string, nullable: The upload call's path, for your own uploaded file.
    - `alt` string, required

## Response `200`

Success

- object
  - `ok` boolean, required
  - `product` object, required
    - `compare_at_cents` number, nullable, required
    - `id` string, uuid, required
    - `name` string, required
    - `slug` string, nullable, required
    - `description` string, nullable, required
    - `price_cents` number, nullable, required
    - `currency` string, required
    - `image_url` string, nullable, required
    - `images` object[], required
      - `url` string, required
      - `storage_path` string, nullable, required
      - `alt` string, required
      - `sort` number, required
    - `sku` string, nullable, required
    - `stock_quantity` number, nullable, required
    - `source` string, required
    - `source_ref` string, nullable, required
    - `is_active` boolean, required
    - `created_at` string, date-time, required
    - `variants` object[], required
      - `id` string, uuid, required
      - `compare_at_cents` number, nullable, required
      - `name` string, required
      - `price_cents` number, nullable, required
      - `stock_quantity` number, nullable, required
      - `is_active` boolean, required
      - `sort` number, required

## Other responses

- `400`: Validation failed
- `401`: Unauthorized: missing or invalid API key
- `402`: Insufficient wallet balance
- `403`: Forbidden: scope, plan limit, or suspension
- `404`: Not found
- `409`: Conflict (idempotency-key reuse or resource in use)
- `413`: Request body above the endpoint's size limit
- `422`: Understood but refused: the request is well-formed, the action is not permitted for this resource
- `429`: Rate limited
- `500`: Internal error
- `502`: An upstream provider refused or failed the request
- `503`: Channel or send queue unavailable

---

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