# 4. Consulta Categorias

**Endpoint**

```


POST https://cashtrack.com.br/api/cliente/show/categorias?page=1

```

**Headers**

```


Accept: application/json
Content-Type: application/json
Authorization: Bearer {{SEU_TOKEN}}

```

**Corpo da Requisição (Request Body)**

```json
json

{
  "id": null,
  "categoria": "analitica",
  "empresa": "",
  "nome": ""
}

```

* `id` (opcional): ID da categoria.
* `categoria`: **obrigatoriamente** "analitica" ou "sintetica".
* `empresa`: filtro pelo apelido da empresa (modo *like*) ou filtro pelo ID da empresa quando o campo conter apenas números.
* `nome`: filtro pelo nome da categoria (modo *like*).

**Exemplo de Resposta**

```json
json

{
  "current_page": 1,
  "data": [
 
        {
            "id": 84198,
            "empresa_id": 949,
            "nome": "RECEITA DINHEIRO",
            "codigo": "100001",
            "sintetica_id": 28708,
            "devolucao": 0,
            "natureza": 1,
            "tipo_conta": 2,
            "tipo_gasto": null
        },
        {
            "id": 84199,
            "empresa_id": 949,
            "nome": "RECEITA CARTÃO",
            "codigo": "100002",
            "sintetica_id": 28708,
            "devolucao": 0,
            "natureza": 1,
            "tipo_conta": 2,
            "tipo_gasto": null
        }

    // ...demais registros
  ],
  "first_page_url": "https://cashtrack.com.br/api/cliente/show/categorias?page=1",
  "from": 1,
  "last_page": 4,
  "last_page_url": "https://cashtrack.com.br/api/cliente/show/categorias?page=4",
  "links": [...],
  "next_page_url": "https://cashtrack.com.br/api/cliente/show/categorias?page=2",
  "path": "https://cashtrack.com.br/api/cliente/show/categorias",
  "per_page": 25,
  "prev_page_url": null,
  "to": 25,
  "total": 86
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cashtrack.com.br/cashtrack-api-v.1.0.2/requisicoes/4.-consulta-categorias.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
