跳到主要内容

CNAB 文件上传

使用说明

此方法用于将 CNAB 444 的每一行以异步方式转换为 PDF 文件。

事件可以在文件生成完成之前创建。

重要提示!

在创建事件时,is_asynchronous 字段必须设置为 TRUE。文件生成完成后,文件才可供签署。

Request

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

Request Body Params

以下数据需作为 form-data 发送到请求体中:

字段类型描述必填
filefile需要发送的文件的二进制内容。
assignor_addressstring转让方地址
assignor_address_numberstring转让方地址门牌号
assignor_citystring转让方城市
assignor_statestring转让方州
assignor_CEPstring转让方邮政编码
assignor_neighborhood string转让方社区

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"
}

请求示例

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"'