---
title: "Get an attribute"
method: GET
path: "/api/rest/v1/attributes/{code}"
tags: ["Attribute"]
---

# Get an attribute

`GET /api/rest/v1/attributes/{code}`

## Request

- Base URL: `http://demo.akeneo.com`
- URL: `http://demo.akeneo.com/api/rest/v1/attributes/{code}`
- Auth: none declared

This endpoint allows you to get the information about a given attribute.

## Path parameters

- `code` string, required

## Query parameters

- `with_table_select_options` boolean

## Response `200`

OK

- object
  - `code` string, required: Attribute code
  - `type` 'pim_catalog_identifier' | 'pim_catalog_metric' | 'pim_catalog_number' | 'pim_catalog_reference_data_multi_select' | 'pim_catalog_reference_data_simple_select' | 'pim_catalog_simpleselect' | 'pim_catalog_multiselect' | 'pim_catalog_date' | 'pim_catalog_textarea' | 'pim_catalog_text' | 'pim_catalog_file' | 'pim_catalog_image' | 'pim_catalog_price_collection' | 'pim_catalog_boolean' | 'akeneo_reference_entity' | 'akeneo_reference_entity_collection' | 'pim_catalog_asset_collection' | 'pim_catalog_product_link', required: Attribute type. See <a href='/concepts/catalog-structure.html#attribute'>type</a> section for more details.
  - `labels` object: Attribute labels for each locale
    - `localeCode` string: Attribute label for the locale `localeCode`
  - `group` string, required: Attribute group
  - `group_labels` object: Group labels for each locale
    - `localeCode` string: Group label for the locale `localeCode`
  - `sort_order` integer: Order of the attribute in its group
  - `localizable` boolean: Whether the attribute is localizable, i.e. can have one value by locale
  - `scopable` boolean: Whether the attribute is scopable, i.e. can have one value by channel
  - `available_locales` string[]: To make the attribute locale specfic, specify here for which locales it is specific
  - `unique` boolean: Whether two values for the attribute cannot be the same
  - `useable_as_grid_filter` boolean: Whether the attribute can be used as a filter for the product grid in the PIM user interface
  - `max_characters` integer: Number maximum of characters allowed for the value of the attribute when the attribute type is `pim_catalog_text`, `pim_catalog_textarea` or `pim_catalog_identifier`
  - `validation_rule` string: Validation rule type used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`
  - `validation_regexp` string: Regexp expression used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`
  - `wysiwyg_enabled` boolean: Whether the WYSIWYG interface is shown when the attribute type is `pim_catalog_textarea`
  - `number_min` string: Minimum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`
  - `number_max` string: Maximum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`
  - `decimals_allowed` boolean: Whether decimals are allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`
  - `negative_allowed` boolean: Whether negative values are allowed when the attribute type is `pim_catalog_metric` or `pim_catalog_number`
  - `metric_family` string: Metric family when the attribute type is `pim_catalog_metric`
  - `default_metric_unit` string: Default metric unit when the attribute type is `pim_catalog_metric`
  - `date_min` string, date-time: Minimum date allowed when the attribute type is `pim_catalog_date`
  - `date_max` string, date-time: Maximum date allowed when the attribute type is `pim_catalog_date`
  - `allowed_extensions` string[]: Extensions allowed when the attribute type is `pim_catalog_file` or `pim_catalog_image`
  - `max_file_size` string: Max file size in MB when the attribute type is `pim_catalog_file` or `pim_catalog_image`
  - `reference_data_name` string: Reference entity code when the attribute type is `akeneo_reference_entity` or `akeneo_reference_entity_collection` OR Asset family code when the attribute type is `pim_catalog_asset_collection`
  - `default_value` boolean: Default value for a Yes/No attribute, applied when creating a new product or product model (only available since the 5.0)
  - `table_configuration` object[]: Configuration of the Table attribute (columns)
    - `code` string, required: Column code
    - `data_type` 'select' | 'text' | 'number' | 'boolean' | 'incremental_number' | 'reference_entity' | 'product_link' | 'measurement' | 'date', required: Column data type
    - `validations` object: User defined validation constraints on the cell content
      - `min` number: minimum value of a numeric cell
      - `max` number: maximum value of a numeric cell
      - `decimals_allowed` boolean: whether the value of a numeric cell can hold a decimal part
      - `max_length` number: maximum length of a text cell
    - `labels` object: Column labels for each locale
      - `localeCode` string: Column label for the locale `localeCode`
    - `is_required_for_completeness` boolean: Defines if the column should be entirely filled for the attribute to be considered complete
  - `is_main_identifier` boolean: Is this attribute main identifier when attribute type is `pim_catalog_identifier`
  - `is_mandatory` boolean: This attribute must be enriched from the moment a product is created. It will be mandatory across all families.
  - `decimal_places_strategy` string: Defines the decimal places strategy. Available options are `round`, `forbid` and `trim`.
  - `decimal_places` number: Defines the number of decimal places when decimal places strategy is `round` or `forbid`.

## Other responses

- `401`: Authentication required
- `403`: Access forbidden
- `404`: Resource not found
- `406`: Not Acceptable

---

[API](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api.md) - [All operations](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api/revisions/d8bda9b93b59?raw)
