> ## 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.

# List Product Attributes

> Retrieve a paginated list of global product attributes.

Returns global attribute definitions (product-scoped attributes are excluded) with their values and category assignments.

## Query parameters

<ParamField query="limit" type="number" default="50">
  The maximum number of attributes to return.
</ParamField>

<ParamField query="offset" type="number" default="0">
  The number of attributes to skip before returning results.
</ParamField>

<ParamField query="order" type="string">
  The field to sort by, e.g. `rank` or `-created_at`.
</ParamField>

<ParamField query="fields" type="string">
  Comma-separated fields to include in the response. Prefix with `+`/`-` to add to or remove from the defaults.
</ParamField>

<ParamField query="q" type="string">
  Search term matched against attribute fields.
</ParamField>

<ParamField query="id" type="string | string[]">
  Filter by attribute ID(s).
</ParamField>

<ParamField query="handle" type="string | string[]">
  Filter by attribute handle(s).
</ParamField>

<ParamField query="type" type="string | string[]">
  Filter by type. Values: `single_select`, `multi_select`, `unit`, `toggle`, `text`.
</ParamField>

<ParamField query="is_required" type="boolean">
  Filter by whether the attribute is required.
</ParamField>

<ParamField query="is_variant_axis" type="boolean">
  Filter by whether the attribute drives variant combinations.
</ParamField>

<ParamField query="is_filterable" type="boolean">
  Filter by whether the attribute is filterable.
</ParamField>

<ParamField query="is_active" type="boolean">
  Filter by whether the attribute is active.
</ParamField>

<ParamField query="category_id" type="string | string[]">
  Filter by assigned category ID(s).
</ParamField>

<ParamField query="created_at" type="object">
  Filter by creation date using operators like `$gt`, `$lt`, `$gte`, `$lte`.
</ParamField>

<ParamField query="updated_at" type="object">
  Filter by update date using operators like `$gt`, `$lt`, `$gte`, `$lte`.
</ParamField>

<ParamField query="$and" type="object[]">
  Join multiple filter objects with a logical AND.
</ParamField>

<ParamField query="$or" type="object[]">
  Join multiple filter objects with a logical OR.
</ParamField>

## Response

<ResponseField name="product_attributes" type="object[]">
  <Expandable title="properties">
    <ResponseField name="id" type="string">The attribute's ID.</ResponseField>
    <ResponseField name="name" type="string">The attribute's name.</ResponseField>
    <ResponseField name="handle" type="string">The attribute's handle.</ResponseField>
    <ResponseField name="description" type="string">The attribute's description.</ResponseField>
    <ResponseField name="type" type="string">One of `single_select`, `multi_select`, `unit`, `toggle`, `text`.</ResponseField>
    <ResponseField name="is_required" type="boolean">Whether a value is required on products.</ResponseField>
    <ResponseField name="is_filterable" type="boolean">Whether the attribute can be used for filtering.</ResponseField>
    <ResponseField name="is_variant_axis" type="boolean">Whether the attribute drives variant combinations.</ResponseField>
    <ResponseField name="is_active" type="boolean">Whether the attribute is active.</ResponseField>
    <ResponseField name="rank" type="number">Sort rank of the attribute.</ResponseField>
    <ResponseField name="values" type="object[]">The attribute's values with `id`, `name`, `handle`, and `rank`.</ResponseField>
    <ResponseField name="categories" type="object[]">Assigned categories with `id`, `name`, and `handle`.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="count" type="number">Total number of matching attributes.</ResponseField>
<ResponseField name="offset" type="number">Number of skipped attributes.</ResponseField>
<ResponseField name="limit" type="number">Maximum number of returned attributes.</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl 'http://localhost:9000/vendor/product-attributes?type=multi_select' \
    -H 'Authorization: Bearer <token>' \
    -H 'x-seller-id: <seller_id>'
  ```

  ```ts JS Client theme={null}
  const { product_attributes, count } =
    await client.vendor.productAttributes.query({ type: "multi_select" })
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "product_attributes": [
      {
        "id": "pattr_01HXYZ",
        "name": "Color",
        "handle": "color",
        "type": "multi_select",
        "is_variant_axis": true,
        "values": [
          { "id": "pattrval_01HXYZ", "name": "Red", "rank": 0 }
        ]
      }
    ],
    "count": 1,
    "offset": 0,
    "limit": 50
  }
  ```
</ResponseExample>
