Settle PO Line Billing (Final Invoice)
POST/api/purchase-order-lines/:purchase_order_line/settle-billing
Mark a PO line as billing-settled — the SAP EREKZ "final invoice" axis. A billing-settled line counts as fully invoiced for reconciliation regardless of any residual short-billed quantity; use it when the supplier confirms this is the final bill for the line even though it was under-billed.
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token. Requires the purchase_orders.update permission.
Request body fields:
reason(optional, nullable, string, max 500): free-text note recorded on the settlement and shown in the audit trail.
Stamps billing_settled_at, billing_settled_reason, and billing_settled_by (the acting user) on the line, then re-derives the parent purchase order's invoice_status.
Validation errors (422, DomainException): returned when the line cannot be settled — e.g. it is already billing-settled, or it is already fully invoiced through quantity/credit so settlement is unnecessary.
Returns the updated PurchaseOrderLine billing-settlement view (eager-loaded with billingSettledBy and purchaseOrder).
Request
Responses
- 201
- 401
- 403
- 404
- 422
- 429
Created
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 Entity
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.