Skip to main content
GET
/
api
/
forecasts
List short-horizon demand forecasts
curl --request GET \
  --url https://app.solya.app/api/forecasts \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "algorithm": "prophet",
      "confidenceLevel": 0.95,
      "forecastDate": "2026-06-02",
      "granularity": "WEEK",
      "lbQuantity": 8,
      "quantity": 12,
      "shopId": "shop-uuid-paris-001",
      "sizeTaxonomyId": "size-s",
      "ubQuantity": 16,
      "variantId": "variant-uuid-001"
    },
    {
      "algorithm": "prophet",
      "confidenceLevel": 0.95,
      "forecastDate": "2026-06-09",
      "granularity": "WEEK",
      "lbQuantity": 6,
      "quantity": 10,
      "shopId": "shop-uuid-paris-001",
      "sizeTaxonomyId": "size-s",
      "ubQuantity": 14,
      "variantId": "variant-uuid-001"
    }
  ],
  "page": 1,
  "pageSize": 20,
  "total": 8
}

Authorizations

Authorization
string
header
required

User session token issued by NextAuth. For human users accessing Solya via the web application.

Query Parameters

page
integer
default:1

Page number, 1-indexed (default: 1)

Required range: 1 <= x <= 9007199254740991
pageSize
integer
default:20

Number of items per page, max 100 (default: 20)

Required range: 1 <= x <= 100
variantId
string

Filter by a single variant ID (use variantIds for multiple)

variantIds
string

Comma-separated list of variant IDs to filter by (e.g. uuid-1,uuid-2). Ignored when variantId is set.

sizeTaxonomyId
string

Filter by size taxonomy ID

shopId
string

Filter by a single shop ID (use shopIds for multiple)

shopIds
string

Comma-separated list of shop IDs to filter by (e.g. uuid-1,uuid-2). Ignored when shopId is set.

granularity
enum<string>

Forecast time granularity: DAY, WEEK, MONTH, or QUARTER. Note: WEEK granularity may return 0 rows when the data warehouse has not yet computed weekly aggregations for the requested date range.

Available options:
DAY,
WEEK,
MONTH,
QUARTER
horizon
integer
default:30

Forecast horizon in days from today (default: 30). Controls the forecastDateTo cutoff. Use dateFrom/dateTo for explicit date ranges instead.

Required range: 1 <= x <= 365
dateFrom
string

Inclusive lower bound on forecast date, ISO-8601 format YYYY-MM-DD (e.g. 2025-09-01). Overrides the horizon-derived start when provided. The two bounds are independent: if you set only dateTo, the start still defaults to today, so a dateTo in the past returns no rows — set dateFrom as well for a fully explicit window.

Pattern: ^\d{4}-\d{2}-\d{2}$
dateTo
string

Inclusive upper bound on forecast date, ISO-8601 format YYYY-MM-DD (e.g. 2025-12-31). Overrides the horizon-derived end when provided. The two bounds are independent: if you set only dateFrom, the end still defaults to today + horizon days, so set dateTo as well for a fully explicit window.

Pattern: ^\d{4}-\d{2}-\d{2}$

Response

Successful response

data
object
required
success
enum<boolean>
required
Available options:
true