v1

latestSwagger 2.02026-07-13137761.0 MB
Family variant

Update/create several family variants

This endpoint allows you to update and/or create several family variants at once, for a given family.

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

Path parameters

family_codestring required

Code of the family

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

OK

lineinteger

Line number

identifierstring

Resource identifier, only filled when the resource is a product

codestring

Resource code, only filled when the resource is not a product

status_codeinteger

HTTP status code, see <a href="/documentation/responses.html#client-errors">Client errors</a> to understand the meaning of each code

messagestring

Message explaining the error