E079: Update SKU
PATCH /api/skus/:id
Edits a SKU's header fields. Triggered from SKU Detail.
Authentication
Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Member.
Request
{ "name": "...", "skuTypeId": "uuid", "unit": "case", "isActive": true }
Code is immutable after create. Passing isActive archives (false) or reactivates (true) the SKU; all fields are optional.
Response — 200 OK
{ "id": "uuid", "code": "FG-001", "name": "...", "skuTypeId": "uuid", "unit": "case", "isActive": true, "isFinishedGood": true, "createdAt": "..." }
Errors
| HTTP | code | Condition |
|---|---|---|
| 404 | not_found | No such SKU. |
| 422 | validation_failed | Shape invalid. |
Workflow
Calls W079 Update SKU.