Cut a return file now
Generates the return of one CNAB agreement now, with every journal movement not yet reported, in the order they happened.
Providers: Lerian (PCR).
How it works
- The agreement may be
ACTIVEorINACTIVE. - A new return takes the agreement’s next return NSA, with no gaps. The
CNAB_RETURN_AVAILABLEnotice is queued in the same transaction. - A return file holds at most 49,999 movements in a single batch: the record sequence (G038) has 5 digits, and each movement takes a T and a U segment.
- With more movements, this request generates only the first file, with
moreReturnsInCuttrue. The scheduled cut generates the next files in its next cycles, within about a minute. Each has its own consecutive NSA and notice.GET /v1/cnab/returnslists them as they are generated. - With nothing to report, the answer is
204: no file, no NSA consumed, no notice. - An on-demand cut within a minute of the agreement’s latest on-demand return is refused with
PBP-0914. A cut answered204generates no return and does not count, and scheduled cuts do not count either. Each on-demand return takes an NSA of the agreement’s range, which never comes back. - A retry under the same
Idempotency-Keyreplays the first answer (201with the same return, or204), even if movements arrived since. To cut again, use a new key. - Scheduled cuts at the agreement’s cut times keep running.
- An agreement of another organization gets
404, the same as one that does not exist.
POST
Cut a return file now
Cabeçalhos
Corpo
application/json
Resposta
Created. The return generated by this cut. With movements for more than one file, the first one, with moreReturnsInCut true.
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.

