Skip to main content

CNAB Document Upload

Usage

This method is used to convert each line of a CNAB 444 file into a PDF asynchronously.

The event can be created before the document creation process is completed.

Important Notice!

The field is_asynchronous must be set to TRUE when creating the event. Documents will be available for signing only after the document generation is finished.

Request

ENDPOINT
/certifier/document/trade_bill/asynchronous
MÉTODO
POST

Request Body Params

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

FieldTypeDescriptionRequired
filefileBinary file of the document to be uploaded.YES
assignor_addressstringAddress of the assignor.YES
assignor_address_numberstringAddress number of the assignor.YES
assignor_citystringCity of the assignor.YES
assignor_statestringState of the assignor.YES
assignor_CEPstringZIP code (CEP) of the assignor.YES
assignor_neighborhoodstringNeighborhood of the assignor.YES

Response

STATUS
200
Response Body
[
{
"control_number": "1123",
"document_key": "d559e3dc-d19c-494e-b02e-b7199e5325ea",
"file_size": 1679,
"name": "trade_bill_1.pdf",
"url": "https://storage.googleapis.com/certifier-api-storage-sandbox/d559e3dc-d19c-494e-b02e-b7199e5325ea/teste_of_original.pdf"
},
{
"control_number": "1123",
"document_key": "d559e3dc-d19c-494e-b02e-b7199e5325ea",
"file_size": 1679,
"name": "trade_bill_2.pdf",
"url": "https://storage.googleapis.com/certifier-api-storage-sandbox/d559e3dc-d19c-494e-b02e-b7199e5325ea/teste_of_original.pdf"
},
{
"control_number": "1123",
"document_key": "d559e3dc-d19c-494e-b02e-b7199e5325ea",
"file_size": 1679,
"name": "trade_bill_3.pdf",
"url": "https://storage.googleapis.com/certifier-api-storage-sandbox/d559e3dc-d19c-494e-b02e-b7199e5325ea/teste_of_original.pdf"
}
]

STATUS
400
Response Body
{
"title": "Bad Request",
"description": "Document size larger than 20 MB"
}

Example Request

curl --location 'https://api.sandbox.certifiqi.com.br/document' \
--header 'x-api-token: chave de api' \
--form 'file=@"/seu_cnab.txt"' \
--form 'assignor_address="Rua"' \
--form 'assignor_address_number="1111"' \
--form 'assignor_city="São Paulo"' \
--form 'assignor_state="São Paulo"' \
--form 'assignor_CEP="123456789113"' \
--form 'assignor_neighborhood="Teste"'