Skip to main content

Create Bill from Release

POST 

/api/purchase-orders/:purchase_order/releases/:inbound_shipment/purchase-invoice

Creates a supplier bill for one release of a purchase order, pre-filled from the release's lines: each line bills the release quantity (what was received, once the release is received or closed) less anything already billed against that release, at the purchase order line's price, discount and tax. The bill is linked to the release, and any deposit on the purchase order is applied to it by the usual automatic rules (with proportional apply on, each release bill takes its share of the deposit).

Required scope: purchase-orders:write

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

Body:

  • supplier_invoice_number (string, required, max 255)
  • purchase_invoice_date (date Y-m-d, required, not in the future)
  • due_date (date Y-m-d, optional): otherwise worked out from the payment terms.

Requires the purchase_orders.update permission. Returns 422 when the shipment carries no lines of the purchase order, is cancelled, or has nothing left to bill.

Request​

Responses​

OK

Response Headers
    Content-Type