Skip to main content

Update Receipt Line Quantity

PATCH 

/api/inbound-shipment-receipts/:receipt/lines/:line

Change a receipt line's received quantity. An increase adds stock to the line's FIFO layer; a reduction removes it. Reducing below the currently allocated quantity consumes order allocations - soft reservations are demoted to backorder, and hard-allocated (label-printed) units require voiding their labels first.

Required scope: purchase-orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Confirmation flow: preview the change first (see Preview Receipt Line Quantity). If the change alters the shipment or order line quantity, or needs FIFO redistribution, the request returns 409 with the preview payload until you resubmit with confirmed_implications (and, when redistribution is needed, redistribute_usages) set to true.

Body fields:

  • quantity (integer, required) - the new received quantity (>= 0).
  • confirmed_implications (boolean, optional) - acknowledge the shipment/order quantity changes.
  • redistribute_usages (boolean, optional) - authorize moving existing FIFO usages to other layers.
  • update_shipment_quantity (boolean, optional) - also adjust the inbound shipment line quantity.
  • update_order_quantity (boolean, optional) - also adjust the purchase order line quantity.

Optional void confirmations (void_confirmations): This action consumes the stock reserved for it. When that stock is hard-allocated to a sales-order fulfillment whose shipping label is already printed, include one void_confirmations entry per fulfillment to authorize voiding that label and reclaiming its stock; omit it and the request fails with a 422 conflict listing the blocking fulfillments.

  • void_confirmations (array, optional)
  • void_confirmations[].fulfillment_id (integer, required) - the fulfillment whose label may be voided.
  • void_confirmations[].attempt_void (boolean, required) - true to void the label and consume its stock.
  • void_confirmations[].reason (string, optional) - free-text audit note for the void.

422 (hard-allocation conflict): returned when the action would consume stock hard-allocated to a printed shipping label and no matching void_confirmations entry authorized voiding it. conflict.requested_quantity is what the action needs, available_quantity is what is free, protected_quantity is the hard-allocated + held amount, and conflicting_allocations lists the blocking fulfillments (line_details.fulfillment_id).

Authentication: Requires Bearer token.

Request

Responses

OK

Response Headers
    Content-Type