Contents
Summary
The following endpoints enable users to add or remove an attachment within the Discloser’s questionnaire-response
Pre-requisites: Valid subscription key, organization UUID and question ID for the relevant attachment question in the respective Disclosure API environment.
Note - Question Type: Files can only be attached to questions with the “ATTACHMENT” type. Once attachments have been added, the file metadata is returned via the GET/response endpoint.
POST Request
Details how to complete the POST request to add a file attachment to a question.
Note - Restrictions: File type and size restrictions apply to the POST request as in the CDP Response Portal:
-
Supported file types: PDF, DOCX, DOC, XLSX, XLS, CSV, PPTX, PPTXS
-
File size: 50Mb
Body
questionId: Question ID of a file attachment question.
file: Valid file attachment (see above).
rowId: Row id if the attachment question is within a matrix question (currently all are within a matrix question).
Response
Field table
Schema
"fileName": "string",
"fileSize": integer,
"fileType": "string",
"fileStatus": "string",
DELETE Request
Details on how to complete the DELETE request to remove a file attachment from a question.
Parameters
Response
Field table
Error Handling
1. Invalid file type
When an invalid file type is entered, the following error is displayed:
"fileFormat": "application/json"
"supportedFileFormat": [
"PDF",
"CSV",
"DOCX",
"DOC",
"XLSX",
"XLS",
"PPTX",
"PPT",
],
"error": “Bad Request”
2. File is too big
When a file that is too big is entered, the following error is displayed:
"fileSize": 84696258,
If you have not found the answer you were looking for, please contact your Account Manager who will be able to assist you further.
