Saltar al contenido principal
GET
Get a return

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Encabezados

X-Organization-Id
string<uuid>
requerido

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

Parámetros de ruta

return_id
string<uuid>
requerido

Identifier of the return.

Ejemplo:

"019a8b02-7e55-7a10-a3c4-0f9b8d2e6c85"

Respuesta

OK. The return metadata.

agreementId
string<uuid>
requerido

The CNAB agreement the return belongs to.

Ejemplo:

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

contentSha256
string
requerido

SHA-256 of the file as generated, lowercase hex; a rebuilt file is checked against it.

Pattern: ^[0-9a-f]{64}$
filePurged
boolean
requerido

true when the stored file was purged after the retention period; the download then rebuilds it from the journal.

generatedAt
string<date-time>
requerido

When the return was generated, RFC 3339 in UTC.

id
string<uuid>
requerido

Identifier of the return.

movementCount
integer<int64>
requerido

Movements in the file (one T/U pair each); 1 to 49,999, one batch per file (G038).

Rango requerido: 1 <= x <= 49999
nsa
integer<int64>
requerido

Return NSA of the agreement (G018 of the return header); consecutive, no gaps.

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

42

requestedBy
string | null
requerido

Subject of the JWT that asked for an ON_DEMAND cut; null for SCHEDULED.

Maximum string length: 255
sizeBytes
integer<int64>
requerido

Size of the file as generated.

trigger
enum<string>
requerido

SCHEDULED: cut at one of the agreement's cut times. ON_DEMAND: cut by POST /v1/cnab/returns.

Opciones disponibles:
SCHEDULED,
ON_DEMAND
moreReturnsInCut
boolean

Only in the 201 of cutCnabReturn: true when movements were left after this file (more than 49,999 to report); the scheduled cut generates the following files in its next cycles, one per transaction, each with its own consecutive NSA and notice; list them with listCnabReturns. Absent in the other operations.