Run Schedule Now
POST/api/inventory-forecasting/schedules/:schedule/run
Manually trigger a forecast schedule. The run is queued and executes in the background, because a large supplier forecast can take longer than a single HTTP request allows.
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Returns 202 Accepted with a tracked_job_log_id. The finished run (status, results_summary, linked purchase orders) appears in the schedule's run history — GET /api/inventory-forecasting/schedules/{schedule}/runs.
Authentication: Requires Bearer token.
Only one run of a schedule can be in progress at a time, because two runs at once could create a second set of purchase orders. While a run of the schedule is still in progress, the request is refused with 409 Conflict and nothing is queued; wait for that run to finish (check the schedule's run history) and try again.
Returns 404 if the schedule does not exist.
Request
Responses
- 202
- 401
- 403
- 404
- 409
- 422
- 429
Accepted
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.
Conflict
Response Headers
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
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.