Skip to main content

Create Inbound Shipment From Purchase Invoice

POST 

/api/inbound-shipments/from-invoice/:purchaseInvoice

Create a new inbound shipment pre-filled from a supplier invoice. Each invoice line is converted into a shipment line that retains the purchase_invoice_line_id and resolves to its underlying purchase_order_line_id.

Validation:

  • destination_warehouse_id: required, must exist on warehouses
  • lines: required, min 1, each must reference an existing purchase_invoice_line_id
  • expected_quantity: required, numeric > 0

If an invoice line has already been fully shipped on a prior shipment, the response includes a soft warning under warnings[] (key: lines.<purchase_invoice_line_id>) rather than failing the request. Set mark_as_shipped=true to immediately transition the new shipment to in_transit.

Authentication: Requires Bearer token.

Request

Responses

Successful response