Upload CNAB file
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).
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
Path parameters
| Field | Type | Description | Characters |
|---|---|---|---|
account_key | uuidv4 | Unique account identification key, in uuid v4 format | 36 |
requester_profile_key | uuidv4 | Unique requester profile identification key, in uuid v4 format | 36 |
Request Body Params
The following data should be sent as form-data in the request body:
| Field | Type | Description | Characters |
|---|---|---|---|
file * | file | CNAB file following the standard established by QI Tech | - |
Response
Response Body
{
"temporary_cnab_file_key": "f14e9bac-94ed-4eb1-87b4-7fd7b7a2d280",
"temporary_cnab_file_status": "accepted"
}
Response Body Params
| Field | Type | Description | Characters |
|---|---|---|---|
temporary_cnab_file_key * | uuidv4 | Unique CNAB file identification key in uuid v4 format | 36 |
temporary_cnab_file_status * | string | CNAB file status | temporary_cnab_file_status Enumerators |
temporary_cnab_file_status Enumerators
| Enumerator | Description |
|---|---|
| uploaded | Upload successful, but file has not yet started being processed |
| processing | File being read |
| read | File read and accepted |
| rejected | File read and rejected (all file occurrences are rejected) |
Error Response
Response Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
HTTP Codestatus | QI Codecode | Titletitle | Description (eng)description | Description (ptbr)translation |
|---|---|---|---|---|
| 400 | QIT000001 | Bad Request | Schema Error | Schema Inválido |
| 404 | BKS000006 | Not Found | The source account key was not found. | A chave da conta de origem não foi encontrada. |
| 400 | BKS000007 | Bad Request | It 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. |
| 400 | BKS000008 | Bad Request | The source account is closed. | A conta de origem está fechada. |
| 400 | BKS000009 | Bad Request | The source account is blocked. | A conta de origem está bloqueada. |
| 404 | BKS000013 | Not Found | Requester profile not found | Carteira não encontrada |
| 400 | BKS000022 | Bad Request | Requester profile is not opened. | Carteira não está aberta. |
| 409 | BKS000053 | Conflict | CNAB file already received: '<file_name>' | Arquivo CNAB já recebido: '<file_name>' |