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

# Product categories

> GET /v1/products/categories and /v1/products/categories/:id - Fetch workspace categories with translations

## Endpoints

```
GET https://api.voyantcloud.com/v1/products/categories
GET https://api.voyantcloud.com/v1/products/categories/:id
```

Retrieve product categories for the current workspace. Responses honor the optional `lang` query param to return translated names/slugs (fallback to the base value when a translation is missing). Results are workspace-scoped and cached for faster repeated reads.

## Authentication

<ParamField header="Authorization" type="string" required>
  Bearer token with `catalog:read` or `products:read` scope (e.g. <code>Authorization: Bearer YOUR\_API\_KEY</code>)
</ParamField>

## Query parameters

<ParamField query="lang" type="string">
  Locale to use for translations (e.g., <code>en</code>, <code>fr</code>). Defaults to the base category values when omitted.
</ParamField>

<ParamField query="version" type="integer" default="1">
  Category version. Only for the collection endpoint.
</ParamField>

## Collection: list categories

```
GET /v1/products/categories
```

Returns the category tree for the workspace.

### Response

<ResponseField name="items" type="array" required>
  Array of category tree nodes

  <Expandable title="Category fields">
    <ResponseField name="id" type="string">Category ID</ResponseField>
    <ResponseField name="key" type="string">Stable key</ResponseField>
    <ResponseField name="name" type="string">Localized name (or base name if translation missing)</ResponseField>
    <ResponseField name="slug" type="string">Localized slug (or base slug if translation missing)</ResponseField>
    <ResponseField name="path" type="string">Full category path</ResponseField>
    <ResponseField name="level" type="integer">Depth level (root is 0)</ResponseField>
    <ResponseField name="parentId" type="string or null">Parent category ID</ResponseField>
    <ResponseField name="children" type="array">Child categories (same shape)</ResponseField>
  </Expandable>
</ResponseField>

### Example

```bash cURL theme={null}
curl "https://api.voyantcloud.com/v1/products/categories?lang=fr" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Single: get a category

```
GET /v1/products/categories/:id
```

Returns a single category with translations applied.

### Response

<ResponseField name="data" type="object" required>
  Category object with translated `name`/`slug` when available. Fields match the collection item shape (no `children` beyond the requested node).
</ResponseField>

### Example

```bash cURL theme={null}
curl "https://api.voyantcloud.com/v1/products/categories/6f8c6f0d-1b2a-4f23-9a6e-123456789abc?lang=es" \
  -H "Authorization: Bearer YOUR_API_KEY"
```
