Add Variation
Add a new variation to a product. Variations must be enabled on the product first (set "variations": true), and variation properties (created in the EquipDash portal, see the variations overview) must exist before adding variations.
Endpointโ
POST /v1/products/{id}/variations
Authenticationโ
Requires an API key with the products:write scope.
Parametersโ
| Parameter | Type | Location | Description |
|---|---|---|---|
id | integer | path | The product ID |
Request Bodyโ
| Field | Type | Required | Description |
|---|---|---|---|
sku | string | No | Unique SKU for this variation |
description | string | No | Short explainer shown under the variation name when customers choose an option (max 255 characters), e.g. a size guide like 5'5" - 5'10" / 168cm - 178cm |
image | string | No | Image URL for this variation |
values | array | Yes | Array of property values |
values[].property_id | integer | Yes | Variation property ID |
values[].value | string | Yes | Value for this property |
Responseโ
Success (201 Created)โ
{
"data": {
"id": 3,
"sku": "BIKE-L-RED",
"display_name": "BIKE-L-RED",
"description": "Riders 5'9\" and up",
"image": null,
"values": [
{
"property_id": 1,
"property_name": "Size",
"value": "Large"
},
{
"property_id": 2,
"property_name": "Color",
"value": "Red"
}
]
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-01T10:00:00+00:00"
}
}
Example Requestโ
curl -X POST "https://app.equipdash.com/api/v1/products/1/variations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sku": "BIKE-L-RED",
"description": "Riders 5ft 9in and up",
"values": [
{
"property_id": 1,
"value": "Large"
},
{
"property_id": 2,
"value": "Red"
}
]
}'
Errorsโ
| Status | Code | Description |
|---|---|---|
| 401 | authentication_required | No API key provided |
| 403 | insufficient_scope | API key lacks products:write scope |
| 404 | resource_not_found | Product not found |
| 422 | validation_error | Invalid request data |
Common Validation Errorsโ
- Variations not enabled: Update the product with
"variations": truebefore adding variations - Invalid property_id: The property doesn't exist for this product
- Values required: At least one property value must be provided