Replace model
Replace an existing forecast model.
Replaces the full configuration of an existing forecast model. This is a full replacement — all mutable fields should be provided. 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.
Set of labels you can use to better identify or group your forecast models.
Algorithm to use for forecasting.
phq-xgboostSuccessful Response
No content
Bad Request
Unauthorized
Payment Required
Forbidden
Not Found
PUT /v1/forecasts/models/{model_id} HTTP/1.1
Host: api.predicthq.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 198
{
"name": "text",
"external_id": "text",
"forecast_window": "1d",
"label": [
"text"
],
"location": {
"saved_location_id": "text"
},
"algo": "phq-xgboost",
"demand_type": {
"interval": "text",
"industry": "accommodation"
}
}No content
OpenAPI spec
Read the OpenAPI spec for Forecasts API.
Guides
These guides cover the Forecasts API:
Last updated
Was this helpful?