Skip to main content
PATCH
Change the issuing rules of an agreement

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

Idempotency-Key
string
required

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.

Path Parameters

agreement_id
string<uuid>
required

Identifier of the agreement.

Example:

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

Body

application/json
reason
string
required

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

Required string length: 10 - 500
Example:

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

version
integer<int64>
required

Version last read.

Required range: x >= 1
Example:

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.

Example:

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.

Required range: 0 <= x <= 30
Example:

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.

Required range: 1 <= x <= 365
Example:

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.

Available options:
01,
02,
03,
04,
05,
06
Example:

"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.

Available options:
AFTER_CANCELLATION_WINDOW,
AT_SETTLEMENT
Example:

"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}$
Example:

"02"

Response

OK. The agreement with the change applied.

accountId
string<uuid>
required

Midaz account of the agreement.

Example:

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

beneficiaryId
string<uuid>
required

Beneficiary of the account's holder.

Example:

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

chargebackRiskAcknowledged
boolean
required

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.

Example:

false

createdAt
string<date-time>
required

When the agreement was created, RFC 3339 in UTC.

Example:

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

creditDelayBusinessDays
integer<int64>
required

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

Required range: 0 <= x <= 30
Example:

0

id
string<uuid>
required

Identifier of the agreement.

Example:

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

ledgerId
string<uuid>
required
read-only

Midaz ledger of the account.

Example:

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

nucleaAgreementCode
string
required
read-only

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

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

"0000042"

numbering
object
required

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

organizationId
string<uuid>
required
read-only

Midaz organization of the account.

Example:

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

origin
enum<string>
required

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

Available options:
COLLECTIONS,
IMPORTED
Example:

"COLLECTIONS"

paymentDeadlineDays
integer<int64>
required

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

Required range: 1 <= x <= 365
Example:

30

portfolio
enum<string>
required

Portfolio of the agreement.

Available options:
01,
02,
03,
04,
05,
06
Example:

"01"

productType
string
required

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

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

"01"

releasePolicy
enum<string>
required

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.

Available options:
AFTER_CANCELLATION_WINDOW,
AT_SETTLEMENT
Example:

"AFTER_CANCELLATION_WINDOW"

speciesCode
string
required

Species of the boletos, at two digits.

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

"02"

state
enum<string>
required

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.

Available options:
PENDING_REGISTRATION,
ACTIVE,
BLOCKED,
CLOSING,
CLOSED,
CLOSURE_FAILED,
REGISTRATION_REJECTED
Example:

"ACTIVE"

updatedAt
string<date-time>
required

When the agreement last changed, RFC 3339 in UTC.

Example:

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

version
integer<int64>
required

Version of the agreement; a change sends it back.

Required range: x >= 1
Example:

3

closedAt
string<date-time> | null

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

Example:

"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
Example:

"AB-1234"

nucleaAccountNumber
string | null
read-only

Agreement's account at Núclea, optional.

Maximum string length: 20
Example:

"87654321"

nucleaAccountType
string | null
read-only

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

Maximum string length: 2
Example:

"CC"

nucleaBranchNumber
string | null
read-only

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

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

"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.

Available options:
F,
V,
N,
null
Example:

"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.

Available options:
A,
C,
E,
I,
null
Example:

"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.

Available options:
MISSING_BRANCH,
null
Example:

"MISSING_BRANCH"