Pular para o conteúdo principal
PATCH
Change the issuing rules of an agreement

Autorizações

Authorization
string
header
obrigatório

JWT bearer token issued by the identity provider.

Cabeçalhos

Idempotency-Key
string
obrigatório

Client-supplied idempotency key, a UUID. Required: a request without it, with a value that is not a UUID, or with the nil UUID (00000000-0000-0000-0000-000000000000) is refused with 400 PBP-0012.

Parâmetros de caminho

agreement_id
string<uuid>
obrigatório

Identifier of the agreement.

Exemplo:

"0192a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a71"

Corpo

application/json
reason
string
obrigatório

Reason for the change, recorded in the audit trail. Must not carry personal data.

Required string length: 10 - 500
Exemplo:

"Payment deadline extended at the client's request."

version
integer<int64>
obrigatório

Version last read.

Intervalo obrigatório: x >= 1
Exemplo:

3

chargebackRiskAcknowledged
boolean

The client acknowledges that, under AT_SETTLEMENT, a cancellation confirmed after the release is charged back from the account's default balance, which may no longer hold the amount. Required true with AT_SETTLEMENT: a change to AT_SETTLEMENT without it, or one that sends false while the agreement keeps AT_SETTLEMENT, is refused with 422 PBP-0006. Recorded false under AFTER_CANCELLATION_WINDOW. Left out, the agreement keeps its acknowledgement.

Exemplo:

true

creditDelayBusinessDays
integer<int64>

Business days before the agreement's credit is released, counted from the write-off's movement day. Applies to the boletos issued after the change.

Intervalo obrigatório: 0 <= x <= 30
Exemplo:

2

numbering
object

New nosso número range of the agreement. It must hold the counter's next value.

paymentDeadlineDays
integer<int64>

Calendar days after the due date up to the default payment deadline of the boletos issued after the change.

Intervalo obrigatório: 1 <= x <= 365
Exemplo:

45

portfolio
enum<string>

Portfolio of the agreement: 01 Simples, 02 Vinculada, 03 Caucionada, 04 Descontada, 05 Vendor, 06 Cessão. Only 01 is issued; 02 to 06 are refused with 422 PBP-0801.

Opções disponíveis:
01,
02,
03,
04,
05,
06
Exemplo:

"01"

releasePolicy
enum<string>

When the credit of a paid boleto of the agreement is released. AFTER_CANCELLATION_WINDOW waits until the write-off's cancellation deadline, and any margin the platform adds to it, has passed. AT_SETTLEMENT releases it once the payment is settled and the credit date is reached, without waiting for the deadline: a cancellation confirmed after the release is then charged back from the account's default balance. A change to AT_SETTLEMENT sends chargebackRiskAcknowledged true in the same request. Applies to the boletos issued after the change. Left out, the agreement keeps its policy.

Opções disponíveis:
AFTER_CANCELLATION_WINDOW,
AT_SETTLEMENT
Exemplo:

"AT_SETTLEMENT"

speciesCode
string

Species of the boleto, one or two digits, 1 to 30 or 99; 31, 32 and 33 are refused with 422 PBP-0801.

Pattern: ^[0-9]{1,2}$
Exemplo:

"02"

Resposta

OK. The agreement with the change applied.

accountId
string<uuid>
obrigatório

Midaz account of the agreement.

Exemplo:

"0192a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a6d"

beneficiaryId
string<uuid>
obrigatório

Beneficiary of the account's holder.

Exemplo:

"0192a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a61"

chargebackRiskAcknowledged
boolean
obrigatório

Whether the client acknowledged that, under AT_SETTLEMENT, a cancellation confirmed after the release is charged back from the account's default balance. Always true under AT_SETTLEMENT and false under AFTER_CANCELLATION_WINDOW.

Exemplo:

false

createdAt
string<date-time>
obrigatório

When the agreement was created, RFC 3339 in UTC.

Exemplo:

"2026-11-11T10:00:00Z"

creditDelayBusinessDays
integer<int64>
obrigatório

Business days before the agreement's credit is released, counted from the write-off's movement day.

Intervalo obrigatório: 0 <= x <= 30
Exemplo:

0

id
string<uuid>
obrigatório

Identifier of the agreement.

Exemplo:

"0192a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a71"

ledgerId
string<uuid>
obrigatório
read-only

Midaz ledger of the account.

Exemplo:

"0192a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a6c"

nucleaAgreementCode
string
obrigatório
read-only

Seven-digit code collections assigned to the agreement, unique in the institution and never reused.

Pattern: ^[0-9]{7}$
Exemplo:

"0000042"

numbering
object
obrigatório

Nosso número range of the agreement and the next value of its counter.

organizationId
string<uuid>
obrigatório
read-only

Midaz organization of the account.

Exemplo:

"0192a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a6b"

origin
enum<string>
obrigatório

COLLECTIONS for an agreement collections created; IMPORTED for one registered elsewhere and adopted.

Opções disponíveis:
COLLECTIONS,
IMPORTED
Exemplo:

"COLLECTIONS"

paymentDeadlineDays
integer<int64>
obrigatório

Calendar days after the due date up to the default payment deadline of the agreement's boletos.

Intervalo obrigatório: 1 <= x <= 365
Exemplo:

30

portfolio
enum<string>
obrigatório

Portfolio of the agreement.

Opções disponíveis:
01,
02,
03,
04,
05,
06
Exemplo:

"01"

productType
string
obrigatório

Product type of the agreement at Núclea, two digits.

Pattern: ^[0-9]{2}$
Exemplo:

"01"

releasePolicy
enum<string>
obrigatório

When the credit of a paid boleto of the agreement is released. AFTER_CANCELLATION_WINDOW waits until the write-off's cancellation deadline, and any margin the platform adds to it, has passed. AT_SETTLEMENT releases it once the payment is settled and the credit date is reached, without waiting for the deadline: a cancellation confirmed after the release is then charged back from the account's default balance. Applies to the boletos issued under the agreement; each boleto keeps the policy it was issued with.

Opções disponíveis:
AFTER_CANCELLATION_WINDOW,
AT_SETTLEMENT
Exemplo:

"AFTER_CANCELLATION_WINDOW"

speciesCode
string
obrigatório

Species of the boletos, at two digits.

Pattern: ^[0-9]{2}$
Exemplo:

"02"

state
enum<string>
obrigatório

PENDING_REGISTRATION until Núclea accepts the inclusion; then ACTIVE, or BLOCKED while the beneficiary is refused or unfit. CLOSING once the exclusion is sent, then CLOSED, or CLOSURE_FAILED when Núclea refuses it. REGISTRATION_REJECTED when Núclea refuses the inclusion.

Opções disponíveis:
PENDING_REGISTRATION,
ACTIVE,
BLOCKED,
CLOSING,
CLOSED,
CLOSURE_FAILED,
REGISTRATION_REJECTED
Exemplo:

"ACTIVE"

updatedAt
string<date-time>
obrigatório

When the agreement last changed, RFC 3339 in UTC.

Exemplo:

"2026-11-11T10:00:00Z"

version
integer<int64>
obrigatório

Version of the agreement; a change sends it back.

Intervalo obrigatório: x >= 1
Exemplo:

3

closedAt
string<date-time> | null

When the agreement was CLOSED, RFC 3339 in UTC; null otherwise.

Exemplo:

"2026-11-12T10:00:00Z"

importedAgreementCode
string | null
read-only

Code the agreement had in the beneficiary base when it was adopted (origin IMPORTED); null for an agreement collections created.

Maximum string length: 40
Exemplo:

"AB-1234"

nucleaAccountNumber
string | null
read-only

Agreement's account at Núclea, optional.

Maximum string length: 20
Exemplo:

"87654321"

nucleaAccountType
string | null
read-only

Type of the agreement's account at Núclea, optional.

Maximum string length: 2
Exemplo:

"CC"

nucleaBranchNumber
string | null
read-only

Agreement's branch at Núclea. Null until the branch is assigned.

Pattern: ^[0-9]{1,4}$
Exemplo:

"0001"

nucleaBranchType
enum<string> | null
read-only

Type of the agreement's branch at Núclea: F physical, V virtual, N not informed. Null until the branch is assigned.

Opções disponíveis:
F,
V,
N,
null
Exemplo:

"F"

nucleaSituation
enum<string> | null
read-only

Situation of the agreement in the beneficiary base: A active, C cancelled, E excluded, I inactive. Null before Núclea accepts it.

Opções disponíveis:
A,
C,
E,
I,
null
Exemplo:

"A"

registrationBlockedReason
enum<string> | null
read-only

MISSING_BRANCH: the agreement is PENDING_REGISTRATION and was not sent to Núclea because its branch type or number is missing, or because the branch found for it is held back while another agreement of the holder holds the key at Núclea that the branch would give it; the holder's boletos wait meanwhile. Null when nothing holds the inclusion back.

Opções disponíveis:
MISSING_BRANCH,
null
Exemplo:

"MISSING_BRANCH"