List sales lines (sales transactions / sell-through)
Returns a paginated list of individual sales lines — the line-item sales transactions (what sold), each carrying quantity sold, unit price, revenue, discounts, cost (COGS) and margin, plus the shop, brand, product, variant and size it belongs to. Use this to analyse sales history and sell-through, compute revenue or units sold, or drill into discounting and margin, filtered by shop, brand, product, variant, line type, and date range. This is the granular fact table; for per-product roll-ups (best-sellers, totals) use GET /products, and for forward demand use GET /forecasts.
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 shop UUID
Filter by brand UUID
Filter by product UUID
Filter by variant UUID
Filter by line type. Enum (lowercase, matching stored values): 'sale' (regular sale), 'return' (returned item)
sale, return Return lines where saleDate >= this value (inclusive). ISO 8601 date 'YYYY-MM-DD' (e.g. '2026-01-01') or datetime 'YYYY-MM-DDTHH:mm:ssZ' — both accepted. Filters on the saleDate column.
Return lines where saleDate <= this value (inclusive). ISO 8601 date 'YYYY-MM-DD' (e.g. '2026-12-31') or datetime 'YYYY-MM-DDTHH:mm:ssZ' — both accepted. Filters on the saleDate column.
Column to sort by. Allowed: 'saleDate', 'quantity', 'price'. Defaults to 'saleDate'.
Sort direction: 'asc' or 'desc'. Default order is saleDate descending (most recent first).
asc, desc 
