Skip to main content

Evaluate Forecast Accuracy

POST 

/api/inventory-forecasting/accuracy/evaluate

Backtest a completed forecast run by comparing its projected demand against actual sales, and store the resulting accuracy metrics per product. The work runs in the background; the response returns immediately with a job reference to poll for progress.

Required scope: purchase-orders:write

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

Authentication: Requires Bearer token.

Body fields:

  • run_id (required): the forecast run to evaluate.
  • eval_start (optional, YYYY-MM-DD): start of the evaluation window; must be on or before eval_end.
  • eval_end (optional, YYYY-MM-DD): end of the evaluation window.

Returns a job reference (tracked_job_log_id).

forecast_quantity is the demand the run projected for the evaluation window: the stored line's inputs.daily_average multiplied by the window's days (not the line's order quantity). Saved scheduled runs are scored automatically by the nightly sku:forecasting:evaluate-accuracy sweep once 30 days have elapsed, over the 30 days after the run.

Request​

Responses​

OK

Response Headers
    Content-Type