PATCH ./questionnaires/{id}
It is used to update the questionnaire details.
Path parameters
Name | Value Type | Validation | Details |
---|
id | int | Required | The Questionnaire id |
GET parameters
Name | Value Type | Validation | Details |
---|
title | string | Optional | The Questionnaire title |
fillers[] | string | Optional | The fillers who should fill the questionnaire |
isAnonymousAnswer | bool | Optional | If we want the questionnaire to be annonymous. |
viewers[students] | bool | Optional | The students can view the results |
viewers[teachers] | bool | Optional | The teachers can view the results |
viewers[parents] | bool | Optional | The parents can view the results |
viewers[everyone] | bool | Optional | Can view the result all persons who filled the questionnaire |
viewers[others][] | string | Optional | Other persons can view the results |
recurrence[type] | string, in_list[weekly ,monthly ,dates ] | Optional | Set the reccurence type |
recurrence[daysOfWeek][] | string, is_list[Mon , Tue , Wed , Thu , Fri , Sat , Sun ] | Optional | Set the day of the week |
recurrence[dayOfMonth][] | int | Optional | Set the day of month |
recurrence[dates][] | rfc_date | Optional | Set the fixed dates |
recurrence[startDate] | rfc_date | Optional | Set the starting date |
recurrence[endDate] | rfc_date | Optional | Set the last date |
Validation
Error Field | Error Code | Error Message |
---|
fillers | 102 | Invalid fillers. |
recurrence[startDate], recurrence[endDate] | 110 | The date format is not Y-m-d or the date is invalid. |
recurrence[startDate], recurrence[endDate] | 111 | The selected date is not part of the current school year |
recurrence[startDate] | 112 | The selected date is in the future. |
recurrence[endDate] | 114 | The end date must be higher than start date. |
recurrence[daysOfWeek] | 115 | Invalid day of the week.. |
{
"title": "Ana are mere",
"fillers": [
"g-elevi-cl-577",
"g-elevi-cl-578",
"g-parinti-cl-577",
"g-cadre-cl-577"
],
"isAnonymousAnswer": 0,
"viewers": {
"students": 0,
"teachers": 0,
"parents": 0,
"everyone": 0,
"others": [211891]
},
"recurrence": {
"type": "monthly",
"dayOfMonth": [
1,
2,
3
],
"endDate": "2024-12-24"
},
"publishResultsType": "manual",
"timeLimit": 300
}
Output example
{
"id": 513
}