younifyd
Menu

Post Family Variant

Create a new family variant

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

Use it in a workflow

  1. Add a step and choose the Akeneo connector.
  2. Pick the Post Family Variant action (under Family variant).
  3. Fill in the fields below, then reference the result from later steps as {{postFamilyVariant.response.data}}.

Request

Path parameters

family_codestringrequired

This path parameter is used to specify the unique identifier of the family you want to retrieve or manipulate. It is essential for identifying the specific family in the API requests. Ensure that the family code is correctly formatted and corresponds to an existing family in the system.

Request body

Enter the body as JSON in the step's Body field.

codestringrequired

Family variant code

variant_attribute_setsarray<object>required

Attributes distribution according to the enrichment level

levelintegerrequired

Enrichment level

axesarray<string>required

Codes of attributes used as variant axes

Default []

attributesarray<string>

Codes of attributes bind to this enrichment level

Default []

labelsobject

Family variant labels for each locale

Default {}

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

Response

Returns 201 with a any. Read it in later steps with {{postFamilyVariant.response.data.<field>}}.

Need more? See the Akeneo guide for connection setup and behaviour shared by every action.