← Home
PATCH/hyax-api/v1/products/:id/variants/:variantId

Update variant

Partial update. Changing `sku` changes the variant's public buy URL, so any link already shared stops resolving by code (the row id keeps working).

Base URL: https://platform.hyax.com · Replace YOUR_API_KEY with your team API key.

Request body

FieldRequiredDescription
skuNoSKU code, unique per product
titleNoDisplay label, or null to fall back to the code
priceNoNumber or null
inventoryNoNumber, or null for unlimited
weightNoNumber or null
imageNoImage URL or null
unitsGrantedNoNumber or null
optionsNoMove the variant to a different combination, by name

Request

curl -X PATCH 'https://platform.hyax.com/hyax-api/v1/products/clx_example_id/variants/:variantId' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "price": 32,
    "inventory": 40
  }'

Response

{
  "success": true,
  "data": {
    "id": "clx…",
    "sku": "BLACK-XL",
    "price": 32,
    "inventory": 40,
    "isSoldOut": false,
    "buyUrl": "https://shop.example.com/buy/studio-tee?variant=BLACK-XL"
  }
}