Skip to content

Managing Variant Groups (V2)

Variant Groups are used by VARIABLE products to organize different options into logical categories, like a "Midnight Blue" color group containing different storage sizes.

1. Add a Variant Group

Adds a new group with at least one SKU.

Endpoint

POST /v2/products/{productId}/variant-groups

JSON Sample

json
{
  "attributeName": "Color",
  "attributeValue": "Sunset Red",
  "image": "file_abc123xyz",
  "colorId": "color_id_from_palette",
  "skus": [
    {
      "price": 499.00,
      "quantityInStock": 15,
      "attributes": { "Storage": "128GB" }
    }
  ]
}

2. Update a Variant Group

Partially update the metadata of an existing variant group (e.g., changing the hero image or the display color).

Endpoint

PATCH /v2/products/{productId}/variant-groups/{groupId}

JSON Sample

json
{
  "attributeValue": "Flame Red",
  "image": "file_newimage987abc"
}

Note: This operation only changes the group metadata. To update price or stock, use the SKU Update endpoint.


3. Remove a Variant Group

Deletes a variant group and all its associated SKUs.

Endpoint

DELETE /v2/products/{productId}/variant-groups/{groupId}


Fields Table

FieldTypeDescription
attributeNamestringThe dimension name (e.g., Color, Material).
attributeValuestringThe display value (e.g., Red, Stainless Steel).
imagestringFile ID for the hero image of this variant group. Upload the image first via the upload endpoint and use the returned id.
colorIdstringOptional reference to our system color palette.
skuslistInitial SKUs for the group (Required for POST).

Build with joy