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).
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body:
supplier_invoice_number(string, required, max 255)purchase_invoice_date(dateY-m-d, required, not in the future)due_date(dateY-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
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.