← Home
PUT/hyax-api/v1/products/:id/options

Update product options

Replaces the product's dimensions. Ids and `order` are derived from the names when omitted, so names alone are enough — but ids are *stable* identifiers that existing variants reference, so renaming a value creates a new one rather than renaming in place. Saving at least one group sets `hasVariants`. This defines the grid only: call **Generate variants** next to create the combinations. Capped at 250 combinations.

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

Request body

FieldRequiredDescription
optionGroups Required Array of `{ id?, name, order?, values: [{ id?, name, order? }] }`. May also be sent as a bare array.

Request

curl -X PUT 'https://platform.hyax.com/hyax-api/v1/products/clx_example_id/options' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "optionGroups": [
      {
        "name": "Color",
        "values": [
          {
            "name": "Black"
          },
          {
            "name": "White"
          }
        ]
      },
      {
        "name": "Size",
        "values": [
          {
            "name": "XS"
          },
          {
            "name": "S"
          },
          {
            "name": "M"
          }
        ]
      }
    ]
  }'

Response

{
  "success": true,
  "data": [
    {
      "id": "color",
      "name": "Color",
      "order": 0,
      "values": [
        { "id": "black", "name": "Black", "order": 0 },
        { "id": "white", "name": "White", "order": 1 }
      ]
    }
  ],
  "message": "Options saved. Call generate-variants to create the combinations they describe."
}