Create Purchase Orders from Forecast
POST/api/inventory-forecasting/purchase-orders
Create purchase orders from forecast results. Creates a ForecastScheduleRun to track the creation.
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Authentication: Requires Bearer token.
approval_status: draft (default) or approved — if approved, auto-approves the PO after creation.
submit_to_supplier: if true, submits the PO to the supplier after creation.
fore cast_config is optional but recommended for tracking — stores a snapshot of the config used.
Also syncs backorder coverage for all new PO lines.
Returns 422 if no valid orders provided.
Supplier minimum enforcement: when forecast_config.enforce_minimum_order_value or forecast_config.enforce_minimum_order_quantity is true and the order totals fall below the supplier's minimum_purchase_order or minimum_purchase_order_quantity, the request is rejected with 422 unless minimums_acknowledged is true on that order.
Request
Responses
- 200
- 401
- 403
- 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.
Unprocessable Entity
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.