GET
/hyax-api/v1/products/:id/variantsList variants
Each variant carries the `buyUrl` that opens checkout with it preselected. `exposesVariants` is false on a digital product sold as a single item — the rows exist but the storefront ignores them, so their buy URLs would not select anything.
Base URL: https://platform.hyax.com · Replace YOUR_API_KEY with your team API key.
Query parameters
| Name | Required | Description |
|---|---|---|
includeRetired | No | `true` to include retired variants (default: false) |
Request
curl -X GET 'https://platform.hyax.com/hyax-api/v1/products/clx_example_id/variants' \
-H 'Authorization: Bearer YOUR_API_KEY'Response
{
"success": true,
"data": [
{
"id": "clx…",
"sku": "BLACK-XS",
"title": "Black / XS",
"price": 29,
"inventory": 12,
"isSoldOut": false,
"weight": null,
"image": null,
"unitsGranted": null,
"sortOrder": 0,
"isRetired": false,
"options": [{ "group": "Color", "value": "Black" }],
"optionValues": [{ "groupId": "color", "valueId": "black" }],
"variantRef": "BLACK-XS",
"buyPath": "/buy/studio-tee?variant=BLACK-XS",
"buyUrl": "https://shop.example.com/buy/studio-tee?variant=BLACK-XS"
}
],
"optionGroups": [],
"exposesVariants": true
}