Skip to main content
Version: v1.0.0(int)

E135: Update work order item

PATCH /api/work-order-items/:id

Updates an output line's quantity and/or conversion cost. A quantity change re-scales the line's BOM-input snapshot (snapshot qty × new/old — the creation-time recipe is preserved, not re-read) and rewrites the line's projected ledger events at the new quantity (reverse + re-project). The SKU itself is fixed once added — swap = remove + add.

Authentication

Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Member.

Request

{ "quantity": 8, "conversionCost": 2.00 }

Both fields optional; a cost-only patch touches neither inputs nor ledger.

Response — 200 OK

{ "item": WorkOrderItem, "inputs": [ WorkOrderInput ] }

Errors

HTTPcodeCondition
404not_foundNo such WO item.
409conflictA receipt exists against the WO — items are locked.
422validation_failedShape invalid.

Workflow

Calls W135 Update work order item.