Get all answers to a survey
GET
/v1/Survey/Surveys/{id}/Answers
const url = 'https://rms.dev.caspeco.net/api/booking/v1/Survey/Surveys/example/Answers?filterTimeBy=0';const options = {method: 'GET', headers: {system: 'example', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://rms.dev.caspeco.net/api/booking/v1/Survey/Surveys/example/Answers?filterTimeBy=0' \ --header 'Authorization: Bearer <token>' \ --header 'system: example'Gets all the answers to a survey within the given time frames.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
The id of the survey
Header Parameters
Section titled “Header Parameters”system
required
string
The system name / database to query
Query Parameters
Section titled “Query Parameters”fromTime
string format: date-time
Only get answers from recipients after this time
toTime
string format: date-time
Only get answers from recipients before this time
filterTimeBy
One of:
integer
The times which should be compared. 0 = ReferenceTime, 1 = RespondTime, 2 = SentTime
Responses
Section titled “Responses”The answers to the survey
Media typeapplication/json
Array<object>
object
questionId
integer format: int64
ref
string
recipientId
string format: guid
surveyId
string format: guid
respondTime
string format: date-time
sentTime
string format: date-time
referenceTime
string format: date-time
valueStr
string
valueInt
integer format: int64
Example
{ "application/json": [ { "questionId": 0, "recipientId": "932f4d47-a8a8-4d45-93d1-212638c9872b", "surveyId": "ff07bf69-8453-4c1b-b407-1a3467a4109a", "respondTime": "2025-12-01T07:50:09.667285+00:00", "valueInt": 4 }, { "questionId": 1, "recipientId": "932f4d47-a8a8-4d45-93d1-212638c9872b", "surveyId": "ff07bf69-8453-4c1b-b407-1a3467a4109a", "respondTime": "2025-12-01T07:50:09.6673081+00:00", "valueStr": "Maten var god", "valueInt": 0 } ]}