Skip to main content
GET
/
api
/
variants
List variants
curl --request GET \
  --url https://app.solya.app/api/variants \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "brandId": "brand-uuid-adidas",
      "brandName": "Adidas",
      "collectionId": "collection-uuid-ss24",
      "costPrice": 42,
      "displayName": "Superstar Black EU42",
      "fullName": "Adidas Superstar — Black/White — EU 42",
      "grossMarginPct": 53.3,
      "id": "variant-uuid-001",
      "isActive": true,
      "productId": "product-uuid-001",
      "productName": "Adidas Superstar",
      "retailPrice": 89.95,
      "sku": "ADI-SUPERSTAR-BLK-42"
    },
    {
      "brandId": "brand-uuid-nike",
      "brandName": "Nike",
      "collectionId": "collection-uuid-ss24",
      "costPrice": 50,
      "displayName": "Air Force 1 White EU41",
      "fullName": "Nike Air Force 1 — White — EU 41",
      "grossMarginPct": 54.5,
      "id": "variant-uuid-002",
      "isActive": true,
      "productId": "product-uuid-002",
      "productName": "Nike Air Force 1",
      "retailPrice": 109.95,
      "sku": "NKE-AF1-WHT-41"
    }
  ],
  "page": 1,
  "pageSize": 20,
  "total": 248
}

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

Case-insensitive substring search query

brandId
string

Filter by brand UUID

supplierId
string

Filter by supplier UUID

productId
string

Filter by product UUID

collectionId
string

Filter by collection UUID

Response

Successful response

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