younifyd
Menu

Get Asset Family Attribute By Code

Get an attribute of a given asset family

GET/api/rest/v1/asset-families/{asset_family_code}/attributes/{code}

Use it in a workflow

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

Request

Path parameters

asset_family_codestringrequired

This path parameter is used to specify the unique identifier of the asset family you want to retrieve or manipulate. It is essential for identifying the specific asset family in the API requests. Ensure that the asset family code is correctly formatted and corresponds to an existing asset family 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.

Response

Returns 200 with an object. Read it in later steps with {{getAssetFamilyAttributeByCode.response.data.<field>}}.

codestring

Attribute code

labelsobject

Attribute labels for each locale

Default {}

typestring

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

One oftextmedia_linknumbermedia_filesingle_optionmultiple_optionsbooleandaterecordasset_family_single_linkasset_family_multiple_linksauto_tagging

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

is_read_onlyboolean

Whether the attribute should be in read only mode only in the UI, but you can still update it with the API

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`

validation_rulestring | null

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

One ofemailurlregular_expressionnonenullDefault "none"

validation_regexpstring | null

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

Default null

allowed_extensionsarray<string>

Extensions allowed when the attribute type is `media_file`

Default []

max_file_sizestring | null

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

Default null

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`

Default null

max_valuestring | null

Maximum value allowed when the attribute type is `number`

Default null

media_typestring

For the `media_link` attribute type, it is the type of the media behind the url, to allow its preview in the PIM. For the `media_file` attribute type, it is the type of the file.

One ofimagepdfyoutubevimeoother

prefixstring | null

Prefix of the `media_link` attribute type. The common url root that prefixes the link to the media.

Default null

suffixstring | null

Suffix of the `media_link` attribute type. The common url suffix for the media.

Default null

reference_entitystring | null

Reference entity code for the `record` attribute type (see [Reference entity](https://api.akeneo.com/api-reference.html#Referenceentity))

Default null

default_valueoneOf

Default value for the attribute, automatically applied when creating a new asset. - For `number` attributes: a string representing the numeric value (e.g. `"42"`) - For `boolean` attributes: `true` or `false` - For `single_option` attributes: the option code (e.g. `"red"`) - For `multiple_options` attributes: an array of option codes (e.g. `["red", "blue"]`)

Default null

asset_family_codestring | null

Asset family code for the `asset_family_single_link` and `asset_family_multiple_links` attribute types

Default null

json
{
  "code": "model_is_wearing_size",
  "type": "text",
  "labels": {
    "en_US": "description",
    "fr_FR": "description"
  },
  "value_per_locale": true,
  "value_per_channel": false,
  "is_required_for_completeness": false,
  "is_read_only": false,
  "max_characters": 2,
  "is_textarea": false,
  "is_rich_text_editor": false,
  "validation_rule": "none",
  "validation_regexp": null
}

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