Skip to main content

Get Short-Close Shipment Exposure

POST 

/api/purchase-orders/:purchase_order/short-close/shipment-exposure

Show what short-closing the given lines would take off the purchase order's open inbound shipments. Nothing is changed.

Required scope: purchase-orders:write

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

Each line also reports requested_quantity (units the close takes off the line) and shipped_open_quantity (units on shipped open shipments: the most that can be closed as lost in transit).

Authentication: Requires Bearer token.

Request body fields:

  • lines (required, array, 1–500 items)
  • lines.*.purchase_order_line_id (required, integer): a line on this purchase order (other ids are ignored)
  • lines.*.closed_quantity (required, numeric, min 0): the quantity the line would be short-closed to

Response: in_transit_quantity is the units on shipments that have already shipped (In Transit / Partially Received) — when it is above 0, short-closing needs a shipment_resolution. unshipped_quantity is the units on Draft/Planned shipments, which are removed automatically. lines.*.shipments lists each shipment line affected and how many units would come off it (the newest shipment first).

Requires permission: purchase_orders.show

Request​

Responses​

OK

Response Headers
    Content-Type