Update Model

Update an existing forecast model.

Update Model

patch

Partially updates an existing forecast model. Only the fields provided in the request body will be changed. Changes to location, demand_type, forecast_window, algo, or generate_baseline are blocked while the model is in preparing, training, or forecasting status. Changing any of those fields sets the model to stale status, requiring re-training to take effect.

Authorizations
AuthorizationstringRequired

Enter your PredictHQ API key. The Bearer prefix is added automatically.

When calling the API directly, send: Authorization: Bearer <YOUR_API_KEY> as documented at https://docs.predicthq.com/api/overview/authenticating

Path parameters
model_idstringRequired

The unique identifier of the forecast model.

Body
nameany ofOptional

Name for the forecast model.

string · min: 1Optional
or
nullOptional
external_idany ofOptional

User-provided external identifier for cross-referencing with other systems.

string · min: 1Optional
or
nullOptional
forecast_windowany ofOptional

Number of days into the future to forecast.

string · enumOptionalPossible values:
or
nullOptional
generate_baselinebooleanOptional

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

Default: false
labelany ofOptional

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

string[] · min: 1Optional
or
nullOptional
locationany ofOptional

The geographic area for this model, specified by a Saved Location ID.

or
nullOptional
algoany ofOptional

Algorithm to use for forecasting.

const: phq-xgboostOptional
or
nullOptional
demand_typeany ofOptional

Configuration for demand data type including industry and interval.

or
nullOptional
Responses
chevron-right
204

Successful Response

No content

patch
/v1/forecasts/models/{model_id}

No content

OpenAPI Spec

The OpenAPI spec for Forecasts API can be found herearrow-up-right.

Guides

Last updated

Was this helpful?