Patch a Survey
This endpoint can be used to patch certain attributes of a survey
Request
PATCH /accounts/{account-uuid}/surveys/{survey-uuid}
account-uuidis a 22-character identifier for the accountsurvey-uuidis a 22-character identifier for the survey
Authorization
Authorization header is required for this endpoint. See Authorization Tokens for details about auth tokens.
Headers
N/A
Query Parameters
N/A
Body
The body of the request is expected to be an array of JSON Patch operations
[
{ "op": "replace", "path": "/value", "value": "selected-value-id" }
]
Warning
This must be an array, even if you are sending just one operation
In the example above, the value path is being patched (replaced) with a selected value identifier. Single-select items will expect to have their value path patched, and multi-select items will expect values to be patched.
In a survey item, the value or values attribute will be null when an answer has not yet been provided. For multi-select items, if the user chooses none of the options, an empty array can be provded.
Allowed Operations
Currently the only operations allowed are:
replaceacceptedTermswith valuetrue- when user accepts terms.replacestatuswith valuecompleted- when a survey report is accepted, and billing record is created.
Response
| Response | Status Code | More Information |
|---|---|---|
| Success | 200 |
If the patch operation was successful |
| Not Found | 404 |
Survey or item does not exist with the provided UUID |
| Unauthorized | 401 |
If user is not authorized for the requested survey |
| Internal Server Error | 500 |
Unknown error |
Headers
N/A
Body
N/A