Skip to main content

CNAB Files Retrieval


List CNAB files​

Returns a paginated list of CNAB files (remittance and return files exchanged with the bank) belonging to a bankslip profile of a fund class.

Available on
ProfileHostRequired permission
Consultantconsultant-apiGranted by the integration team

Base URL for each host: Environments (Hosts).

Request​

ENDPOINT
/bankslip_collection/fund_class/FUND_CLASS_KEY/bankslip_profile/BANKSLIP_PROFILE_KEY/cnab_files
METHOD
GET

Path Params​

ParameterDescription
fund_class_keyKey of the fund class. Returns 404 (BSC000006) if it doesn't exist.
bankslip_profile_keyKey of the bankslip profile, which must belong to the fund class. Returns 404 (BSC000008) if not found.

Query Params​

All parameters are optional.

ParameterTypeDescription
initial_datedateFilters files with cnab_date greater than or equal to the given date (YYYY-MM-DD).
final_datedateFilters files with cnab_date less than or equal to the given date (YYYY-MM-DD).
cnab_typestringFilters by file type (see CNAB Type).
limitintValue between 0 and 20 with the number of items per page. Default: 10.
pageintZero-based page number. Default: 0.

When is_last_page is false, request the next page to retrieve the remaining results.

Response​

Response Body
Response Body
{
"data": [
{
"cnab_file_key": "79f21d3e-ed99-413c-8e05-39cf84fbab7c",
"bankslip_profile": {
"bankslip_profile_key": "a1d7f09b-cb77-48da-a23d-b83d97d4b46b",
"bankslip_profile_code": "329-09-0001-0000000",
"bankslip_profile_number": 9,
"bankslip_provider": "qi_scd",
"additional_information": {
"requester_profile_key": "30f72181-042c-4aae-9be7-b2794916416f"
},
"internal_account_key": "18809219-17d9-4845-a830-51e7f2beaf28",
"fund_class": {
"fund_class_key": "92c63a0f-25d6-45cb-90a2-6026c0ce2ef9",
"document_number": "00.000.000/0001-01",
"name": "FUNDO DE INVESTIMENTO EM DIREITOS CREDITÓRIOS",
"manager": {
"name": "GESTÃO DE RECURSOS",
"manager_key": "7a5ff2f5-f127-451c-98d8-001826c35c3c",
"document_number": "00.100.100/0001-00"
}
}
},
"cnab_date": "2025-07-30",
"type": "return",
"status": "completed",
"download_filename": "cnab-retorno-2025-07-30-79f21d3e.ret",
"url": "https://URL_DO_ARQUIVO_CNAB",
"external_cnab_file_key": "e8b5e962-eb5f-4b9d-8d2b-70cd6d3d5252",
"number_of_occurrences": 6
},
{
"cnab_file_key": "ff7aaa47-a901-4f66-98d7-46f76ca4fa16",
"bankslip_profile": {
"bankslip_profile_key": "e0771a02-4f3e-4162-a468-a872fc6975e4",
"bankslip_profile_code": "329-09-0001-0000000",
"bankslip_profile_number": 9,
"bankslip_provider": "qi_scd",
"additional_information": {
"requester_profile_key": "cdec985f-e629-44ce-8511-a323f38bd63e"
},
"internal_account_key": "5e621ba2-b4ac-4ddd-9893-82d220e1577e",
"fund_class": {
"fund_class_key": "92c63a0f-25d6-45cb-90a2-6026c0ce2ef9",
"document_number": "00.000.000/0001-01",
"name": "FUNDO DE INVESTIMENTO EM DIREITOS CREDITÓRIOS",
"manager": {
"name": "GESTÃO DE RECURSOS",
"manager_key": "7a5ff2f5-f127-451c-98d8-001826c35c3c",
"document_number": "00.100.100/0001-00"
}
}
},
"cnab_date": "2025-07-30",
"type": "external_return",
"status": "completed",
"download_filename": "cnab-retorno-2025-07-30-ff7aaa47.ret",
"url": "https://URL_DO_ARQUIVO_CNAB",
"external_cnab_file_key": "d3b1f7c4-9e2a-4f6b-8c1d-5a7e9b3f2c8e",
"number_of_occurrences": 3,
"bankslip_expenses": [
{
"bankslip_expense_key": "4d727b05-00df-454e-93e3-160ec9ee596c",
"type": "fee_or_costs.payment",
"number_of_expenses": 3,
"total_value": 2.25,
"status": "completed"
}
]
}
],
"limit": 10,
"page": 0,
"is_last_page": true
}

Paginated Object​

FieldTypeDescription
dataarrayList of CNAB File objects
limitintLimit of objects retrieved per page
pageintNumber of the retrieved page
is_last_pagebooleanIndicates whether the retrieved page is the last one

CNAB File​

FieldTypeDescription
cnab_file_keystringUnique identifier of the CNAB file.
bankslip_profileobjectAssociated bankslip profile (see Bankslip Profile).
cnab_datedateDate of the CNAB file.
typestringFile type (see CNAB Type).
statusstringFile status (see CNAB Status).
download_filenamestringName the file is downloaded with.
urlstringPre-signed URL to download the file, valid for 1 hour. Omitted if it cannot be generated.
external_cnab_file_keystringIdentifier of the external CNAB file. Only present when the file has this value.
headerstringFile header. Only present when the file has this value.
trailerstringFile trailer. Only present when the file has this value.
number_of_occurrencesintNumber of occurrences in the file. Only present when the file has this value.
expectationobjectExpectation data of the file. Only present when the file has this value.
bankslip_expensesarrayList of Bankslip Expense objects. Only present when the file has associated expenses.

Bankslip Expense​

FieldTypeDescription
bankslip_expense_keystringUnique identifier of the expense.
typestringExpense type.
number_of_expensesintNumber of grouped expenses.
total_valuenumberTotal value of the expenses.
statusstringExpense status.

CNAB Type​

EnumeratorDescription
returnReturn File
external_returnExternal Return File
remittanceRemittance
external_remittanceExternal Remittance

CNAB Status​

EnumeratorDescription
createdCreated
pending_processingPending processing
completedCompleted
canceledCanceled

Errors​

StatusCodeWhen it happens
404BSC000008The bankslip profile does not exist in this fund.
404BSC000006The fund_class_key does not exist.
403BSC000036The fund does not belong to your profile.

Authentication, permission and host errors: see API errors.