For Agents
Parse Brazilian CNAB return files into structured JSON to read boleto write-offs and bank occurrences from a single file upload.
Get started with Cnab Online in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"parse a CNAB return file"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Cnab Online API.
Upload a CNAB return file via POST /file and receive a parse identifier
Retrieve basic metadata for an uploaded file via GET /file/{fileId}
List every recognised line and its parsed fields with GET /file/{fileId}/lines
Extract boleto write-offs and other bank occurrences via GET /file/{fileId}/occurrences
GET STARTED
Use for: Parse a CNAB return file from Banco do Brasil, I need to read boleto write-offs from a CNAB 240 file, Upload a CNAB 400 file and get the parsed lines, Retrieve all occurrences from a previously uploaded CNAB file
Not supported: Does not generate boletos, transmit CNAB remessa files to banks, or process card or PIX payments — use for parsing CNAB return files only.
Cnab Online parses Brazilian CNAB return files (arquivos de retorno) so finance teams and integrators can read boleto payment confirmations, write-offs, and other bank occurrences without writing a custom parser. Callers upload a CNAB file, receive a fileId, and then query for the recognised lines and occurrences. The API focuses purely on parsing CNAB 240/400 return files into structured JSON — it does not generate boletos or transmit instructions to banks.
Process CNAB 240 and CNAB 400 return formats from Brazilian banks without local parser code
Patterns agents use Cnab Online API for, with concrete tasks.
★ Boleto Reconciliation
Reconcile paid boletos against open invoices by uploading the daily CNAB return file from the bank and reading the parsed occurrences. POST /file accepts the raw CNAB file, then GET /file/{fileId}/occurrences returns the structured payment events so accounts receivable can mark invoices as paid. Replacing an in-house CNAB parser with this flow saves the multi-week effort of supporting bank-specific layouts.
Upload a CNAB 240 return file via POST /file, then call GET /file/{fileId}/occurrences and return all paid boletos.
Bank File Auditing
Audit incoming CNAB return files line by line to verify that the bank applied the expected events to each transaction. GET /file/{fileId}/lines returns every recognised line with its parsed fields, so a controller can compare totals and flag mismatches before posting to the ledger. Useful when integrating a new bank or when a layout version change introduces unexpected occurrences.
Call GET /file/{fileId}/lines for a previously uploaded CNAB file and return the count of lines per recognised record type.
Multi-Bank Boleto Aggregation
Accept CNAB return files from several Brazilian banks (Itaú, Bradesco, Santander, Caixa, Banco do Brasil) into one workflow. The API recognises common CNAB 240 and 400 layouts so a treasury system can normalise occurrences without maintaining a parser per bank. GET /file/{fileId} confirms that the upload was processed before downstream queries are issued.
Upload a CNAB return file from Banco do Brasil, then call GET /file/{fileId} and confirm processing succeeded before parsing occurrences.
AI Agent Boleto Workflow via Jentic
An AI agent in a finance ops workflow uses Jentic to upload a CNAB return file and pull occurrences without integrating directly with the Heroku-hosted parser. Because the API is unauthenticated, the agent can chain POST /file and GET /file/{fileId}/occurrences in a single workflow while Jentic handles retries and error handling.
Use Jentic to search for 'parse CNAB return file', upload the file via POST /file, then return occurrences from GET /file/{fileId}/occurrences.
4 endpoints — cnab online parses brazilian cnab return files (arquivos de retorno) so finance teams and integrators can read boleto payment confirmations, write-offs, and other bank occurrences without writing a custom parser.
METHOD
PATH
DESCRIPTION
/file
Upload a CNAB return file for parsing
/file/{fileId}
Retrieve metadata for a parsed file
/file/{fileId}/lines
List all recognised lines and their parsed fields
/file/{fileId}/occurrences
Retrieve structured boleto and bank occurrences
/file
Upload a CNAB return file for parsing
/file/{fileId}
Retrieve metadata for a parsed file
/file/{fileId}/lines
List all recognised lines and their parsed fields
/file/{fileId}/occurrences
Retrieve structured boleto and bank occurrences
Three things that make agents converge on Jentic-routed access.
Credential isolation
No credentials are required for the Cnab Online API. Jentic still proxies the call, applies retry policy, and tracks request metrics so the agent gets observability without any vault entry to manage.
Intent-based discovery
Agents search by intent (e.g. 'parse CNAB return file') and Jentic returns the upload and read operations with their input schemas, so the agent can construct a multi-step parse-and-read flow without reading Portuguese-language documentation.
Time to first call
Direct integration: a couple of hours to wire up multipart upload and the read endpoints. Through Jentic: under 30 minutes — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
Boleto.cloud
Boleto.cloud handles boleto generation and management for Brazilian payments.
Use Boleto.cloud to issue boletos and Cnab Online to reconcile the resulting bank return files.
Open Finance Brasil
Open Finance Brasil exposes regulated bank account and payment data via standardised APIs.
Choose Open Finance Brasil when you can use direct account data and webhooks; use Cnab Online when only the bank's CNAB return file is available.
Plaid
Plaid provides bank account aggregation primarily for North American institutions.
Use Plaid for North American bank data; use Cnab Online for Brazilian boleto file reconciliation.
Specific to using Cnab Online API through Jentic.
What authentication does the Cnab Online API use?
The OpenAPI spec declares no security schemes — the API is open and accepts file uploads without an API key. Through Jentic the call is still proxied for observability and retry handling, so an agent does not need to manage any credentials.
Can I parse both CNAB 240 and CNAB 400 files with this API?
Yes. POST /file accepts CNAB return files and the parser recognises both CNAB 240 and CNAB 400 layouts used by major Brazilian banks. The recognised fields are available via GET /file/{fileId}/lines after upload.
What are the rate limits for the Cnab Online API?
The OpenAPI spec does not declare numeric rate limits. The service runs on a single Heroku dyno, so high-volume callers should serialise uploads and avoid concurrent calls to /file from the same IP to prevent timeouts.
How do I retrieve boleto write-offs from a CNAB file through Jentic?
Search Jentic for 'parse CNAB return file', upload the file with POST /file to get a fileId, then call GET /file/{fileId}/occurrences to receive structured write-offs and other occurrences. Install the SDK with pip install jentic and call it via the async client.
Does this API generate boletos or transmit instructions to banks?
No. The API only parses CNAB return files. Generation of boletos (CNAB remessa) and transmission to banks must be handled by a separate service. Use this API when you already have a return file from the bank and need to extract structured data.
Is the API suitable for production reconciliation workloads?
It works well for prototypes and low-to-mid volume reconciliation. For high-throughput or strict SLA workloads consider hosting your own parser, since this service runs on a Heroku free-tier-style dyno and provides no published uptime guarantee.