younifyd
Menu

Patch Reference Entity Attribute By Code

Update/create an attribute of a given reference entity

PATCH/api/rest/v1/reference-entities/{reference_entity_code}/attributes/{code}

Use it in a workflow

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

Request

Path parameters

reference_entity_codestringrequired

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

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.

Request body

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

codestring

Attribute code

labelsobject

Attribute labels per locale

Default {}

typestring

Attribute type. See [type](https://api.akeneo.com/concepts/reference-entities.html#reference-entity-attribute) section for more details.

One oftextimagenumbersingle_optionmultiple_optionsreference_entity_single_linkreference_entity_multiple_linksasset_collection

value_per_localeboolean

Whether the attribute is localizable, i.e. can have one value by locale

Default false

value_per_channelboolean

Whether the attribute is scopable, i.e. can have one value by channel

Default false

is_required_for_completenessboolean

Whether the attribute should be part of the record's completeness calculation

Default false

max_charactersinteger | null

Maximum number of characters allowed for the value of the attribute when the attribute type is `text`

is_textareaboolean

Whether the UI should display a text area instead of a simple field when the attribute type is `text`

Default false

is_rich_text_editorboolean

Whether the UI should display a rich text editor instead of a simple text area when the attribute type is `text`

Default false

validation_rulestring

Validation rule type used to validate the attribute value when the attribute type is `text`

One ofemailurlregular_expressionnoneDefault "none"

validation_regexpstring | null

Regexp expression used to validate the attribute value when the attribute type is `text`

allowed_extensionsarray<string>

Extensions allowed when the attribute type is `image`

Default []

max_file_sizestring | null

Max file size in MB when the attribute type is `image`

decimals_allowedboolean

Whether decimals are allowed when the attribute type is `number`

Default false

min_valuestring | null

Minimum value allowed when the attribute type is `number`

max_valuestring | null

Maximum value allowed when the attribute type is `number`

json
{
  "code": "description",
  "labels": {
    "en_US": "The description",
    "fr_FR": "La description"
  },
  "type": "text",
  "value_per_locale": true,
  "value_per_channel": false,
  "is_required_for_completeness": true,
  "max_characters": 255,
  "is_textarea": true,
  "is_rich_text_editor": true,
  "validation_rule": "none",
  "validation_regexp": null,
  "allowed_extensions": [
    "png",
    "jpg"
  ]
}

Response

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

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

Patch Reference Entity Attribute By Code — Akeneo — Documentation