/v1/NaturalPerson/{id}/BankAccountInsere dados da(s) conta(s) bancária(s) para a pessoa física
Cria um novo registro de Natural Person.
Visão geral
Insere dados da(s) conta(s) bancária(s) para a pessoa física
Autenticação e pré-requisitos
Requer autenticação. Envie o token no header Authorization: Bearer {{token}} (JWT do AWS Cognito). Integrações servidor-a-servidor podem usar X-Api-Key. Todo tráfego é HTTPS e a credencial nunca vai na URL nem em query string.
Pré-requisitos: a rota exige identificador(es) de recurso já existente(s):
id— id pessoa física
Request
Parâmetros
| Nome | Em | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|---|
id | path | string (uuid) | obrigatório | id pessoa física | 3fa85f64-5717-4562-b3fc-2c963f66afa6 |
Corpo da requisição
Envie no formato application/json. Corpo opcional. Envie uma lista (array) de objetos.
Campos
| Campo | Tipo | Obrigatório | Descrição | Valores | Exemplo |
|---|---|---|---|---|---|
ownerUser | objeto | opcional | — | objeto — ver detalhe abaixo | { … } |
ownerGroup | objeto | opcional | — | objeto — ver detalhe abaixo | { … } |
bankCode | integer | opcional | — | — | 0 |
bankIspb | integer (int64) | opcional | Código ISPB do banco | — | 0 |
account | string | opcional | — | — | "texto" |
accountDigit | string | opcional | — | — | "texto" |
agency | string | opcional | — | — | "texto" |
agencyDigit | string | opcional | — | — | "texto" |
type | string | opcional | — | NaturalCheckingAccount, NaturalSimpleAccount, LegalCheckingAccount, PublicEntities, FinancialInstitutionsDeposits, NaturalSavingsAccount, LegalSavingsAccount, RealEstateSavingsAccount, LotteryDeposits, EscrowAccount | "NaturalCheckingAccount" |
jointAccount | boolean | opcional | — | — | true |
operationTypeValue | string | obrigatório | — | Transfer, Pix | "Transfer" |
pixKeyTypeValue | string | opcional | — | NaturalRegistrationNumber, LegalRegistrationNumber, Phone, Email, Automatic, AgencyAndAccount | "NaturalRegistrationNumber" |
keyPix | string | opcional | chave pix | — | "texto" |
Detalhe de ownerUser
| Campo | Tipo | Obrigatório | Descrição | Valores | Exemplo |
|---|---|---|---|---|---|
userId | string | obrigatório | — | — | "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
tenantName | string | obrigatório | — | — | "Fulano de Tal" |
Detalhe de ownerGroup
| Campo | Tipo | Obrigatório | Descrição | Valores | Exemplo |
|---|---|---|---|---|---|
groupId | string | obrigatório | — | — | "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
tenantName | string | obrigatório | — | — | "Fulano de Tal" |
Exemplo de corpo
[
{
"ownerUser": {
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenantName": "Fulano de Tal"
},
"ownerGroup": {
"groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenantName": "Fulano de Tal"
},
"bankCode": 0,
"bankIspb": 0,
"account": "texto",
"accountDigit": "texto",
"agency": "texto",
"agencyDigit": "texto",
"type": "NaturalCheckingAccount",
"jointAccount": true,
"operationTypeValue": "Transfer",
"pixKeyTypeValue": "NaturalRegistrationNumber",
"keyPix": "texto"
}
]Response
Resposta 200 — retorna uma lista (array) de objetos.
Sem campos estruturados no contrato (tipo primitivo ou livre).
Exemplo de resposta
[
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]Códigos de retorno
| Código | Significado | Detalhe do contrato |
|---|---|---|
200 | Requisição bem-sucedida. | Success |
Exemplos
curl -X POST "{{baseUrl}}/v1/NaturalPerson/3fa85f64-5717-4562-b3fc-2c963f66afa6/BankAccount" \
-H "Authorization: Bearer {{token}}" \
-H "Content-Type: application/json" \
-d '[
{
"ownerUser": {
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenantName": "Fulano de Tal"
},
"ownerGroup": {
"groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenantName": "Fulano de Tal"
},
"bankCode": 0,
"bankIspb": 0,
"account": "texto",
"accountDigit": "texto",
"agency": "texto",
"agencyDigit": "texto",
"type": "NaturalCheckingAccount",
"jointAccount": true,
"operationTypeValue": "Transfer",
"pixKeyTypeValue": "NaturalRegistrationNumber",
"keyPix": "texto"
}
]'var baseUrl = "{{baseUrl}}";
var token = "{{token}}";
using var http = new HttpClient { BaseAddress = new Uri(baseUrl) };
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", token);
var rota = "/v1/NaturalPerson/3fa85f64-5717-4562-b3fc-2c963f66afa6/BankAccount";
var corpo = new StringContent(
"""
[
{
"ownerUser": {
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenantName": "Fulano de Tal"
},
"ownerGroup": {
"groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenantName": "Fulano de Tal"
},
"bankCode": 0,
"bankIspb": 0,
"account": "texto",
"accountDigit": "texto",
"agency": "texto",
"agencyDigit": "texto",
"type": "NaturalCheckingAccount",
"jointAccount": true,
"operationTypeValue": "Transfer",
"pixKeyTypeValue": "NaturalRegistrationNumber",
"keyPix": "texto"
}
]
""",
Encoding.UTF8, "application/json");
var resp = await http.PostAsync(rota, corpo);
resp.EnsureSuccessStatusCode();
var json = await resp.Content.ReadAsStringAsync();const baseUrl = '{{baseUrl}}';
const token = '{{token}}';
const payload = [
{
"ownerUser": {
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenantName": "Fulano de Tal"
},
"ownerGroup": {
"groupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenantName": "Fulano de Tal"
},
"bankCode": 0,
"bankIspb": 0,
"account": "texto",
"accountDigit": "texto",
"agency": "texto",
"agencyDigit": "texto",
"type": "NaturalCheckingAccount",
"jointAccount": true,
"operationTypeValue": "Transfer",
"pixKeyTypeValue": "NaturalRegistrationNumber",
"keyPix": "texto"
}
];
const resp = await fetch(`${baseUrl}/v1/NaturalPerson/3fa85f64-5717-4562-b3fc-2c963f66afa6/BankAccount`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const data = await resp.json();Troque apenas {{baseUrl}} e {{token}}. No Postman, defina-os como variáveis de environment; o cURL importa em Import > Raw text.
Downloads
Este endpoint já vem configurado nas collections abaixo, na pasta da etapa correspondente.
Guia de importação: Como importar no Postman · Todos os downloads: Downloads