---
title: "get forecast model config"
method: GET
path: "/api/v1/sales/velocity/forecast-config"
tags: ["sales_velocity"]
---

# get forecast model config

`GET /api/v1/sales/velocity/forecast-config`

## Request

- Base URL: `https://api.app.tightly.io`
- URL: `https://api.app.tightly.io/api/v1/sales/velocity/forecast-config`
- Auth: HTTP bearer

The forecast model this organisation has selected and the configuration behind it: the model, the minimum sales and minimum weeks with sales a variant needs to be forecast, the base and pattern filters, the time windows, and any model-specific parameters under `model_parameters`.

The models the engine carries are `moving_average`, `seasonal_naive`, `seasonal_tsb` and `lightgbm`, and none of them is plan-gated. This read answers the configuration; changing it is not public.

Scope: `sales:read`.

## Headers

- `Tightly-Version` string

## Response `200`

Current forecast model configuration

- object
  - `data` object: The selected model and the filters that decide which variants it is fitted on. Model-specific parameters ride under `model_parameters`.
    - `min_total_sales` integer, nullable
    - `min_weeks_with_sales` integer, nullable
    - `model` string: lightgbm, seasonal_tsb, moving_average, seasonal_naive, theta, sba, ets, and so on.
    - `model_parameters` object, nullable
  - `message` object: severity, service and desc.

## Other responses

- `401`: No usable key: malformed, unknown, revoked, expired or stopped. One refusal covers all five, telling a caller which is which maps the surface for them. A request with no Authorization header at all is refused 400 before any key is looked for.
- `403`: The key may not reach this operation. `scope_missing` when the key does not hold Sales; `organization_mismatch` when the path names an organisation that is not the key's; `ip_not_allowed` when the caller's address is outside the key's allowlist.
- `429`: The key has spent its allowance for this minute. 600 reads and 120 writes a minute, counted per key, refused calls included. `Retry-After` says how long to wait.
- `503`: The database is briefly out of reach, which is what a failover or a full connection pool looks like from outside. Wait the seconds `Retry-After` names and send the request again. A read is safe to repeat. A write is not, because the connection was lost in the middle of it, so read the object back before sending it a second time. Branch on the status rather than on `code`, which is `POSTGRES_UNAVAILABLE` from one of the two seams that raise this and `SERVICE_UNAVAILABLE` from the other.

---

[API](https://skmtc.dev/tightly/apis/tightly-api.md) · [All operations](https://skmtc.dev/tightly/apis/tightly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tightly/apis/tightly-api/revisions/199f7eb35afb?raw)
