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

# Listar categorías

> Devuelve el árbol de categorías del marketplace

Devuelve el árbol de categorías del marketplace. Se usa para navegar el árbol (drill-down con `parentUuid`) o buscar por nombre (`name`), y así elegir la categoría con la que se clasificará un producto.

> [!NOTE]
>
> Las categorías **no** incluyen sus atributos en este endpoint; para eso usa [`GET /v2/inventory/categories/{uuid}`](https://docs.cashea.app/apis/inventory/get-category-by-id).

## Authorization

**Authorization** `string` *required*

Formato: `ApiKey TU_API_KEY`

## Query Parameters

**parentUuid** `string`

uuid de una categoría. Devuelve solo sus hijos directos. Si se omite, devuelve el árbol completo (plano).

**name** `string`

Filtra categorías por nombre. Máximo 256 caracteres.

**limit** `integer` (default: 50)

Resultados por página. Máximo 200.

**offset** `integer` (default: 0)

Resultados a saltar (paginación).

## Response

**data** `array`

Lista de categorías.

**categoría**

**uuid** `string`

uuid de la categoría.

**name** `string`

Nombre de la categoría.

**parentUuid** `string | null`

uuid de la categoría padre, o `null` si es una categoría raíz.

**hasChildren** `boolean`

Si la categoría tiene subcategorías. Las categorías con `hasChildren: false` son hoja y son las únicas que se pueden asignar a un producto.

**pagination** `object`

**paginación**

**offset** `integer`

**limit** `integer`

**total** `integer`

**hasMore** `boolean`

## Errors

| Código | Descripción |
| - | - |
| `400` | Parámetros inválidos (por ejemplo, `limit` mayor a 200). |

```bash cURL theme={null}
curl --request GET \
  --url 'https://sandbox.external.cashea.app/v2/inventory/categories?limit=5' \
  --header 'Authorization: ApiKey TU_API_KEY'
```

```json Ejemplo 200 theme={null}
{
  "data": [
    { "uuid": "49cba8d2-613d-4d35-b4cb-11968d1ba6fc", "name": "Estética y Belleza", "parentUuid": null, "hasChildren": true },
    { "uuid": "67f9fa1e-fc53-4cd1-9e18-2b92a1fc82f3", "name": "Tecnología", "parentUuid": null, "hasChildren": true }
  ],
  "pagination": { "offset": 0, "limit": 5, "total": 2346, "hasMore": true }
}
```


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