Skip to main content

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โ€‹

ParameterTypeLocationDescription
idintegerpathThe product ID

Request Bodyโ€‹

FieldTypeRequiredDescription
skustringNoUnique SKU for this variation
descriptionstringNoShort 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
imagestringNoImage URL for this variation
valuesarrayYesArray of property values
values[].property_idintegerYesVariation property ID
values[].valuestringYesValue 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โ€‹

StatusCodeDescription
401authentication_requiredNo API key provided
403insufficient_scopeAPI key lacks products:write scope
404resource_not_foundProduct not found
422validation_errorInvalid request data

Common Validation Errorsโ€‹

  • Variations not enabled: Update the product with "variations": true before adding variations
  • Invalid property_id: The property doesn't exist for this product
  • Values required: At least one property value must be provided