Skip to main content

Re-run Forecast from Previous Run

POST 

/api/inventory-forecasting/schedule-runs/:runId/rerun

Re-run a forecast using the configuration from a previous run.

Required scope: purchase-orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

For scheduled runs with an active schedule, the schedule is queued for execution in the background and the endpoint returns 202 Accepted with type = queued and a tracked_job_log_id; the new run appears in the schedule's run history when it finishes. For manual runs or runs whose schedule was deleted, returns 200 with the configuration_snapshot for manual re-execution.

Request body fields:

  • preview (boolean, optional, default false): When true, computes the forecast for inspection only. Skips PO creation (even when the schedule has auto_create_po enabled), skips alerts, and does not advance the schedule's next_run_at. The resulting run is recorded with results_summary.is_preview = true. Has no effect on manual runs (configuration_only path).

Authentication: Requires Bearer token.

Returns 404 if run not found.

Request​

Responses​

OK

Response Headers
    Content-Type