Create Consignment Settlement
POST/api/purchase-orders/:purchaseOrder/consignment/settlements
Generate a settlement bill for a consignment purchase order, covering the consigned stock that has sold but not yet been settled. The bill is created for the supplier and the purchase order stays open so further sales can be settled later.
Request body (all optional):
- settlement_date (date): the report/settlement date. Defaults to today.
- line_quantities (object): map of purchase order line ID to the quantity to settle for that line. Each value is clamped to what is still unsettled. Omit to settle every sold-but-unsettled unit.
Returns 422 when the purchase order is not a consignment order, or when there is nothing left to settle.
Authentication: Requires a Bearer token.
Request
Responses
- 201
- 401
- 403
- 404
- 422
- 429
Created
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.