Skip to main content

Update Variation

Update an existing product variation. Only include the fields you want to change.

Endpointโ€‹

PUT /v1/store-products/{id}/variations/{variationId}

Authenticationโ€‹

Requires an API key with the store:write scope.

Parametersโ€‹

ParameterTypeLocationDescription
idintegerpathThe store product ID
variationIdintegerpathThe product variation ID

Request Bodyโ€‹

All fields are optional. Only included fields will be updated.

FieldTypeDescription
skustringStock keeping unit (max 255 characters)
price_overridenumber|nullPrice override (min 0). Set to null to revert to the base product price.
stock_quantityintegerStock quantity (min 0)
option_valuesarrayArray of option value objects (min 1 item)
option_values[].option_idintegerThe variation option ID
option_values[].valuestringThe selected value for this option (max 100 characters)
caution

If option_values is provided, it replaces all existing option values for this variation. The variation name will be regenerated from the new option values.

Responseโ€‹

Success (200 OK)โ€‹

{
"data": {
"id": 1,
"name": "Medium / Blue",
"sku": "WIDGET-MD-B",
"price_override": 18.99,
"stock_quantity": 30,
"option_values": [
{
"option_id": 1,
"option_name": "Size",
"value": "Medium"
},
{
"option_id": 2,
"option_name": "Color",
"value": "Blue"
}
],
"created_at": "2026-02-15T12:00:00+00:00",
"updated_at": "2026-02-15T14:30:00+00:00"
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-15T14:30:00+00:00"
}
}

Errorsโ€‹

StatusCodeDescription
401authentication_requiredNo API key provided
401invalid_api_keyInvalid API key
403insufficient_scopeAPI key lacks store:write scope
404resource_not_foundStore product or variation does not exist
422validation_errorInvalid request body

Example Requestโ€‹

curl -X PUT "https://app.equipdash.com/api/v1/store-products/1/variations/1" \
-H "Authorization: Bearer eqd_live_abc123xyz789..." \
-H "Content-Type: application/json" \
-d '{
"sku": "WIDGET-MD-B",
"price_override": 18.99,
"stock_quantity": 30,
"option_values": [
{
"option_id": 1,
"value": "Medium"
},
{
"option_id": 2,
"value": "Blue"
}
]
}'