Variants
Variants represent product options (size, color, etc.) and are returned as part of the product detail response.
Variants are not accessed via a separate endpoint. They are included in the response from GET /api/v1/catalogue/products/{id}.
Pricing Model
Each variant has a price_adjustment relative to the product's default_price. Final variant price = default_price + price_adjustment.
Example
JSON
{
"id": "prod_abc123",
"name": "Latte",
"default_price": "5.00",
"variants": [
{
"id": "var_small",
"name": "Small (8oz)",
"price_adjustment": "-1.00",
"is_default": false,
"sku": "LATTE-SM"
},
{
"id": "var_regular",
"name": "Regular (12oz)",
"price_adjustment": "0.00",
"is_default": true,
"sku": "LATTE-REG"
},
{
"id": "var_large",
"name": "Large (16oz)",
"price_adjustment": "1.50",
"is_default": false,
"sku": "LATTE-LG"
}
]
}Variant Object
| Field | Type | Description |
|---|---|---|
id | string | Unique variant identifier |
name | string | Display name |
price_adjustment | string | Price delta from default_price (decimal string, can be negative) |
is_default | boolean | Whether this is the pre-selected variant |
sku | string | null | Stock keeping unit |
is_active | boolean | Whether variant is available |
duration_minutes | integer | null | Service duration (service products only) |