Profit REST Service FileConnector
Profit Connector for uploading and downloading files.
Retrieve a file from Profit
You need the GUID and the original file name of the attachment. These can be retrieved with a GetConnector. Next, call the FileConnector and retrieve the file.
You can only use the FileConnector to retrieve files if the SubjectConnector has been activated in the app connector.
Retrieve GUID and file name using a GetConnector
- Go to: / / / .
- Click on: .
- Add a GetConnector based on a data collection with dossier items.
- Change the data collection and add the following fields:
- (GUID of the attachment)
- (Original file name of the attachment)
To retrieve a file using the connector:
- Call the Profit REST Services.
The file name must be the original name that you have retrieved from Profit. So you cannot invent a name.
If the file name of an attachment contains an underscore (_), replace it with _5f.
For example: You replace file name Invoice_nr3734.pdf with Invoice_5fnr3734.pdf.
- Choose one of the following methods to save the file:
- Base64 string
- Original file format with the original file name (Binary)
Upload a file to Profit
You can only use the FileConnector to upload files if the correct UpdateConnector has been activated in the app connector. Use a suitable UpdateConnector, such as KnSubject.
This process consists of two steps:
- Upload the file. The file is assigned a GUID.
- Link the GUID to an existing dossier item.
Step 1: To upload a file:
- In the test tool, drag the file into the Drop files here box.
- Click on: Upload files.
You can see the GUID below the box.
In a script, you can upload the file using the following call:
Step 2: To link a GUID to a dossier item:
In this example you add a dossier item with an attachment. You must provide the original file name of the attachment and the GUID.
"Ds": "Invoice received from AFAS",