Update model
Update an existing forecast model.
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.
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
The unique identifier of the forecast model.
Name for the forecast model.
User-provided external identifier for cross-referencing with other systems.
Number of days into the future to forecast.
When true, generates a baseline model using historical demand data only - without PredictHQ demand intelligence - for benchmarking accuracy against the enhanced model.
falseSet of labels you can use to better identify or group your forecast models.
Algorithm to use for forecasting.
Successful Response
No content
Bad Request
Unauthorized
Payment Required
Forbidden
Not Found
PATCH /v1/forecasts/models/{model_id} HTTP/1.1
Host: api.predicthq.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 217
{
"name": "text",
"external_id": "text",
"forecast_window": "1d",
"generate_baseline": false,
"label": [
"text"
],
"location": {
"saved_location_id": "text"
},
"algo": "text",
"demand_type": {
"interval": "text",
"industry": "accommodation"
}
}No content
OpenAPI Spec
The OpenAPI spec for Forecasts API can be found here.
Guides
Last updated
Was this helpful?