This article is for an API Partner wanting to retrieve partner organization response information.
Contents
Summary
When interacting with a Discloser’s response data you can call two methods GET and PUT. This article covers the GET request, which allows you to retrieve the existing answer-values in an individual response. A GET request can be sent after a PUT request to verify the update to the data.
Pre-requisites: Valid subscription key and organization UUID for the respective Disclosure API environment.
Note - Data Sync: To ensure you are seeing the latest answer-values within a Discloser’s questionnaire-response then this data should be refreshed when updates are made to the response, either via the API or within the Portal directly.
Note - Hidden Questions: When a value is updated into a question which has been hidden by show/hide conditional logic, the value is stored regardless. Should the question become visible again (if the answer to a lead question changes), the previously hidden value would be included in the submission. You can see this using the “isHidden” field.
Note - Different States: It is possible to GET when the response workflow is in an “In Progress”, “Submitted” or “Amendments” state.
GET Request
The GET request details how to send the request to the response/response endpoint and the response that is returned when a successful request is sent.
URLs
Sandbox: https://api.pre.cdpgreenstar.net/asp/response/response
Production: https://api.cdp.net/response/response
Headers/Variables
subscription-key (header): For authorized user, the subscription key.
organization-id (header): Enter the UUID for the organization’s response.
Body
NULL
Response
Top Level: Response (n)
Answer-value data for the specified organizations response.
Field table
Note: The “status” field is the current state of the question in the Portal. These are for display purposes only; the Discloser should ensure their response is filled out correctly prior to final submission. The “isHidden” field is used to determine if a value is currently relevant to a Discloser's response.
-
"UNANSWERED"– The question has not been answered.
-
"ANSWERED"– The question is answered or has been marked by the user as answered.
-
"SKIPPED"– The question is marked as skipped by the user. No content has been filled.
-
"REVIEWED"– The question has been marked as reviewed by the Submission Lead.
-
"PROGRESS" – The question is currently in the process of being answered (matrix questions only).
Known Issue - Update Source: The “source” of an answer-value update is not currently shared via the API. As such, you cannot tell if an answer-value was last updated by a user in the Portal, an Excel import or via the API.
Schema
{
"content: "string",
"setAnsweredManually": boolean,
"questionId": "string",
"organizationId": "string",
"discloserId": "string",
"partnerId": "string",
"createdOn": "string",
"updatedOn": "string",
"rowId": "string",
"responseVersionId": "string",
"row": [{...}],
"attachments": [{...}],
"responseVersion": [{...}],
]
Second Level: Rows (n+1)
Additional information about the row and matrix question that the answer-value belongs to, if applicable.
Field table
Schema
...
"row": {
"refId": null,
"complexQuestionId": "string",
"order": integer
Second Level: Attachments (n+1)
Attachment information added as part of the response to the question.
Note: The attachment files themselves cannot be retrieved via the API.
Field table
Schema
...
"attachemnts": {
"filename": "string",
"fileSize": integer,
"fileType": "string",
}
...
Second Level: Response Version (n+1)
Response version to the question.
Field table
Schema
...
"responseVersion": {
}
...
JSON Response Example
Below is an example API response while calling the GET method for this endpoint. The data retrieved is a part of the response to the questionnaire, currently held for that organization.
{
"content: "null",
"setAnsweredManually": false,
"questionId": "14b2db4c-c9ef-4495-b020-7a8f436ae0ba",
"organizationId": "ldja212-121f-ds12-890a-000d4g21gl28",
"discloserId": "23df3456-2130-2g31-7a6h-3255450ac245",
"partnerId": null,
"createdOn": "2024-09-25T15:52:17.612Z",
"updatedOn": "2024-09-30T19:43:50.863Z",
"rowId": null,
"responseVersionId": "e1htf1f8-ra5h-4236-t0fd-4f3264ff7gy1",
"row": {
"id": "0e13121a-a696-221f-7065-c79c7ca542aa",
"refId": null,
"complexQuestionId": "9aa87751-7692-4a54-a00d-9c6c98fdea7a",
"instanceId": null,
"title": "Row 1",
"order": "1
}
"attachments": [{
"fileSize": 11111,
"fileName": “application/pdf",
"fileStatus": “uploaded”,
"responseVersion": {
}
POST/PUT Requests
POST and PUT are implemented for this endpoint, these are covered in articles:
If you have not found the answer you were looking for, please contact your Account Manager who will be able to assist you further.
