This article is for an API Partner wanting to make edits to a discloser’s response in the questionnaire-response Portal
Contents
Summary
This article covers the PUT request, used to update a Discloser’s questionnaire-response.
Pre-requisites: Valid subscription key and organization UUID for the respective Disclosure API environment.
Guidelines
-
All questions that are part of the Discloser’s response can be retrieved and updated.
-
It will only be possible to PUT when the response workflow status is set to IN PROGRESS or AMENDMENTS (i.e., it is not possible to send a PUT request once a response is To check the status of a questionnaire call GET - Questionnaire metadata submitted).
-
When a value is updated into a question which has been hidden by show/hide conditional logic, the value is stored until the response is submitted. Should the question become visible again (if the answer to a lead question changes), the previously hidden value would be included in the submission. Response data includes a isHidden status flag indicating whether the question is visible to the user in the portal. To check the isHidden property, call the GET - Retrieve a Discloser's Response endpoint).
-
To answer an expression (auto-calculation) question, an update must be sent based on the formulas provided by the GET - Expressions endpoint. The fields do not auto-calculate when the dependent questions are updated.
-
Answers sent to an expression (auto-calculation) question will not be validated by the CDP Portal. You must ensure the calculation is performed correctly before sending the value.
-
A GET request can be sent after a PUT request to verify the update to the data.
-
When updating a matrix question a rowId must be provided or the update cannot be stored against the question.
-
Send a null value to reset:
-
A numeric or rich text question.
-
A date.
-
Single/multi select and/or grouped options questions.
-
PUT Request
The information provided below shows how to structure a request to update a Discloser’s questionnaire-response, for each question type. This shows each question type in isolation, however, it is expected that multiple question updates are sent together.
Note: All fieldnames throughout the API are formatted using camel casing.
Known limitation: Large batch updates
Requests that update a very large number of matrix cells in a single call (roughly 2,000 or more) currently fail with an error rather than being processed. This affects responses to matrix questions with many added rows.
Workaround: Split large updates into smaller batches, around 1,000 cells per request is a safe upper limit and submit them sequentially. Each batch is processed independently, so a failure in one batch does not roll back previously submitted batches.
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): A valid partner organization ID.
Body
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 property is used to determine if a value is currently relevant to a Discloser’s response. To check the isHidden property, call the GET - Retrieve a Discloser's Response endpoint.
-
"UNANSWERED"– The question has not yet 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 is marked as reviewed.
-
"PROGRESS" – The question is currently in the process of being answered (matrix questions only).
Note: All the statuses aside from ANSWERED and UNANSWERED only apply to top -level questions/do not apply to cells in matrix questions.
JSON Body (Generic Schema)
The example below shows a typical successful update. In practice, bulk updates should be sent to multiple questions simultaneously.
"rowId: "string",
"content": {}
"status": "string",
}]
JSON Body (SINGLE_SELECT: Working example)
-
Validation on single select is based on "id" and not "name". However, the name must be present and not null.
Standard option:
"content": {
"id": "1289be31-2d95-4a3d-aa66-a690dd63650e",
"status": “ANSWERED”,
}
}]
-
The following shows how to configure the isOther value through the API. When done via the CDP portal, users must select the option “Other, please specify” and a description field is subsequently revealed to enable a custom text value to be added to the response.
Note: If the question is part of a matrix question, then the rowId needs to be included in the request.
“isOther” option (within a matrix question):
"rowId": "ba00926f-b1bf-47be-abee-3682304590f2",
"content": {
"id": "1289be31-2d95-4a3d-aa66-a690dd63650e",
"description": "CDP Test Other",
"status": “ANSWERED”,
}
}]
JSON Body (MULTI_SELECT: Working example)
Validation on multi select is based on "id" and not "name". However, the name field must be present and not null.
"id": "5f6d9d1e-8684-4b75-a6ac-9b738af73ef2",
}
}]
New for 2026: Ability to unselect Options
[{
"content": null,
"status": "UNANSWERED",
JSON Body (NUMERIC: Working example)
[{
"content": “100.12”,
"status": "ANSWERED",
}
Note: The numeric value entered should not contain commas. And should match any criteria set out in the validationRules.
JSON Body (DATE: Working example)
Note: The Date Format must be in ISO-8601 format.
"content": "2023-03-20T23:00:00.000Z",
"status": "ANSWERED",
}
JSON Body (RICH_TEXT: Working example)
Note: Rich text formatting cannot be inserted into rich text questions at column level in the current build. Any formatting entered will be taken as a literal string value.
[{
"content": "Hello, world!",
"status": "ANSWERED"
}
JSON Body (MATRIX: Working example)
Updates to matrix questions can be made to both the parent and the child/column question(s) at the same time as shown. You cannot add content to the parent question as this does not hold any answer-value data.
[{
"content": null,
"status": "PROGRESS",
"status": "ANSWERED"
}
]
Note: If you update a matrix question value without adding a rowId then the update is lost, and no error is returned to flag this.
JSON Body (GROUPED_OPTIONS: Working example)
Known issue: As noted in the GET /questions endpoint some of the option names may contain whitespace that needs to be included for the update to be accepted.
"group": "2d64aaa0-7869-4a76-8505-9ce79b4ddbbc",
],
}
}
Response
JSON Response Schema – Success
The following message will be displayed on successful updating of the content.
{
JSON Response Schema – Client Error
The following message will be displayed on unsuccessful updating of the content.
Note: If any part of the update fails, then the whole update will be rejected and no changes would occur in the CDP Portal.
{
As much as possible the error messages will direct you to where the issue was found in the provided PUT request body.
Error Handling
1. Invalid Subscription Key ID
When an incorrect or invalid subscription key is entered, the following error is displayed:
2. Invalid Organization ID
When an incorrect or invalid organization key is entered, the following error is displayed:
3. Invalid questionId
When an incorrect or invalid questionId is entered, the following error is displayed:
"questionId": "1",
4. Previous Year Questions
When a previous questionId is used, the following error is displayed:
5. Invalid Status
When an incorrect or invalid answer status is entered, the following error is displayed:
"updateResponseInput.status must be one of the following values: UNANSWERED, ANSWERED, SKIPPED, PROGRESS, REVIEWED, CONDITIONAL",
],
6. Non-Editable Response
When the response is in a non-editable state (submitted), the following error is displayed:
7. Invalid SINGLE_SELECT option
When an incorrect or invalid Option Id or name is entered, the following error is displayed:
"responseContent": {
"id": "68a11cd1-2c08-4cf8-9e42-8586fa9dd086",
"statusCode": 400,
}
8. Invalid Option - MULTI_SELECT
When an incorrect or invalid option ID is entered for the specified question, the following error is displayed:
"id": "5f6d9d1e-8684-4b75-a6ac-9b738af73ef2",
{
}
],
}
9. Invalid Numerical Input
When an incorrect numeric value is entered based on the validation rules of the question, the following error is displayed:
When an invalid numeric value is entered, the following error is displayed:
10. Invalid/Incorrect Date
When an incorrect or invalid date value is entered based on the validation rules of the questions, the following errors is displayed:
11. Invalid/Incorrect Matrix Row ID
When an incorrect or invalid matrix row id value is entered for the specified question, the following error is displayed:
12. Invalid/Incorrect GROUPED_OPTIONS value
When an incorrect or invalid values are entered, the following errors is displayed:
"group": "6e7a43d2-d525-4f77-9a14-efa7cfd0afc1e",
],
],
}
13. URL Error
When a URL is entered as a part of the update response, the following error is displayed. The API currently doesn't support URL links due to security reasons.
14. General Error
When multiple updates are sent for a single question in a single Json update, it will result in an error. Only singular updates per question is allowed.
POST/DELETE Requests
POST requests are not implemented for this endpoint, as updates can only be made against an existing response.
DELETE requests are not implemented for this endpoint, preventing deletion of a Discloser’s response data.
If you have not found the answer you were looking for, please contact your Account Manager who will be able to assist you further.
