创建 Alias 实体
此流程负责创建与已有账户关联的 Alias 实体。
请求
ENDPOINT
/account/ACCOUNT_KEY/aliasMÉTODO
POST请求体
{
"request_control_key":"5b4259a4-dc4a-489f-a050-3391e13d9850",
"account_branch": "0001",
"account_number": "4968698",
"account_digit": "3",
"account_type": "checking_account",
"account_created_at": "2022-09-24T19:46:43.001Z",
"owner_person_type": "legal",
"owner_document_number": "89248771384257",
"owner_name": "Vinicius De Oliveira",
"owner_trading_name": "Pix Ltda"
}
路径参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
account_key | uuidv4 | 账户唯一密钥。 | 36 |
请求体参数
| 字段 | 类型 | 描述 | 最大字符数 |
|---|---|---|---|
request_control_key * | string | 客户使用的请求唯一标识密钥,格式为 uuidv4。 | 36 |
account_branch * | string | 支行号,不含校验位。 | 4 |
account_number * | string | 账号,不含校验位。 | 20 |
account_digit * | string | 账号校验位。 | 1 |
account_type* | enumerador | 账户类型。 | account_type 枚举值 |
account_created_at * | string | 账户创建日期。例如:"2022-09-24T19:46:43.001Z" | 20 |
owner_document_number * | string | CPF 或 CNPJ 号码。 | 11(CPF)或 14(CNPJ) |
owner_person_type * | string | 账户所有者类型。可以是 legal 或 natural。 | 7 |
owner_name * | string | 账户所有者姓名。 | 120 |
owner_trading_name | string | 账户所有者商业名称(可选,仅限 CNPJ)。 | 100 |
account_type 枚举值
| 枚举值 | 描述 |
|---|---|
| checking_account | 支票账户 |
| salary_account | 工资账户 |
| saving_account | 储蓄账户 |
| payment_account | 支付账户 |
响应
STATUS
201 created响应体
{
"alias_key": "e04f496b-47be-4762-a6e2-8f2b05b46780",
"created_at": "2022-09-24T19:46:43.001Z"
}
响应体参数
| 字段 | 类型 | 描述 | 最大字符数 |
|---|---|---|---|
alias_key | uuidv4 | Alias 唯一密钥。 | 36 |
created_at | datetime Zulu | 请求执行日期。 | 20 |
STATUS
404响应体:未找到
{
"title": "Not Found",
"description": "Account not found for the given key \{account_key\}",
"translation": "A account_key \{account_key\} não foi encontrada",
"extra_fields": {},
"code": "ACC000006"
}
STATUS
400响应体:重复的请求控制密钥
{
"title": "Repeated Request Control Key",
"description": "The request_control_key sent \{request_control_key\}, was already been used in other requisition",
"translation": "A request_control_key enviada \{request_control_key\}, já foi utilizada em outra requisição",
"extra_fields": {},
"code": "ACC000179"
}
响应体:无效的所有者商业名称
{
"title": "Bad Request",
"description": "The owner_trading_name can only be sent by a legal person type",
"translation": "O owner_trading_name só pode ser utilizado por uma pessoa jurídica",
"extra_fields": {},
"code": "ACC000180"
}