API Reference
Cobranças · Boletos

Update a boleto

PATCH/cobrancas/v2/boletos/{id}
Base URL: https://bb.mimicr.dev · provider: https://api.hm.bb.com.br

Sends a change instruction to an open boleto: due date, amount, discounts, abatimento, interest, fine, protest, credit-bureau listing, seu número, payer address or term after the due date. One change per call. Due date and amount produce a new typeable line and barcode.

At BB, changes are only accepted 30 minutes after registration or the previous change. In Mimicr this lock is off by default and can be turned on in the sandbox control (boletoLock); with it on, the answer is 400 4923876.

Scope: cobrancas.boletos-requisicao.

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Path parameters

idstringrequired

The boleto's nosso número: 20 digits, 000 + convênio (7) + control number (10). It is the numero returned on registration.

Example: "00031285570031443497"

Query parameters

gw-dev-app-keystringrequired

Your application's key (developer_application_key) in the Developers Portal. In Mimicr, the sandbox's (GET /v1/bb). Without it the gateway answers 403.

Example: "<app-key>"

Body

application/json
numeroConveniointegerrequired

The boleto's convênio.

Example: 3128557
indicadorNovaDataVencimentostring

S changes the due date (alteracaoData).

SN
alteracaoDataobject
Show child attributes
novaDataVencimentostring

New due date, dd.mm.aaaa.

indicadorNovoValorNominalstring

S changes the amount (alteracaoValor).

SN
alteracaoValorobject
Show child attributes
novoValorNominalnumber

New amount in reais.

indicadorAtribuirDescontostring

S grants discounts (desconto).

SN
descontoobject

Discounts to grant. The first one's type applies to the others.

Show child attributes
tipoPrimeiroDescontointeger
valorPrimeiroDescontonumber
percentualPrimeiroDescontonumber
dataPrimeiroDescontostring
valorSegundoDescontonumber
percentualSegundoDescontonumber
dataSegundoDescontostring
valorTerceiroDescontonumber
percentualTerceiroDescontonumber
dataTerceiroDescontostring
indicadorAlterarDescontostring

S changes existing discounts (alteracaoDesconto).

SN
alteracaoDescontoobject
Show child attributes
tipoPrimeiroDescontointeger
novoValorPrimeiroDescontonumber
novoPercentualPrimeiroDescontonumber
novaDataLimitePrimeiroDescontostring
novoValorSegundoDescontonumber
novoPercentualSegundoDescontonumber
novaDataLimiteSegundoDescontostring
novoValorTerceiroDescontonumber
novoPercentualTerceiroDescontonumber
novaDataLimiteTerceiroDescontostring
indicadorAlterarDataDescontostring

S changes the discount dates (alteracaoDataDesconto).

SN
alteracaoDataDescontoobject
Show child attributes
novaDataLimitePrimeiroDescontostring
novaDataLimiteSegundoDescontostring
novaDataLimiteTerceiroDescontostring
indicadorProtestarstring

S adds a protest instruction (protesto).

SN
protestoobject
Show child attributes
quantidadeDiasProtestointeger
indicadorSustacaoProtestostring

S stops a protest already processed.

SN
indicadorCancelarProtestostring

S cancels a protest instruction not yet processed.

SN
indicadorIncluirAbatimentostring

S adds an abatimento (abatimento).

SN
abatimentoobject
Show child attributes
valorAbatimentonumber
indicadorAlterarAbatimentostring

S changes the abatimento (alteracaoAbatimento); 0 cancels it.

SN
alteracaoAbatimentoobject
Show child attributes
novoValorAbatimentonumber
indicadorCobrarJurosstring

S starts charging interest (juros).

SN
jurosobject
Show child attributes
tipoJurosinteger

0 waive, 1 amount per day, 2 monthly rate, 3 exempt.

valorJurosnumber

Amount per day (type 1).

taxaJurosnumber

Monthly rate in % (type 2).

indicadorDispensarJurosstring

S waives interest.

SN
indicadorCobrarMultastring

S starts charging a fine (multa).

SN
multaobject
Show child attributes
tipoMultainteger

1 fixed amount, 2 percentage.

valorMultanumber
dataInicioMultastring

dd.mm.aaaa

taxaMultanumber
indicadorDispensarMultastring

S waives the fine.

SN
indicadorNegativarstring

S adds, changes or cancels credit-bureau listing (negativacao).

SN
negativacaoobject
Show child attributes
quantidadeDiasNegativacaointeger
tipoNegativacaointeger

1 add, 2 change deadline, 3 cancel, 4 remove.

orgaoNegativadorinteger

10 SERASA, 11 QUOD.

indicadorAlterarSeuNumerostring

S changes the seu número (alteracaoSeuNumero).

SN
alteracaoSeuNumeroobject
Show child attributes
codigoSeuNumerostring
indicadorAlterarEnderecoPagadorstring

S changes the payer's address (alteracaoEndereco).

SN
alteracaoEnderecoobject
Show child attributes
enderecoPagadorstring
bairroPagadorstring
cidadePagadorstring
UFPagadorstring
CEPPagadorinteger
indicadorAlterarPrazoBoletoVencidostring

S changes how long the boleto can be paid after the due date (alteracaoPrazo).

SN
alteracaoPrazoobject
Show child attributes
quantidadeDiasAceiteinteger

Days after the due date, less than 360.

Responses

200Change accepted.
numeroContratoCobrancainteger
dataAtualizacaostring

dd.mm.aaaa

horarioAtualizacaostring

hh:mm:ss

400No change (4010580), more than one (4010755), invalid change data, or the 30-minute lock (4923876).
errorsobject[]required
Show child attributes
codestringrequired

Code as <codigo>.<versao>.

Example: "4010673.1"
messagestringrequired

Error text.

Example: "Boleto não localizado."
actionstring

How to fix it.

Example: ""
401Missing, invalid or expired token.
statusCodeinteger
Example: 401
errorstring
Example: "Unauthorized"
messagestring
Example: "Bad credentials"
attributesobject
Show child attributes
errorstring
Example: "Bad Credentials"
403The boleto's state does not allow changes (4007954), credit-card or proposal boleto, or convênio of another client.
errorsobject[]required
Show child attributes
codestringrequired

Code as <codigo>.<versao>.

Example: "4010673.1"
messagestringrequired

Error text.

Example: "Boleto não localizado."
actionstring

How to fix it.

Example: ""
404Boleto not found (4010673).
errorsobject[]required
Show child attributes
codestringrequired

Code as <codigo>.<versao>.

Example: "4010673.1"
messagestringrequired

Error text.

Example: "Boleto não localizado."
actionstring

How to fix it.

Example: ""