Skip to main content

Reports

Survey task report#

Returns information about all the surveys that match specified filters. Exactly one of templateId or taskId must be provided (not both, not neither) โ€” otherwise the request fails with 400 Bad Request.

Request body:

AttributeTypeDescriptionNullable
makeXlsBooleanIf true, the request returns an Excel file instead of a JSONtrue
templateIdStringSurvey template IDtrue
taskIdIntegerID of the Task object the surveys are linked totrue
shopSapsSet of stringsSAP codes of the stores to filter bytrue
regionIdsList of integersIDs of Region objectstrue
divisionIdsList of integersIDs of Division objectstrue
dateFromLocalDate (yyyy-MM-dd)Creation date fromtrue
dateToLocalDate (yyyy-MM-dd)Creation date totrue
statusSet of string enum (OPEN, IN_PROGRESS, CLOSED)Statuses of the Response the survey is linked totrue
overdueBooleanReturns true if the deadline of the task is missedtrue
approvalStatusSet of string enum (APPROVED, NOT_APPROVED, APPROVABLE, NOT_APPROVABLE)Approval statuses of the responsetrue

Response

Returns a Survey task report object

Examples

curl --request POST https://api.qvalon.com/v1/survey/report \
--header 'Authorization: Bearer <your_token>' \
-d '{"makeXls":false,"taskId":900,"regionIds":[92],"divisionIds":[],"dateFrom":"2023-01-01","dateTo":"2023-12-31","status":"CLOSED"}'
200 OK
[
{
"instanceId": "9e1261a1-9437-4dc6-bdf3-daec41b21674",
"executorName": "Catherine White (Store Manager)",
"authorName": "API",
"templateName": "Cash Register Survey",
"taskName": "Monthly cash register survey",
"divisionName": "United States",
"regionName": "California",
"shopName": "9524 Springfield",
"shopSap": "9524",
"shopLocality": "9524 Springfield",
"comment": "",
"status": "CLOSED",
"startDate": 1686296680056,
"closeDate": 1686296820616,
"deadLineDate": 1688155200000,
"percentGrade": 0,
"maxGrade": 0,
"sumGrade": 0,
"withGrades": false,
"questionWithAnswerDTOS": [
{
"questionId": "ebdcb5d6-b5df-4c9d-971f-f75fa7d459a8",
"questionName": "Attach several photos of the cash register",
"answers": [
"/files/s1/qvalon/2023/6/9/test_image.jpg",
"/files/s1/qvalon/2023/6/9/test_image2.jpg"
],
"comment": ""
}
]
}
]