Skip to main content

Template

Create template#

Creates new template.

Request body:

AttributeTypeDescriptionNullable
nameStringTemplate namefalse
quickBooleanIs a template for quick surveysfalse
categoryIdStringTemplate category idfalse
gradeConditionsList of objectSetting parameters of the result (only for surveys with grades) true
showGradesBooleanWhether to show grades when taking a survey.Default falsetrue
withGradesBooleanWhether the template with scores is.Default falsetrue
deletedBooleanTemplate activity.Default falsetrue
hiddenBooleanTemplate visibility for users. Default falsetrue

Response

Returns Template object

Examples

curl --request POST https://api.qvalon.com/v1/survey/templates \
--header 'Authorization: Bearer <your_token>' \
-d '{"name":"Test template","quick":false,"categoryId":"60826e00f5636740f6ef148a","gradeConditions":[],"showGrades":true,"withGrades":true}'
200 OK
[
{
"id": "60826e0ef5636740f6ef148b",
"type": "SURVEY",
"categoryId": "60826e00f5636740f6ef148a",
"categoryName": "Test category",
"deleted": false,
"hidden": false,
"tenant": "youCompany",
"name": "Test template",
"withGrades": true,
"showGrades": true,
"questionsCount": 0,
"gradeConditions": [],
"labels": {},
"quick": false
}
]

Update template#

Update template settings or deactivate template

Request body:

AttributeTypeDescriptionNullable
idStringIdentifierfalse
nameStringTemplate namefalse
quickBooleanIs a template for quick surveysfalse
categoryIdStringTemplate category idfalse
gradeConditionsList of objectSetting parameters of the result (only for surveys with grades) true
showGradesBooleanWhether to show grades when taking a surveyfalse
withGradesBooleanWhether the template with scores isfalse
deletedBooleanTemplate activityfalse
hiddenBooleanTemplate visibility for usersfalse

Response

Returns Template object

Examples

curl --request PUT https://api.qvalon.com/v1/survey/templates \
--header 'Authorization: Bearer <your_token>' \
-d '{"id":"60826e0ef5636740f6ef148b","name":"Test template update","quick":false,"categoryId":"60826e00f5636740f6ef148a","gradeConditions":[],"showGrades":false,"withGrades":false,"deleted":false,"hidden":false}'
200 OK
[
{
"id": "60826e0ef5636740f6ef148b",
"type": "SURVEY",
"categoryId": "60826e00f5636740f6ef148a",
"categoryName": "Test template update",
"deleted": false,
"hidden": false,
"tenant": "youCompany",
"name": "Test template",
"withGrades": false,
"showGrades": false,
"questionsCount": 0,
"gradeConditions": [],
"labels": {},
"quick": false
}
]

List templates#

Get templates by filter

Request parameters:

Request ParameterTypeDescriptionRequired
pageStringIdentifierfalse
sizeStringIdentifierfalse

Request body:

AttributeTypeDescriptionNullable
onlyActiveStringIdentifierfalse
categoryIdStringIdentifierfalse
withHiddenStringIdentifierfalse
updateAfterStringIdentifierfalse
withQuestionsOnlyStringIdentifierfalse
quickStringIdentifierfalse
searchStringIdentifierfalse

Response

Returns a list Template objects

Examples

curl --request POST https://api.qvalon.com/v1/survey/templates/all \
--header 'Authorization: Bearer <your_token>' \
-d '{"search":"Test"}'
200 OK
[
[
{
"id": "606ac4f65b784e60cb88cb5b",
"type": "SURVEY",
"categoryId": "606ac4e55b784e60cb88cb5a",
"categoryName": "Test category",
"deleted": false,
"hidden": false,
"tenant": "kot",
"name": "Test template",
"withGrades": false,
"questionsCount": 4,
"updateAt": "2021-04-23T08:34:21.031",
"labels": {},
"quick": false
}
]
]

Get template by id#

Get template by id

Response

Return Template object

Examples

curl https://api.qvalon.com/v1/survey/templates/606ac4f65b784e60cb88cb5b \
--header 'Authorization: Bearer <your_token>'
200 OK
[
[
{
"id": "606ac4f65b784e60cb88cb5b",
"type": "SURVEY",
"categoryId": "606ac4e55b784e60cb88cb5a",
"categoryName": "Test category",
"deleted": false,
"hidden": false,
"tenant": "kot",
"name": "Test template",
"withGrades": false,
"questionsCount": 4,
"updateAt": "2021-04-23T08:34:21.031",
"labels": {},
"quick": false
}
]
]

Move to category#

Move template to another category

Request parameters:

Request ParameterTypeDescriptionRequired
fromCategoryStringIdentifier current template of categoryfalse
toCategoryStringIdentifier of destination categoryfalse

Response

Return Template object

Examples

curl --request PUT https://api.qvalon.com/v1/survey/templates/606ac4f65b784e60cb88cb5b/move?fromCategory=606ac4e55b784e60cb88cb5a&toCategory=608292857eb7af765469e730 \
--header 'Authorization: Bearer <your_token>'
200 OK
[
{
"id": "608286647eb7af765469e72f",
"type": "SURVEY",
"categoryId": "608292857eb7af765469e730",
"categoryName": "New test category",
"deleted": false,
"hidden": false,
"tenant": "kot",
"name": "Test template",
"withGrades": false,
"questionsCount": 0,
"updateAt": "2021-04-23T09:25:35.020513",
"labels": {},
"quick": false
}
]