List short-horizon demand forecasts
Returns a paginated list of demand forecasts scoped to a rolling horizon window (default 30 days from today, configurable via horizon). Use this endpoint when you need horizon-relative forecasts and do not already know exact date bounds. For arbitrary date ranges or large-scale batch queries, prefer /api/intelligence/sales-forecasts which accepts explicit forecastDateFrom/forecastDateTo parameters. Forecasts are keyed per variant × size × shop × date combination. Supports single-value (variantId/shopId) or comma-separated multi-value (variantIds/shopIds) filters.
Authorizations
User session token issued by NextAuth. For human users accessing Solya via the web application.
Query Parameters
Page number, 1-indexed (default: 1)
1 <= x <= 9007199254740991Number of items per page, max 100 (default: 20)
1 <= x <= 100Filter by a single variant ID (use variantIds for multiple)
Comma-separated list of variant IDs to filter by (e.g. uuid-1,uuid-2). Ignored when variantId is set.
Filter by size taxonomy ID
Filter by a single shop ID (use shopIds for multiple)
Comma-separated list of shop IDs to filter by (e.g. uuid-1,uuid-2). Ignored when shopId is set.
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.
DAY, WEEK, MONTH, QUARTER Forecast horizon in days from today (default: 30). Controls the forecastDateTo cutoff. Use dateFrom/dateTo for explicit date ranges instead.
1 <= x <= 365Inclusive 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.
^\d{4}-\d{2}-\d{2}$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.
^\d{4}-\d{2}-\d{2}$
