> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Product Attribute

> Retrieve a catalog product attribute by ID.

Returns a single attribute with its values and linked categories.

## Path parameters

**id** `string` *required*

The attribute's ID.

## Query parameters

**fields** `string`

Comma-separated list of fields to include, prefix with `+`/`-` to add or remove from defaults.

## Response

**product\_attribute** `object`

**properties**

**id** `string`

The attribute's ID.

**name** `string`

Attribute name.

**handle** `string`

Unique URL-safe handle.

**description** `string`

Attribute description.

**type** `string`

One of `single_select`, `multi_select`, `unit`, `toggle`, `text`.

**is\_required** `boolean`

Whether a value is required on products.

**is\_filterable** `boolean`

Whether the attribute can be used as a storefront filter.

**is\_variant\_axis** `boolean`

Whether the attribute drives variant generation.

**is\_internal** `boolean`

Whether the attribute is internal, visible only to operators.

**is\_active** `boolean`

Whether the attribute is active.

**created\_by** `string`

ID of the actor who created the attribute.

**product\_id** `string`

Owning product's ID for product-scoped attributes, otherwise `null`.

**rank** `number`

Sort rank of the attribute.

**values** `object[]`

The attribute's values.

**properties**

**id** `string`

The value's ID.

**name** `string`

Value name.

**handle** `string`

Unique URL-safe handle.

**rank** `number`

Sort rank.

**is\_active** `boolean`

Whether the value is active.

**categories** `object[]`

Linked categories with `id`, `name`, and `handle`.

**metadata** `object`

Custom key-value data.

**created\_at** `string`

Creation timestamp.

**updated\_at** `string`

Last update timestamp.

```bash cURL theme={null}
curl 'http://localhost:9000/admin/product-attributes/pattr_01HXYZABCDEF' \
  -H 'Authorization: Bearer <token>'
```

```ts JS Client theme={null}
const { product_attribute } = await client.admin.productAttributes.$id.query({
  $id: "pattr_01HXYZABCDEF",
})
```

```json 200 theme={null}
{
  "product_attribute": {
    "id": "pattr_01HXYZABCDEF",
    "name": "Material",
    "handle": "material",
    "type": "single_select",
    "is_required": false,
    "is_filterable": true,
    "is_variant_axis": false,
    "is_internal": false,
    "is_active": true,
    "values": [
      { "id": "pattrval_01HXYZABCDEF", "name": "Linen", "rank": 0 }
    ]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.