younifyd
Menu

Patch Family By Code

Update/create a family

PATCH/api/rest/v1/families/{code}

Use it in a workflow

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

Request

Path parameters

codestringrequired

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

Headers

Content-Typestringrequired

This header indicates the media type of the resource being sent to the server. It is used to specify the format of the request body, allowing the server to correctly interpret the data being sent. Equal to 'application/json' or 'application/x-www-form-urlencoded', no other value allowed.

Default "application/json"

Request body

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

codestring

Family code

attribute_as_labelstring

Attribute code used as label

attribute_as_imagestring | null

Attribute code used as the main picture in the user interface

attributesarray<string>

Attribute codes that compose the family. Each string in the array must be an existing attribute code

attribute_requirementsobject

Attribute codes of the family that are required for the completeness calculation for each channel

labelsobject

Family labels for each locale. The `localeCode` must be the code of an existing and activated locale

Default {}

parentstring | null

The code of the parent family. If not provided, the family is a root family

json
{
  "code": "camcorders",
  "attribute_as_label": "short_description",
  "attribute_as_image": "picture",
  "attributes": [
    "sku",
    "name",
    "description",
    "price",
    "color",
    "picture"
  ],
  "attribute_requirements": {
    "ecommerce": [
      "sku",
      "name",
      "description",
      "price",
      "color"
    ],
    "tablet": [
      "sku",
      "name",
      "description",
      "price"
    ]
  },
  "labels": {
    "en_US": "Caps",
    "fr_FR": "Casquettes"
  },
  "parent": "clothing"
}

Response

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

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

Was this page helpful?