# PM11 - Get the product attribute configuration

Description

Retrieves all attributes for parents and children of the requested hierarchy


Call Frequency

Recommended usage: Every hour
Maximum usage: Every hour

Endpoint: GET /api/products/attributes

## Query parameters:

  - `hierarchy` (string)
    Code of the hierarchy (category) for which to retrieve the attributes. If not specified, all attributes are retrieved.

  - `max_level` (integer)
    Number of children hierarchy (category) levels to retrieve. If not specified, attributes from all children hierarchies are retrieved.

  - `channels` (array)
    List of channel codes

  - `with_roles` (boolean)
    Set to "true" to get only the attributes that have roles.

## Response 200 fields (application/json):

  - `attributes` (array, required)
    List of attributes

  - `attributes.channels` (array)
    Channels

  - `attributes.channels.code` (string, required)
    Channel code

  - `attributes.code` (string, required)
    Attribute code

  - `attributes.description` (string)
    Attribute description

  - `attributes.description_translations` (array, required)
    Translations of the attribute description

  - `attributes.description_translations.locale` (string, required)
    Locale

  - `attributes.description_translations.value` (string, required)
    Translation

  - `attributes.example` (string)
    Attribute example to help sellers when they fill the product creation form

  - `attributes.hierarchy_code` (string)
    The code of the hierarchy (category) this attribute belongs to. If this field is empty, the attribute is shared among all hierarchies.

  - `attributes.label` (string)
    Attribute label

  - `attributes.label_translations` (array, required)
    Translations of the attribute label

  - `attributes.label_translations.locale` (string, required)
    Locale

  - `attributes.label_translations.value` (string, required)
    Translation

  - `attributes.locale` (string)
    Attribute localization.

The language format can either be:
- ISO-639 (E.g. "en")
- ISO-639_ISO-3166 (E.g. "en_US")

  - `attributes.requirement_level` (string, required)
    Requirement level of the attribute
    Enum: "OPTIONAL", "REQUIRED", "RECOMMENDED", "DISABLED"

  - `attributes.roles` (array, required)
    Attribute roles

  - `attributes.roles.parameters` (array, required)
    Attribute role parameters

  - `attributes.roles.parameters.name` (string, required)
    Name of the parameter

  - `attributes.roles.parameters.value` (string, required)
    Value of the parameter

  - `attributes.roles.type` (string, required)
    Role type of the attribute

  - `attributes.transformations` (string)
    Transformations applied to the attribute (a list of transformations separated by commas)

  - `attributes.type` (string, required)
    Attribute type

  - `attributes.type_parameters` (array)
    Specificities of the attribute type, for example the date format, or the maximum size of a media

  - `attributes.type_parameters.name` (string, required)
    Name of the parameter

  - `attributes.type_parameters.value` (string, required)
    Value of the parameter

  - `attributes.unique_code` (string)
    Unique code of the attribute

  - `attributes.validations` (string)
    Validations applied to the attribute (a list of validations separated by commas)

  - `attributes.variant` (boolean, required)
    Whether or not the attribute is a variation axis. Possible values: true or false

  - `attributes.default_value` (string)
    Default value for value list type attributes

  - `attributes.required` (boolean, required)
    Whether or not the attribute is required

  - `attributes.type_parameter` (string, required)
    Type parameter

  - `attributes.values` (array)
    A list of authorized values for this attribute

  - `attributes.values.code` (string, required)
    Value code

  - `attributes.values_list` (string)
    This code points to the list defining the authorized values for this attribute.


