Attach files to apps

Apps in Torii have multiple app fields, such as state, app owner, expenses and others. Some of the fields are of type fileUpload which allows to attach files to the app. you can see all available app fields using the List app fields API.

Step 1

Upload the file and get the unique idFile identifier, see the Uploading files guide to learn more.

Step 2

To update an app and attach one uploaded document, use the Update app API and replace the ID_FILE placeholder with the value from the previous step.

curl --request POST \
     --url https://api.toriihq.com/v1.0/apps/ID_APP \
     --header 'Authorization: Bearer API_KEY' \
     --header 'accept: */*' \
     --header 'content-type: application/json' \
     --data '
{
  "uploadInvoice": [
    {
      "idUpload": ID_FILE,
      "name": "myFile_final_final.pdf"
    }
  ]
}
'