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

> Retrieve an active, public product category by ID.

Returns a single category; inactive or internal categories return a `404`.

## Path parameters

**id** `string` *required*

The category's ID.

## Query parameters

**fields** `string`

Comma-separated fields and relations to include; prefix with `+`/`-` to add to or remove from the defaults.

**include\_ancestors\_tree** `boolean`

Include the category's ancestors in `parent_category`.

**include\_descendants\_tree** `boolean`

Include the category's descendants in `category_children`.

## Response

**product\_category** `object`

**properties**

**id** `string`

The category's ID.

**name** `string`

The category's name.

**description** `string`

The category's description.

**handle** `string`

URL-safe handle.

**rank** `number`

Sort rank among siblings.

**parent\_category\_id** `string | null`

ID of the parent category.

**parent\_category** `object | null`

The parent category.

**category\_children** `object[]`

Direct child categories.

**metadata** `object | null`

Custom key-value data.

**created\_at** `string`

Creation timestamp.

**updated\_at** `string`

Last update timestamp.

```bash cURL theme={null}
curl 'http://localhost:9000/store/product-categories/pcat_01JB2K6A2B?include_descendants_tree=true' \
  -H 'x-publishable-api-key: pk_01JB2K3XYZ'
```

```ts JS Client theme={null}
const { product_category } = await client.store.productCategories.$id.query({
  $id: "pcat_01JB2K6A2B",
  include_descendants_tree: true,
})
```

```json 200 theme={null}
{
  "product_category": {
    "id": "pcat_01JB2K6A2B",
    "name": "Shirts",
    "description": "",
    "handle": "shirts",
    "rank": 0,
    "parent_category_id": null,
    "parent_category": null,
    "category_children": [{ "id": "pcat_01JB2K6H7J", "name": "Linen Shirts" }],
    "metadata": null,
    "created_at": "2026-05-01T10:00:00.000Z",
    "updated_at": "2026-05-01T10:00:00.000Z"
  }
}
```


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