Saltar al contenido principal
GET
Get a CNAB agreement

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Encabezados

X-Organization-Id
string

Midaz organization the CNAB agreement belongs to. Required: a request without it, or with a value that is not a canonical UUID, is refused with 400 PBP-0025. An agreement of another organization is answered 404, exactly as one that does not exist.

Parámetros de ruta

agreement_id
string<uuid>
requerido

Identifier of the CNAB agreement.

Ejemplo:

"019a7c1e-4b2d-7f30-9c11-2a5e8d0f4b61"

Respuesta

OK. The CNAB agreement.

agreementCode
string
requerido

The collections agreement's 7-digit code, sent in the file header (G007, left-aligned).

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

"1234567"

bankCode
string
requerido

G001. The bankCode of the tenant's PCR connection, the first 3 positions of its barcodes. A file whose header carries another bank code is refused whole.

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

"699"

collectionsAgreementId
string<uuid>
requerido

The collections agreement the CNAB agreement files for.

Ejemplo:

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

createdAt
string<date-time>
requerido

When the agreement was created, RFC 3339 in UTC.

Ejemplo:

"2026-11-15T13:20:00Z"

id
string<uuid>
requerido

Identifier of the CNAB agreement.

Ejemplo:

"019a7c1e-4b2d-7f30-9c11-2a5e8d0f4b61"

lastRemittanceNsa
integer<int64>
requerido

Highest remittance NSA accepted (G018); 0 before the first. The next is expected at lastRemittanceNsa + 1.

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

43

lastReturnNsa
integer<int64>
requerido

NSA of the last return generated; 0 before the first. Returns never skip a number.

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

42

ledgerId
string<uuid>
requerido

Midaz ledger of the titles.

Ejemplo:

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

midazAccountId
string<uuid>
requerido

Midaz account of the titles.

Ejemplo:

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

nextCutAt
string<date-time>
requerido

Next scheduled cut, RFC 3339 in UTC.

Ejemplo:

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

organizationId
string<uuid>
requerido

Midaz organization of the agreement.

Ejemplo:

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

portfolio
enum<string>
requerido

Portfolio (C006, 14.3P), read from the collections agreement on every read and never stored. Always "1" (simple collection) in V1.

Opciones disponibles:
1
Ejemplo:

"1"

releasePolicy
enum<string>
requerido

Credit release policy of the collections agreement, read from it on every read and never stored. AFTER_CANCELLATION_WINDOW releases the credit only after the window in which the payer's bank may cancel the write-off has closed; AT_SETTLEMENT releases it on settlement, and a chargeback after the release comes back as movement 90.

Opciones disponibles:
AFTER_CANCELLATION_WINDOW,
AT_SETTLEMENT
Ejemplo:

"AFTER_CANCELLATION_WINDOW"

returnCutTimes
string[]
requerido

Return cut times, Brasília time, in ascending order.

Required array length: 1 - 24 elements

Cut time HH:MM, Brasília time (America/Sao_Paulo).

Pattern: ^([01][0-9]|2[0-3]):[0-5][0-9]$
speciesCode
string
requerido

Title species (G065, 24.3P), read from the collections agreement on every read and never stored.

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

"02"

status
enum<string>
requerido

ACTIVE takes remittances; INACTIVE refuses them and keeps generating returns of the titles already in.

Opciones disponibles:
ACTIVE,
INACTIVE
Ejemplo:

"ACTIVE"

updatedAt
string<date-time>
requerido

When the agreement last changed, RFC 3339 in UTC.

Ejemplo:

"2026-11-16T09:00:00Z"

version
integer<int64>
requerido

Optimistic version; send it on updateCnabAgreement.

Rango requerido: x >= 1
Ejemplo:

3