Skip to main content
All examples assume the setup from API recipes (base URL, bearer token).

List brands (page-based pagination)

GET /api/brands takes page, pageSize, and an optional q search; it returns the { data, total, page, pageSize } envelope.
curl "https://app.solya.app/api/brands?page=1&pageSize=20&q=adi" \
  -H "Authorization: Bearer solya_sa_xxx"
Example response:
{
  "data": [
    { "id": "brand-uuid-adidas", "name": "Adidas", "code": "ADI", "isActive": true }
  ],
  "total": 1, "page": 1, "pageSize": 20
}

Paginate through everything

def all_brands():
    page, out = 1, []
    while True:
        res = list_brands(page=page, page_size=100)
        out.extend(res["data"])
        if page * res["pageSize"] >= res["total"]:
            break
        page += 1
    return out
Some endpoints (mostly under /api/data-platform/) use offset-based pagination (limit / offset) and return { items, limit, offset }. Check the endpoint in the API Reference tab. See Making requests.

Read inventory stock-out risks

GET /api/inventory/risks returns variants ranked by urgency, filterable by status, brandIds, shopIds, and period.
curl "https://app.solya.app/api/inventory/risks?status=critical&pageSize=50" \
  -H "Authorization: Bearer solya_sa_xxx"
Each row includes variantId, variantName, brandName, closingStock, avgDailySales, daysOfSupply, and status (critical / warning / healthy). See the stock-out risk guide. To act on a critical row, turn it into a plan — next recipe.