Skip to main content

Category

Create category#

Creates a new category. Requires the ROLE_SURVEY_ADMIN role.

Request body:

AttributeTypeDescriptionNullable
nameStringCategory namefalse
activeBooleanWhether the category is activefalse
unavailableIfBusinessDirIdsList of integersIdentifiers of business directions for which this category is unavailabletrue
unavailableIfGroupIdsList of integersIdentifiers of user groups for which this category is unavailabletrue
unavailableIfUserIdsList of integersIdentifiers of users for which this category is unavailabletrue

Response

Returns the created Category object

Examples

curl --request POST https://api.qvalon.com/v1/survey/categories \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"active":true,"name":"Merchandising","unavailableIfBusinessDirIds":[],"unavailableIfGroupIds":[],"unavailableIfUserIds":[]}'
200 OK
{
"id": "6082a9737eb7af765469e731",
"name": "Merchandising",
"tenant": "",
"active": true,
"templateIds": [],
"templates": [],
"unavailableIfBusinessDirIds": [],
"unavailableIfGroupIds": [],
"unavailableIfUserIds": []
}

Update category#

Updates an existing category by id. Requires the ROLE_SURVEY_ADMIN role.

Request body:

AttributeTypeDescriptionNullable
nameStringCategory namefalse
activeBooleanWhether the category is activefalse
unavailableIfBusinessDirIdsList of integersIdentifiers of business directions for which this category is unavailabletrue
unavailableIfGroupIdsList of integersIdentifiers of user groups for which this category is unavailabletrue
unavailableIfUserIdsList of integersIdentifiers of users for which this category is unavailabletrue

Response

Returns the updated Category object

Examples

curl --request PUT https://api.qvalon.com/v1/survey/categories/6082a9737eb7af765469e731 \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"active":true,"name":"Merchandising updated","unavailableIfBusinessDirIds":[],"unavailableIfGroupIds":[],"unavailableIfUserIds":[]}'
200 OK
{
"id": "6082a9737eb7af765469e731",
"name": "Merchandising updated",
"tenant": "",
"active": true,
"templateIds": [],
"templates": [],
"unavailableIfBusinessDirIds": [],
"unavailableIfGroupIds": [],
"unavailableIfUserIds": []
}

Delete category#

Deletes a category by id. Requires the ROLE_SURVEY_ADMIN role.

Examples

curl --request DELETE https://api.qvalon.com/v1/survey/categories/6082a9737eb7af765469e731 \
--header 'Authorization: Bearer <your_token>'
200 OK
{}

List categories#

Returns a list of Category objects matching the given filter

Request parameters:

Request ParameterTypeDescriptionRequired
activeBooleanFilter categories by active statefalse
quickBooleanFilter categories that have at least one "quick" templatefalse
notEmptyBooleanWhen true, only return categories that have at least one template. Default falsefalse

Response

Returns a list of Category objects

Examples

curl https://api.qvalon.com/v1/survey/categories?active=true \
--header 'Authorization: Bearer <your_token>'
200 OK
[
{
"id": "abe87dc1-3c21-47a0-b8f2-da45ada2b92f",
"name": "Goods",
"tenant": "",
"active": true,
"templateIds": [
"4a192bb8-7f6f-4fd5-ab0d-231637ad64e2"
],
"templates": [
{
"id": "4a192bb8-7f6f-4fd5-ab0d-231637ad64e2",
"type": "SURVEY",
"categoryId": "abe87dc1-3c21-47a0-b8f2-da45ada2b92f",
"categoryName": "Goods",
"deleted": false,
"hidden": false,
"name": "Display of Goods",
"authorId": 1,
"withGrades": false,
"showGrades": false,
"loadFromGalleryProhibited": false,
"questionsCount": 1,
"gradeConditions": [],
"updateAt": "2025-04-03T07:39:38.411539",
"modifiedAt": "2025-04-03T07:39:38.396186Z",
"labels": {},
"quick": true,
"signatureRequired": false,
"withCatalog": false
}
],
"unavailableIfBusinessDirIds": [],
"unavailableIfGroupIds": [],
"unavailableIfUserIds": []
}
]