Consulta de Perfil — Pessoa Física ou Jurídica

Após a autenticação e obtenção do token JWT, este endpoint permite consultar as informações do usuário ou empresa logada no sistema.

A escolha do endpoint depende do tipo da entidade associada ao token:

  • Pessoa Física (PERSON): utilize GET /persons

  • Pessoa Jurídica (COMPANY): utilize GET /companies

O retorno inclui dados como identificação, e-mail, telefone, status de onboarding e demais informações cadastrais vinculadas ao tenant atual.

Estes endpoints são protegidos e requerem o uso do cabeçalho Authorization: Bearer <token> e x-tenant-id

Endpoint para consulta Pessoa Física

GET /persons

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

x-tenant-id

Tenant ID

Response

{
  "person": {
    "id": "4e6f21a3-1a0f-4e4e-99b5-84f3b7b3db4a",
    "email": "[email protected]",
    "emailConfirmation": true,
    "phone": "+5521987654321",
    "phoneConfirmation": true,
    "name": "Mariana Souza Oliveira",
    "document": "32165498700",
    "status": "ACTIVE",
    "onboardingStep": "DONE",
    "hasPin": true
  },
  "individual": {
    "id": "c9c1812a-3b27-4a41-9a31-b8c20b9d9e11",
    "birthDate": "1995-03-21T00:00:00.000Z",
    "motherName": "Luciana Alves Souza",
    "fatherName": "Carlos Eduardo Oliveira",
    "income": 7200,
    "nationality": "BRASILEIRA",
    "publiclyExposedPerson": false,
    "documentType": "CNH",
    "documentNumber": "MG1234567",
    "documentUf": "MG",
    "documentIssuing": "DETRAN",
    "documentDateIssue": "2024-01-15T00:00:00.000Z",
    "documentExpiration": "2034-01-15T00:00:00.000Z"
  },
  "address": {
    "id": "e73a5f4c-b820-4d6d-a6b1-73114e1a9d55",
    "zipCode": "30140071",
    "state": "MG",
    "city": "Belo Horizonte",
    "neighborhood": "Savassi",
    "street": "Rua Antônio de Albuquerque",
    "number": "450",
    "complement": "Apto 702"
  },
  "accounts": [
    {
      "id": "5bce0e91-442d-4b8a-8b6e-72a12de909c8",
      "bank": "290",
      "agency": "0001",
      "number": "19283045",
      "balance": 1850.72,
      "status": "APPROVED",
      "isEscrow": false,
      "investmentAccount": null
    }
  ]
}

Endpoint para Pessoa Jurídica

GET /companies

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

x-tenant-id

Tenant ID

Response

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1ZTZhYmI2YS1mNmE3LTRmZTgtYWNhNS1mYmU1MWJhOGY1N2UiLCJ0eXBlIjoiQ09NUEFOWSIsInRlbmFudElkIjoiNDA1ZWU0YTItMzg0Yi00ZTkxLWJlN2MtYmI3Y2EwNTgxNmRlIiwiaWF0IjoxNzYwMTI1NjA3LCJleHAiOjE3NjAxMjkyMDd9.GW0iW4u85u3Xtp7zRtFzj7Wqz7ScyF0s2N3Xz3N8sC4",
  "entityType": "COMPANY",
  "entity": {
    "id": "5e6abb6a-f6a7-4fe8-aca5-fbe51ba8f57e",
    "email": "[email protected]",
    "emailConfirmation": true,
    "phone": "+5511998877665",
    "phoneConfirmation": true,
    "name": "Neurocode Tecnologia LTDA",
    "document": "12345678000199",
    "status": "ACTIVE",
    "onboardingStep": "DONE",
    "hasPin": true
  },
  "accounts": [
    {
      "id": "b2c60a2e-36cd-47e3-9ac1-f5838b126f0f",
      "bank": "237",
      "agency": "0002",
      "number": "99887766",
      "balance": 8342.15,
      "status": "APPROVED",
      "isEscrow": false,
      "investmentAccount": null
    }
  ]
}

Last updated

Was this helpful?