v1

latestSwagger 2.02026-07-13137761.0 MB
Family variant

Update/create a family variant

This endpoint allows you to update a given family variant. Know more about <a href="/documentation/update.html#update-behavior">Update behavior</a>. Note that if no family variant exists for the given code, it creates it.

patch/api/rest/v1/families/{family_code}/variants/{code}

Path parameters

family_codestring required

Code of the family

codestring required

Code of the resource

Request body

codestring required

Family variant code

Example request

{
  "code": "shoesVariant",
  "labels": {
    "en_US": "Shoes variant",
    "fr_FR": "Variante de chaussures"
  },
  "variant_attribute_sets": [
    {
      "level": 1,
      "attributes": [
        "color",
        "material"
      ],
      "axes": [
        "color"
      ]
    },
    {
      "level": 2,
      "attributes": [
        "sku",
        "size"
      ],
      "axes": [
        "size"
      ]
    }
  ]
}

Response

Created