Skip to main content
GET
/
api
/
products
/
{id}
/
variants
List product variants
curl --request GET \
  --url https://app.solya.app/api/products/{id}/variants \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "colors": [
        "Black"
      ],
      "gender": "MALE",
      "id": "variant-uuid-a",
      "productId": "product-uuid-1",
      "shape": "LOW",
      "sold": 37,
      "stock": 8,
      "variant": "42 / Black"
    },
    {
      "colors": [
        "Black"
      ],
      "gender": "MALE",
      "id": "variant-uuid-b",
      "productId": "product-uuid-1",
      "shape": "LOW",
      "sold": 52,
      "stock": 3,
      "variant": "43 / Black"
    }
  ],
  "page": 1,
  "pageSize": 20,
  "total": 6
}

Authorizations

Authorization
string
header
required

User session token issued by NextAuth. For human users accessing Solya via the web application.

Path Parameters

id
string
required

Unique identifier of the parent product (UUID)

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

Response

Successful response

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