Update Shipment Line Quantity
PATCH//:domain/api/v2/warehouse-transfers/shipments/:shipment/lines/:line
Update a warehouse transfer shipment line's quantity in place, scaling its inventory movements at the source (active negative) and destination (in-transit positive) accordingly.
Request body:
quantity(integer, required, >= 0) — new shipment line quantity. Capped by the parent warehouse transfer line quantity.confirmed_implications(boolean, optional) — must betruewhen the change is non-zero; otherwise the endpoint returns 409 with the preview payload so the caller can confirm.
Behavior:
- Increase: pulls
deltaadditional units from source on-hand FIFO and places them in-transit toward the destination. - Decrease: returns
abs(delta)units to source on-hand and removes them from in-transit at the destination. - The parent warehouse transfer line quantity is NEVER mutated by this endpoint — it preserves the original transfer intent (BBP invariant).
Errors:
409 Conflict— non-zero delta withoutconfirmed_implications: true; the preview is returned indataso callers can render and confirm.422 Unprocessable Entitywithdata.blocks.below_received: true— requested quantity is below the total already received against this line; adjust receipts first.422 Unprocessable Entitywithdata.blocks.above_transfer_line: true— requested quantity exceeds the parent warehouse transfer line quantity.422 Unprocessable EntityfromInsufficientStockExceptionthrown by the inventory manager if FIFO consumption cannot satisfy the delta at the moment of save (race / concurrency safety net).
Request
Responses
- 200
- 409
- 422
OK
Response Headers
Content-Type
Conflict
Response Headers
Content-Type
Unprocessable Entity
Response Headers
Content-Type