How to upload files
This section presents two ways to upload files through the API
Upload files [Multipart]
Upload file and obtain a new process ID
Request
curl -X POST \ http://file.asisprojetos.com.br/api/v1/upload \ -H 'account-key: 4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e' \ -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb' \ -F 'file=@path/to/file/sped_fiscal.txt
Response
{"processos":[ { "id":22362, "nome":"sped_fiscal.txt", "dataHoraCriacao":"06-06-2018 12:34:46", "arquivoId":22740 } ]}
Upload files [Base64]
*Recommended only for small files up to 1mb
Upload file in base64 format and retrieve the process ID
Request
curl -X POST \ http://file.asisprojetos.com.br/api/v1/upload/base64?nome=arquivo.txt \ -H 'account-key: 4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e' \ -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb' \ -D 'ICAgICAxCWxlbwo=...'
Response
{"processos":[ { "id":22362, "nome":"sped_fiscal.txt", "dataHoraCriacao":"06-06-2018 12:34:46", "arquivoId":22740 } ]}
Next steps
In the next section you will explore more about intersection generation with Asis API.