---
title: "Update article"
method: PATCH
path: "/v1/articles/{id}"
tags: ["Articles"]
---

# Update article

`PATCH /v1/articles/{id}`

## Request

- Base URL: `https://api.officina.it`
- URL: `https://api.officina.it/v1/articles/{id}`
- Auth: HTTP bearer

(the mobile edit sends every field, matching the web editor).

## Request body

- object
  - `name` string, required
  - `code` string, nullable
  - `unit_type` string, required: Magazzino: `kg`, `L`, `kit`, `pz`. Manodopera: `gg`, `h`, `lav`, `min`.
  - `stock` number, nullable
  - `minimum_stock` number, nullable
  - `purchase_price` number, nullable
  - `sale_price` number, nullable
  - `vat_code` string, required: Deve essere una delle aliquote attive dell'azienda.
  - `unit_discount_rate` integer, nullable
  - `location` string, nullable
  - `comments` string, nullable
  - `supplier_id` string, nullable
  - `work_category_ids` string[], nullable: The work categories ("Categoria") the article is used for, in the order given. Omitted → unchanged (none on create); `[]` or `null` → removes every category. Trimmed and de-duplicated; each id must be one of the company's work categories (`GET /v1/work-categories`).

## Response `200`

success

## Other responses

- `401`: Missing, malformed, expired, or wrong-audience bearer token.
- `402`: The company has no active subscription, or its plan does not include API access. API access is included in the Business and Illimitato plans.
- `403`: The authenticated user lacks the required permission.
- `404`: Resource does not exist OR belongs to a different company. The two cases are intentionally indistinguishable.
- `409`: Another live article of the same kind (Magazzino or Listino manodopera) already uses this code, ignoring case and surrounding spaces. `candidates` holds its id. Applies to every supported revision: request and response schemas are unchanged.
- `500`: Unhandled server error. Detail is logged, not exposed.

---

[API](https://skmtc.dev/officina/apis/officina-it-api.md) · [All operations](https://skmtc.dev/officina/apis/officina-it-api/llms.txt) · [OpenAPI document](https://skmtc.dev/officina/apis/officina-it-api/revisions/7da3fccfe551?raw)
