Saltar al contenido principal
PATCH
Change the issuing rules of an agreement

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Encabezados

Idempotency-Key
string
requerido

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 ruta

agreement_id
string<uuid>
requerido

Identifier of the agreement.

Ejemplo:

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

Cuerpo

application/json
reason
string
requerido

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

Required string length: 10 - 500
Ejemplo:

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

version
integer<int64>
requerido

Version last read.

Rango requerido: x >= 1
Ejemplo:

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.

Ejemplo:

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.

Rango requerido: 0 <= x <= 30
Ejemplo:

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.

Rango requerido: 1 <= x <= 365
Ejemplo:

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.

Opciones disponibles:
01,
02,
03,
04,
05,
06
Ejemplo:

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

Opciones disponibles:
AFTER_CANCELLATION_WINDOW,
AT_SETTLEMENT
Ejemplo:

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

"02"

Respuesta

OK. The agreement with the change applied.

accountId
string<uuid>
requerido

Midaz account of the agreement.

Ejemplo:

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

beneficiaryId
string<uuid>
requerido

Beneficiary of the account's holder.

Ejemplo:

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

chargebackRiskAcknowledged
boolean
requerido

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.

Ejemplo:

false

createdAt
string<date-time>
requerido

When the agreement was created, RFC 3339 in UTC.

Ejemplo:

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

creditDelayBusinessDays
integer<int64>
requerido

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

Rango requerido: 0 <= x <= 30
Ejemplo:

0

id
string<uuid>
requerido

Identifier of the agreement.

Ejemplo:

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

ledgerId
string<uuid>
requerido
read-only

Midaz ledger of the account.

Ejemplo:

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

nucleaAgreementCode
string
requerido
read-only

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

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

"0000042"

numbering
object
requerido

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

organizationId
string<uuid>
requerido
read-only

Midaz organization of the account.

Ejemplo:

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

origin
enum<string>
requerido

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

Opciones disponibles:
COLLECTIONS,
IMPORTED
Ejemplo:

"COLLECTIONS"

paymentDeadlineDays
integer<int64>
requerido

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

Rango requerido: 1 <= x <= 365
Ejemplo:

30

portfolio
enum<string>
requerido

Portfolio of the agreement.

Opciones disponibles:
01,
02,
03,
04,
05,
06
Ejemplo:

"01"

productType
string
requerido

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

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

"01"

releasePolicy
enum<string>
requerido

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.

Opciones disponibles:
AFTER_CANCELLATION_WINDOW,
AT_SETTLEMENT
Ejemplo:

"AFTER_CANCELLATION_WINDOW"

speciesCode
string
requerido

Species of the boletos, at two digits.

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

"02"

state
enum<string>
requerido

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.

Opciones disponibles:
PENDING_REGISTRATION,
ACTIVE,
BLOCKED,
CLOSING,
CLOSED,
CLOSURE_FAILED,
REGISTRATION_REJECTED
Ejemplo:

"ACTIVE"

updatedAt
string<date-time>
requerido

When the agreement last changed, RFC 3339 in UTC.

Ejemplo:

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

version
integer<int64>
requerido

Version of the agreement; a change sends it back.

Rango requerido: x >= 1
Ejemplo:

3

closedAt
string<date-time> | null

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

Ejemplo:

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

"AB-1234"

nucleaAccountNumber
string | null
read-only

Agreement's account at Núclea, optional.

Maximum string length: 20
Ejemplo:

"87654321"

nucleaAccountType
string | null
read-only

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

Maximum string length: 2
Ejemplo:

"CC"

nucleaBranchNumber
string | null
read-only

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

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

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

Opciones disponibles:
F,
V,
N,
null
Ejemplo:

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

Opciones disponibles:
A,
C,
E,
I,
null
Ejemplo:

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

Opciones disponibles:
MISSING_BRANCH,
null
Ejemplo:

"MISSING_BRANCH"