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

E151: Update sales order item

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

Edits a single SO line. Triggered from Sales Order Detail items section. Quantity and SKU changes propagate to the FG ledger so DEMAND and ALLOCATE entries stay accurate.

Authentication​

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

Request​

{ "quantity": 60, "unitPrice": 47.00 }

Quantity changes write a REVERSE_DEMAND for the prior amount plus a fresh DEMAND for the new amount (append-only ledger).

Response — 200 OK​

{ "id": "uuid", "soId": "uuid", "skuId": "uuid", "quantity": 50, "unitPrice": 48.00, "allocatedQuantity": 50, "shippedQuantity": 0 }

Errors​

HTTPcodeCondition
404not_foundNo such item.
409invalid_transitionParent SO terminal, or item already partly shipped.
422validation_failedShape invalid.

Workflow​

Calls W151 Update sales order item.