Query temporary file
Querying a temporary CNAB file using its key returns detailed information about it, such as the number of occurrences that have already been processed and possible errors found in the file.
Request
ENDPOINT
/account/ACCOUNT_KEY/requester_profile/REQUESTER_PROFILE_KEY/temporary_cnab_file/TEMPORARY_CNAB_FILE_KEYMETHOD
GETPath parameters
| Field | Type | Description | Characters |
|---|---|---|---|
account_key | uuidv4 | Unique account identification key in uuid v4 format | 36 |
requester_profile_key | uuidv4 | Unique wallet identification key in uuid v4 format | 36 |
temporary_cnab_file_key | uuidv4 | Unique temporary CNAB file identification key in uuid v4 format | 36 |
Response
STATUS
200Response Body: Accepted file (no errors)
{
"temporary_cnab_file_key": "fa4f094d-8475-4828-9105-99756914e14f",
"temporary_cnab_file_name": "240827463_t.REM",
"temporary_cnab_file_status": "read",
"occurrence_quantity": 6,
"total_processed_occurrences": 6,
"created_at": "2024-08-28T15:09:30Z"
}
Response Body: Rejected file (with errors)
{
"temporary_cnab_file_key": "c16baa13-0969-46a7-a85f-6f975d266d9f",
"temporary_cnab_file_name": "240905623.REM",
"temporary_cnab_file_status": "rejected",
"occurrence_quantity": 0,
"total_processed_occurrences": 0,
"created_at": "2024-09-10T15:59:25Z",
"error_data": [
{
"code": "BKS000063",
"title": "Bad Request",
"description": "Invalid file code.",
"translation": "Codigo de arquivo invalido.",
"extra_fields": {
"details": "Invalid file code. Expected: '1'. Got: '0'.",
"file_line": 1,
"details_pt_br": "Código de arquivo inválido. Esperado: '1'. Recebido: '0'.",
"cnab_file_name": "240905623.REM",
"cnab_inline_end_position": 2,
"cnab_inline_start_position": 2
}
},
{
"code": "BKS000069",
"title": "Bad Request",
"description": "Invalid beneficiary account: beneficiary account is not the one that the requester profiles belongs to.",
"translation": "Conta do beneficiario invalida: a conta do beneficiario nao e aquela a qual a carteira de boletos pertence.",
"extra_fields": {
"details": "Invalid beneficiary account header on header. Expected: '1927400'. Got: '3;53179'.",
"file_line": 1,
"details_pt_br": "Conta do beneficiário inválida no header. Esperado: '1927400'. Recebido: '3;53179'.",
"cnab_file_name": "240905623.REM",
"cnab_inline_end_position": 46,
"cnab_inline_start_position": 40
}
},
{
"code": "BKS000064",
"title": "Bad Request",
"description": "Invalid bank code (014).",
"translation": "Codigo do banco invalido (014).",
"extra_fields": {
"details": "Invalid bank code. Expected: '329'. Got: '014'",
"bank_code": "014",
"details_pt_br": "Código do banco inválido. Esperado: '329'. Recebido: '014'",
"cnab_file_name": "240905623.REM"
}
},
{
"code": "BKS000056",
"title": "Bad Request",
"description": "Invalid record sequence.",
"translation": "Sequencia invalida de registros.",
"extra_fields": {
"cnab_line": 1,
"cnab_file_name": "240905623.REM"
}
},
{
"code": "BKS000056",
"title": "Bad Request",
"description": "Invalid record sequence.",
"translation": "Sequencia invalida de registros.",
"extra_fields": {
"cnab_line": 2,
"cnab_file_name": "240905623.REM"
}
},
{
"code": "BKS000086",
"title": "Bad Request",
"description": "File missing trailler record.",
"translation": "Arquivo sem registro trailler.",
"extra_fields": {
"file_line": 3,
"cnab_file_name": "240905623.REM"
}
}
]
}
Response Body Params
| Field | Type | Description | Characters |
|---|---|---|---|
temporary_cnab_file_key * | uuidv4 | Unique temporary CNAB file identification key in uuid v4 format | 36 |
temporary_cnab_file_name * | uuidv4 | File name | 100 |
temporary_cnab_file_status * | string | Temporary CNAB file status | temporary_cnab_file_status Enumerators |
occurrence_quantity * | integer | Number of occurrences in the file | - |
total_processed_occurrences * | integer | Number of occurrences already processed | - |
error_data | object array | Error objects found in the file, in JSON format, following the same pattern returned by the APIs | error_data Object |
created_at * | string | Timestamp of when the file was created in the database, in ISO Zulu format | 20 |
Enumeradores temporary_cnab_file_status
| 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 due to syntactic error |
Objeto error_data
| Field | Type | Description | Characters |
|---|---|---|---|
code * | string | Error code | 9 |
title * | string | Error title | 100 |
description * | string | Error description in English | 100 |
translation * | integer | Translation of error description | 100 |
extra_fields | object | Additional information about the error | - |
Important
The fields returned in the extra_fields object serve to provide additional information about the error and may vary. Therefore, they should not be mapped in a restrictive manner.
Error Response
STATUS
4xxResponse 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 |
| 404 | BKS000054 | Not Found | Remittance not found with key: {temporary_cnab_file_key} | Remessa não encontrada com a chave: {temporary_cnab_file_key} |