Skip to main content
GET
Get a return

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

X-Organization-Id
string<uuid>
required

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.

Path Parameters

return_id
string<uuid>
required

Identifier of the return.

Example:

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

Response

OK. The return metadata.

agreementId
string<uuid>
required

The CNAB agreement the return belongs to.

Example:

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

contentSha256
string
required

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

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

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

generatedAt
string<date-time>
required

When the return was generated, RFC 3339 in UTC.

id
string<uuid>
required

Identifier of the return.

movementCount
integer<int64>
required

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

Required range: 1 <= x <= 49999
nsa
integer<int64>
required

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

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

42

requestedBy
string | null
required

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

Maximum string length: 255
sizeBytes
integer<int64>
required

Size of the file as generated.

trigger
enum<string>
required

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

Available options:
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.