Skip to main content

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_KEY
METHOD
GET

Path parameters

FieldTypeDescriptionCharacters
account_keyuuidv4Unique account identification key in uuid v4 format36
requester_profile_keyuuidv4Unique wallet identification key in uuid v4 format36
temporary_cnab_file_keyuuidv4Unique temporary CNAB file identification key in uuid v4 format36

Response

STATUS
200
Response 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

FieldTypeDescriptionCharacters
temporary_cnab_file_key *uuidv4Unique temporary CNAB file identification key in uuid v4 format36
temporary_cnab_file_name *uuidv4File name100
temporary_cnab_file_status *stringTemporary CNAB file statustemporary_cnab_file_status Enumerators
occurrence_quantity *integerNumber of occurrences in the file-
total_processed_occurrences *integerNumber of occurrences already processed-
error_dataobject arrayError objects found in the file, in JSON format, following the same pattern returned by the APIserror_data Object
created_at *stringTimestamp of when the file was created in the database, in ISO Zulu format20

Enumeradores temporary_cnab_file_status

EnumeratorDescription
uploadedupload successful, but file has not yet started being processed
processingfile being read
readfile read and accepted
rejectedfile read and rejected due to syntactic error

Objeto error_data

FieldTypeDescriptionCharacters
code *stringError code9
title *stringError title100
description *stringError description in English100
translation *integerTranslation of error description100
extra_fieldsobjectAdditional 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
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
404BKS000054Not FoundRemittance not found with key: {temporary_cnab_file_key}Remessa não encontrada com a chave: {temporary_cnab_file_key}