跳到主要内容

创建 Alias 实体

此流程负责创建与已有账户关联的 Alias 实体。

请求

ENDPOINT
/account/ACCOUNT_KEY/alias
MÉ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_keyuuidv4账户唯一密钥。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 *stringCPF 或 CNPJ 号码。11(CPF)或 14(CNPJ)
owner_person_type *string账户所有者类型。可以是 legalnatural7
owner_name *string账户所有者姓名。120
owner_trading_namestring账户所有者商业名称(可选,仅限 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_keyuuidv4Alias 唯一密钥。36
created_atdatetime 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"
}