Skip to main content

Retrieve an organization’s response

Overview​

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 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​

EnvironmentURL
Sandboxhttps://api.pre.cdpgreenstar.net/asp/response/response
Productionhttps://api.cdp.net/response/response

Parameters​

NameLocationDescription
subscription-keyheaderFor authorized user, the subscription key.
organization-idheaderEnter the UUID for the organization's response.

Body​

NULL

Response​

Top level: Response (n)​

Answer-value data for the specified organization's response.

Field table

FieldDescriptionData Type
idThe ID of the response record within the entire response. This is unique to each organization's response.integer
contentThe value of the response answer-value field.

Note: Use JSON.parse to clean string.
string
statusThe status of the question-answer. See below.string
setAnsweredManuallyIndicates if the status has been changed manually to ANSWERED in the Portal by the user.boolean
questionIdThe ID of the question the answer value refers to.string
organizationIdThe UUID of the organization the answer belongs to.array
discloserIdThe internal CDP ID of the user that last edited the answer-value in the CDP Portal.array
partnerIdThe internal CDP ID of the API Partner that updated the response via the API.array
createdOnTimestamp of when the answer-value was initially created.string
updatedOnTimestamp of when the answer-value was most recently updated.string
rowIdFor Matrix question type only: the ID of the row the answer-value belongs to.string
responseVersionIdThe ID of response version.
rowFor Matrix question type only: additional information of a row in a matrix question.array
attachmentsFor Attachment question type only: additional information about the attached file.array
responseVersionResponse version to the question.array

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.

StatusMeaning
UNANSWEREDThe question has not been answered.
ANSWEREDThe question is answered or has been marked by the user as answered.
SKIPPEDThe question is marked as skipped by the user. No content has been filled.
REVIEWEDThe question has been marked as reviewed by the Submission Lead.
PROGRESSThe 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

[
{
"id": integer,
"content": "string",
"status": "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

FieldDescriptionData Type
idThe ID for the row within the matrix question. Pre-set row IDs are shared across all organizations and endpoints; newly created row IDs are unique to that specific questionnaire-response.string
refIdThe permanent ID for the row within the matrix question.string
complexQuestionIdThe ID of the parent matrix question.string
instanceIdThe ID that is generated if new rows are created via "Add row" button in the Portal or through API endpoint.string
titleThe name of the row.string
orderThe position of the row within the matrix question.integer

Schema

[{
...
"row": {
"id": "string",
"refId": null,
"complexQuestionId": "string",
"instanceId": null,
"title": "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

FieldDescriptionData Type
idThe ID for the row within the matrix question. Pre-set row IDs are shared across all organizations and endpoints, newly created row IDs are unique to that specific questionnaire-response.string
fileNameThe name of the attached file.string
fileSizeThe size of the attached file.integer
fileTypeType of file attached.string
fileStatusThe status of the file.string

Schema

[{
...
"attachments": {
"id": integer,
"fileName": "string",
"fileSize": integer,
"fileType": "string",
"fileStatus": "string"
}
...
}]

Second level: response version (n+1)​

Response version to the question.

Field table

FieldDescriptionData Type
versionThe version number of the response to the specific question.string

Schema

[{
...
"responseVersion": {
"version": "string"
}
...
}]

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.

[
{
"id": 1234567,
"content": "null",
"status": "ANSWERED",
"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": [
{
"id": 11111,
"fileName": "CDP Admin.pdf",
"fileSize": 11111,
"fileType": "application/pdf",
"fileStatus": "uploaded"
}
],
"responseVersion": {
"version": "1.0"
}
}
]

POST/PUT requests​

POST and PUT are implemented for this endpoint, these are covered in articles: