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/asynchronousMÉTODO
POSTRequest Body Params
The following data must be sent as form-data in the request body:
Field | Type | Description | Required |
---|---|---|---|
file | file | Binary file of the document to be uploaded. | YES |
assignor_address | string | Address of the assignor. | YES |
assignor_address_number | string | Address number of the assignor. | YES |
assignor_city | string | City of the assignor. | YES |
assignor_state | string | State of the assignor. | YES |
assignor_CEP | string | ZIP code (CEP) of the assignor. | YES |
assignor_neighborhood | string | Neighborhood of the assignor. | YES |
Response
STATUS
200Response 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
400Response 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"'