Call a SubjectConnector using an app connector
Connector for retrieving attachments to dossier items and responses to dossier items.
You can find all endpoints on this page.
The SubjectConnector retrieves the attachment to a dossier item as a string in the Base64 format. You can convert this string to the original file. Depending on the method used, you can also retrieve the name of the attachment.
First you retrieve the attachment file names and GUIDs using the Get method.
First you retrieve the attachment file names and GUIDs using the 'GetSubjectAttachmentInfo'' method (as from Profit 3).
You then use the GUID to retrieve the attachment as such as a FileStream in base64 format. To do so, use one of these methods:
- GetAttachment
Retrieve the attachment to a dossier item. If there is no attachment, an error message appears.
- GetSubjectAttachmentData
Retrieve XML with the attachment to a dossier item and the name of the attachment. If there is no attachment, an empty XML file is returned.
Contents |
GetAttachmentInfo (retrieve file names and GUIDs)
Download an XML example file of the call (SOAP).
The response for a successful call contains the file names and GUIDs:
<Attachment fileId="E0ED3A144A8B89CA83DFFB987554F584" filename="Calculation sheet.xlsx" />
<Attachment fileId="1F9D7925405C83E8C27DE89E7F16F197" filename="Invoice_V1140464.pdf" />
<Attachment fileId="563B8BAD449E746CB254ABAD1687DBC1" filename="Quotation.docx" />
If there are no attachments, the response is an empty XML file.
Fields
- token
Token of the user who executes the connector. Use a CDATA tag for the token; see the XML example to be downloaded.
- subjectId
The internal number of the dossier item.
GetAttachment (retrieve attachment)
Download an XML example file of the call (SOAP).
The response for a successful call contains the attachment as FileStream in base64 format.
Fields
- token
Token of the user who executes the connector. Use a CDATA tag for the token; see the XML example to be downloaded.
- subjectId
The internal number of the dossier item.
- fileId
The GUID of the attachment. First you retrieve the GUID using the 'GetAttachmentInfo' method.
Note:
Starting with Profit 3, you can record multiple attachments for one dossier item. This is why, starting with Profit 3, this GetConnector contains the 'FileId' field. If a dossier item contains one attachment, you can retrieve it using 'SubjectId' (in this case, the GUID is not necessary). If a dossier item contains multiple attachments, 'subjectId' and 'fileId' are mandatory fields.
As from Profit 7, this transitory version will no longer be supported and both fields are always mandatory.
GetSubjectAttachmentData (retrieve attachment and attachment name)
Download an XML example file of the call (SOAP).
The response for a successful call contains an XML file with the attachment to a dossier item in Base64 format and the attachment name.
The fields are identical to the ones of the 'GetAttachment' method.
Data collection and default connectors
For each dossier item, you can retrieve the file names and GUIDs of attachments using the Files for dossier data collection. In addition, two default GetConnectors are available:
- Profit_Subject_Attachments
- Profit_Subject_Reaction_Attachment
Note:
For dossier items with one attachment, up to and including Profit 6, the GetConnectors based on the File items (without authorisation) and File items (with authorisation) data collections continue to work. Starting with Profit 3, these data collections contain the temporary Attachment (Legacy solution up to and including Profit 6) table.
Also see
Directly to |