Download app documents
Apps in Torii may store multiple documents such as PDF files. To download them from the API, use the following API calls:
Step 1
Use the List apps API to get the unique file identifier of the documents stored in the application:
curl -H "Authorization: Bearer API_KEY" \
https://api.toriihq.com/v1.0/apps?fields=id,uploadContract,uploadInvoice
This will show contracts with their id
and documents
list:
[
{
"id": 1,
"uploadInvoice": [
"name": "file.pdf",
"idUpload": 179281
]
}
]
Step 2
Use the Download file API to download the file. Replace the ID_UPLOAD
with the idUpload
from the previous step:
curl -L -H "Authorization: Bearer API_KEY" \
-o downloaded_file.json \
"https://api.toriihq.com/v1.0/files/ID_UPLOAD/download"
The file will be saved as downloaded_file.json
.
Updated about 1 year ago