Skip to main content
GET
/
api
/
inventory
/
risks
List inventory stock-out risks
curl --request GET \
  --url https://app.solya.app/api/inventory/risks \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "avgDailySales": 3.5,
      "brandId": "brand-nike",
      "brandName": "Nike",
      "closingStock": 2,
      "daysOfSupply": 0.6,
      "productId": "prod-001",
      "productImageUrl": null,
      "productName": "Air Max 90",
      "rank": 1,
      "status": "critical",
      "variantCode": "AM90-BLK-42",
      "variantId": "var-001",
      "variantName": "Air Max 90 - Black/42"
    },
    {
      "avgDailySales": 1.2,
      "brandId": "brand-adidas",
      "brandName": "Adidas",
      "closingStock": 5,
      "daysOfSupply": 4.2,
      "productId": "prod-002",
      "productImageUrl": null,
      "productName": "UltraBoost 22",
      "rank": 2,
      "status": "critical",
      "variantCode": "UB22-WHT-40",
      "variantId": "var-002",
      "variantName": "UltraBoost 22 - White/40"
    }
  ],
  "page": 1,
  "pageSize": 20,
  "total": 47
}

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
shopIds
string

Comma-separated shop IDs to filter by

brandIds
string

Comma-separated brand IDs to filter by

status
enum<string>

Filter by risk status tier: critical (< 7 days supply), warning (7–13 days), healthy (≥ 14 days)

Available options:
critical,
warning,
healthy
period
integer
default:30

Period in days for sales velocity calculation (default: 30). Mapped to nearest pre-aggregated window.

Required range: 7 <= x <= 365

Response

Successful response

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