Short-Close PO Line
POST/api/purchase-order-lines/:purchase_order_line/short-close
Short-close a PO line at a smaller closed_quantity than originally ordered. Records an audit event (PurchaseOrderLineShortCloseEvent) and mutates the line's quantity to the new effective ordered amount. The line's own save() propagates the change into demand-planning coverages.
Authentication: Requires Bearer token.
Request body fields:
closed_quantity(required, numeric, min 0): the new effective ordered quantity. Must be less than the original ordered quantity AND greater than or equal to the already-received quantity.reason(optional, nullable, max 500): free-text reason for the short-close, recorded on the event.
Validation rules (422):
- A PO line can only have one active short-close at a time — undo the existing one first.
closed_quantitymust be less than the original ordered quantity.closed_quantitycannot be less than the already-received quantity.
Returns the created PurchaseOrderLineShortCloseEvent (eager-loaded with closedBy and followUpPurchaseOrder).
Request
Responses
- 200
Successful response