Skip to main content

Upload CNAB file

Attention!

The call must be authenticated following the standard described in the Document upload section.

CNAB files offer the possibility of sending multiple boleto record instructions, along with other types of instructions (extension, discount, cancellation, etc.), for different boletos, in a single file. When sending instructions like those mentioned (extension, discount, etc.) for existing boletos, the boleto is identified by the requester profile code (requester_profile_code) and our number (our_number).

info

When uploading a CNAB file, if the request is successful (response code 202), a temporary CNAB file (TemporaryCNABFile) will be created. It is possible to check the file processing status --- as well as possible errors, both in the file itself and in its occurrences ---, using the temporary CNAB file query and its occurrences endpoints.

Request

ENDPOINT
/account/ACCOUNT_KEY/requester_profile/REQUESTER_PROFILE_KEY/cnab_file
METHOD
POST

Path parameters

FieldTypeDescriptionCharacters
account_keyuuidv4Unique account identification key, in uuid v4 format36
requester_profile_keyuuidv4Unique requester profile identification key, in uuid v4 format36

Request Body Params

The following data should be sent as form-data in the request body:

FieldTypeDescriptionCharacters
file *fileCNAB file following the standard established by QI Tech-

Response

STATUS
202
Response Body
{
"temporary_cnab_file_key": "f14e9bac-94ed-4eb1-87b4-7fd7b7a2d280",
"temporary_cnab_file_status": "accepted"
}

Response Body Params

FieldTypeDescriptionCharacters
temporary_cnab_file_key *uuidv4Unique CNAB file identification key in uuid v4 format36
temporary_cnab_file_status *stringCNAB file statustemporary_cnab_file_status Enumerators

temporary_cnab_file_status Enumerators

EnumeratorDescription
uploadedUpload successful, but file has not yet started being processed
processingFile being read
readFile read and accepted
rejectedFile read and rejected (all file occurrences are rejected)

Error Response

STATUS
4xx
Response Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
HTTP Code
status
QI Code
code
Title
title
Description (eng)
description
Description (ptbr)
translation
400QIT000001Bad RequestSchema ErrorSchema Inválido
404BKS000006Not FoundThe source account key was not found.A chave da conta de origem não foi encontrada.
400BKS000007Bad RequestIt was not possible to consult the source account at this time. Please try again in a few minutes.Não foi possível consultar a conta de origem neste momento. Por favor, tente novamente em alguns minutos.
400BKS000008Bad RequestThe source account is closed.A conta de origem está fechada.
400BKS000009Bad RequestThe source account is blocked.A conta de origem está bloqueada.
404BKS000013Not FoundRequester profile not foundCarteira não encontrada
400BKS000022Bad RequestRequester profile is not opened.Carteira não está aberta.
409BKS000053ConflictCNAB file already received: '<file_name>'Arquivo CNAB já recebido: '<file_name>'