PATCH ./questionnaires/{id}

It is used to update the questionnaire details.

Path parameters

NameValue TypeValidationDetails
idintRequiredThe Questionnaire id

GET parameters

NameValue TypeValidationDetails
titlestringOptionalThe Questionnaire title
fillers[]stringOptionalThe fillers who should fill the questionnaire
isAnonymousAnswerboolOptionalIf we want the questionnaire to be annonymous.
viewers[students]boolOptionalThe students can view the results
viewers[teachers]boolOptionalThe teachers can view the results
viewers[parents]boolOptionalThe parents can view the results
viewers[everyone]boolOptionalCan view the result all persons who filled the questionnaire
viewers[others][]stringOptionalOther persons can view the results
recurrence[type]string, in_list[weekly,monthly,dates]OptionalSet the reccurence type
recurrence[daysOfWeek][]string, is_list[Mon, Tue, Wed, Thu, Fri, Sat, Sun]OptionalSet the day of the week
recurrence[dayOfMonth][]intOptionalSet the day of month
recurrence[dates][]rfc_dateOptionalSet the fixed dates
recurrence[startDate]rfc_dateOptionalSet the starting date
recurrence[endDate]rfc_dateOptionalSet the last date

Validation

Error FieldError CodeError Message
fillers102Invalid fillers.
recurrence[startDate], recurrence[endDate]110The date format is not Y-m-d or the date is invalid.
recurrence[startDate], recurrence[endDate]111The selected date is not part of the current school year
recurrence[startDate]112The selected date is in the future.
recurrence[endDate]114The end date must be higher than start date.
recurrence[daysOfWeek]115Invalid day of the week..

Input example

{
"title": "Ana are mere",
"fillers": [
"g-elevi-cl-577", // toti elevii din clasa 15
"g-elevi-cl-578", // toate cadrele care predau la clasa 15
"g-parinti-cl-577", // toti parintii elevilor din clasa 15
"g-cadre-cl-577" // toate cadrele care predau la clasa 15
],
"isAnonymousAnswer": 0,
"viewers": {
"students": 0,
"teachers": 0,
"parents": 0,
"everyone": 0,
"others": [211891]
},
"recurrence": {
// "type": "weekly", // weekly, monthly, dates
// "daysOfWeek": [
// "Mon",
// "Tue"
// ],
"type": "monthly",
"dayOfMonth": [
1,
2,
3
],
// "type": "dates",
// "dates": [
// "2024-11-12",
// "2024-11-13"
// ],
// "startDate": "2024-09-10", -> Now we have no support for this
"endDate": "2024-12-24"
},
"publishResultsType": "manual",
"timeLimit": 300
}

Output example

{
"id": 513
}