跳到主要内容

编辑

编辑指令用于在票据发行后修改其可配置的数据,例如自动核销设置、抗议设置、破产抗议设置和付款人数据。该指令允许在单次请求中更新票据的多个方面。

注意!

票据必须处于 registered 状态才能进行编辑。请求中除 request_control_key 外,至少必须提供一个数据字段(write_off_dataprotest_databankruptcy_protest_datapayer_data)。

Request

ENDPOINT
/account/ACCOUNT_KEY/requester_profile/REQUESTER_PROFILE_KEY/bank_slip/BANK_SLIP_KEY/bank_slip_edit
MÉTODO
POST

Path parameters

字段类型描述字符数
account_keyuuidv4账户唯一标识键,uuid v4 格式36
requester_profile_keyuuidv4钱包唯一标识键,uuid v4 格式36
bank_slip_keyuuidv4票据唯一标识键,uuid v4 格式36
Request Body
{
"request_control_key": "c4dd443a-6e2f-4261-8f28-adfa4c0d4c5b",
"write_off_data": {"days_to_write_off": 365},
"protest_data": {"days_to_protest": 7},
"bankruptcy_protest_data": {"days_to_bankruptcy_protest": 14},
"payer_data": {
"contact": {
"email": "finance@globaltech.com",
"phone": {"international_dial_code": "055", "area_code": "11", "number": "987654321"},
},
"address": {
"street": "101 High St.",
"neighborhood": "Tech Park",
"number": "202",
"postal_code": "01001000",
"city": "Innovation City",
"state": "SP",
"complement": "Building A",
},
},
}

Request Body Params

字段类型描述字符数
request_control_key *uuidv4客户使用的请求唯一标识键,uuid v4 格式36
write_off_dataobject自动核销设置(null 表示移除)Objeto write_off_data
protest_dataobject抗议设置(null 表示移除)Objeto protest_data
bankruptcy_protest_dataobject破产抗议设置(null 表示移除)Objeto bankruptcy_protest_data
payer_dataobject付款人数据(address 为 null 或 contact 为 null 表示移除对应字段)Objeto payer_data
说明

请求中至少必须提供一个数据字段(write_off_dataprotest_databankruptcy_protest_datapayer_data)。

Objeto write_off_data

字段类型描述字符数
days_to_write_off *integer到期后自动核销票据的天数-

Objeto protest_data

字段类型描述字符数
days_to_protest *integer到期后自动抗议票据的天数-

Objeto bankruptcy_protest_data

字段类型描述字符数
days_to_bankruptcy_protest *integer到期后自动启动破产抗议流程的天数-

Objeto payer_data

字段类型描述字符数
contactobject联系信息Objeto contact
addressobject地址Objeto address

Objeto contact

字段类型描述字符数
emailstring联系电子邮件320
phoneobject联系电话Objeto phone

Objeto phone

字段类型描述字符数
international_dial_code *string国际区号(DDI)3
area_code *string地区区号(DDD)2
number *string补充号码9

Objeto address

字段类型描述字符数
street *string街道500
number *string门牌号6
complementstring补充信息500
neighborhood *string社区/街区100
postal_code *string邮政编码8
city *string城市100
state *string州(UF)Enumerador state

Enumeradores state

枚举值描述
ACAcre
ALAlagoas
AMAmazonas
APAmapá
BABahia
CECeará
DFDistrito federal
ESEspírito Santo
GOGoiás
MAMaranhão
MGMinas Gerais
MSMato Grosso do Sul
MTMato Grosso
PAPará
PBParaíba
PEPernambuco
PIPiauí
PRParaná
RJRio de Janeiro
RNRio Grande do Norte
RORondônia
RRRoraima
RSRio Grande do Sul
SCSanta Catarina
SESergipe
SPSão Paulo
TOTocantins
EXExceção

Response

STATUS
200
Response Body
{
"occurrence_key": "5a745b65-9a2c-44eb-b43e-c80ef5429d94",
"bank_slip_key": "fdafdffa-cbd4-4f3c-8e3d-990428305161"
}

Response Body Params

字段类型描述字符数
occurrence_key *uuidv4记录(指令)唯一标识键,uuid v4 格式36
bank_slip_key *uuidv4票据唯一标识键,uuid v4 格式36

Error Response

STATUS
4xx
Response Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
HTTP 状态码
status
QI 代码
code
标题
title
描述(英文)
description
描述(葡文)
translation
400QIT000001Bad RequestSchema ErrorSchema Inválido
404BKS000006Not FoundThe source account key was not found.A chave da conta de origem não foi encontrada.
400BKS000007Bad RequestIt was not possible to consult the source account at this time. Please try again in a few minutes.Não foi possível consultar a conta de origem neste momento. Por favor, tente novamente em alguns minutos.
400BKS000008Bad RequestThe source account is closed.A conta de origem está fechada.
400BKS000009Bad RequestThe source account is blocked.A conta de origem está bloqueada.
404BKS000013Not FoundRequester profile not foundCarteira não encontrada
409BKS000014ConflictRequest control key already sent or duplicated sent: <request_control_key>Chave de controle da requisição já utilizada ou enviada duplicada: <request_control_key>
400BKS000022Bad RequestRequester profile is not opened.Carteira não está aberta.
404BKS000029Not FoundBank slip not found for the given key ({bank_slip_key}).Boleto não encontrado para a chave fornecida ({bank_slip_key}).
400BKS000032Bad RequestBank slip must be in 'registered' status.O boleto deve possuir o status 'registered'.