v1

latestOpenAPI 3.1.02026-07-2342137210.8 KB
Models

Create Model

Creates a new forecast model. You must provide a name and a location (via a Saved Location ID). Optionally specify demand_type, label, external_id, forecast_window, algo, and generate_baseline.

After creating a model, upload historical demand data using the Create Demand Data endpoint, then trigger training.

post/v1/forecasts/models

Request body

namestring required

Name for the forecast model.

external_idstring

External identifier for the forecast model. If you have an ID for the location/store/property/product-group in your other platforms, use the same ID here to easily connect this specific forecast model.

forecast_window'1d' | '7d' | '14d' | '28d' | '30d' | '60d' | '90d'
generate_baselineboolean

When true, generates a baseline model using historical demand data only - without PredictHQ demand intelligence - for benchmarking accuracy against the enhanced model.

labelstring[]

Set of labels you can use to better identify or group your forecast models.

algo'phq-xgboost'

Currently we offer one algorithm based on XGBoost. In the future we may offer additional algos.

Response

Successful Response

errorsstring[]

List of error messages, if any.

warningsstring[]

List of warning messages, if any.

model_idstring required

Unique identifier for the newly created forecast model.