# Consulta de Contas Existentes

Verifica se o CPF possui contas vinculadas na base de dados interna da instituição.

- **Identificador:** `pessoas/consulta-de-contas-existentes`
- **Categoria:** Outros e utilitários
- **Audiência:** PF
- **Endpoint:** `POST /api/v1/{tenant}/pessoas/consulta-de-contas-existentes`
- **Preço de tabela:** sob consulta
- **Página:** https://www.proteo.com.br/api/consultas/pessoas/consulta-de-contas-existentes

## Quando usar

Descrição

O serviço de Consulta de Contas Existentes verifica se a pessoa consultada já possui contas vinculadas

na base de dados interna da instituição, retornando todas as contas encontradas com seus dados cadastrais.

## Parâmetros (corpo JSON)

| Campo | Obrigatório | Descrição |
|---|---|---|
| `document` | sim | CPF da pessoa, com ou sem máscara. |

## Campos de retorno (`data`)

| Campo | Tipo |
|---|---|
| `accounts[].account` | texto |
| `accounts[].agency` | texto |
| `accounts[].type_current_account` | texto |
| `accounts[].status_account` | texto |
| `accounts[].start_date_account` | data |
| `accounts[].end_date_account` | texto |
| `accounts[].account_update` | data |
| `accounts[].registration` | número |
| `accounts[].account_analyst` | texto |
| `account_representatives[].representative_person_id` | texto |
| `account_representatives[].name` | texto |
| `account_representatives[].document` | texto |
| `account_representatives[].status` | texto |
| `account_representatives[].risk_category_current_description` | texto |
| `account_representatives[].risk_category_current_color` | texto |
| `account_representatives[].representative_type` | texto |
| `account_representatives[].representative_agency` | número |
| `account_representatives[].situation_representative` | texto |
| `account_representatives[].percentual_representation` | texto |

## Exemplo de resposta (valores fictícios)

```json
{
  "execution_id": "00000000-0000-0000-0000-000000000000",
  "status": "success",
  "message": "Consulta realizada com sucesso",
  "query_name": "Consulta de Contas Existentes",
  "query_slug": "consulta-de-contas-existentes",
  "data": {
    "accounts": [
      {
        "account": "texto",
        "agency": "texto",
        "type_current_account": "texto",
        "status_account": "texto",
        "start_date_account": "2026-01-01",
        "end_date_account": null,
        "account_update": "2026-01-01",
        "registration": 0,
        "account_analyst": "texto"
      }
    ],
    "account_representatives": [
      {
        "representative_person_id": "texto",
        "name": "texto",
        "document": "texto",
        "status": "texto",
        "risk_category_current_description": "texto",
        "risk_category_current_color": "texto",
        "representative_type": "texto",
        "representative_agency": 0,
        "situation_representative": "texto",
        "percentual_representation": "texto"
      }
    ]
  },
  "consulted_at": "2026-01-01T12:00:00Z"
}
```
