API – Checklist report
To receive a report from the checklist on all tasks you need to:
- send GET request to URI https://your-domain.davintoo.com/api/v2/check-list/report/{id}
- the request must contain headings Content-Type: application/json;charset=UTF-8 and Authorization: Bearer xxxxxx.
 Request exapmle:
 curl 'https://your-domain.davintoo.com/api/v2/check-list/report/233'
 -H 'Authorization: Bearer xxxxxx'
 -H 'Content-Type: application/json;charset=UTF-8'
The request supports filtration by the following fields:
position
city
department
tags
result_updated_at
result_status
If you created several tasks for the checklist, you can add a filter with the task id and display the results of a particular task, so you don't have to print all the tasks in the message.
Request example:
curl 'https://your-domain.davintoo.com/api/v2/check-list/report/233?filter[taskId]=36413'
-H 'Authorization: Bearer xxxxxx'
-H 'Content-Type: application/json;charset=UTF-8'

Answer
- 
In case of successful request (HTTP response code - 200), the result will be returned in the form of: 
 data
 pager
- 
In case of a mistake (HTTP response code - 400) returns JSON object with information about the error: 
 {"title":{"required":"Field cannot be empty"}}
Detailed report on checklists
To export a detailed report on the questionnaire in the checklist, where the name of the criterion and the reverse score on the scale will be indicated, you need to:
- send GET request to URI https://your-domain.davintoo.com/api/rest.php/check-lists-result/?action=get-sub-task-details&sub_task_id={id}
- the request must contain headings Content-Type: application/json;charset=UTF-8 and Authorization: Bearer xxxxxx.

Request exapmle:
curl 'https://your-domain.davintoo.com/api/rest.php/check-lists-result/?action=get-sub-task-details&sub_task_id=36419'
-H 'Authorization: Bearer xxxxxx'
-H 'Content-Type: application/json;charset=UTF-8'

Answer
- 
In case of successful request (HTTP response code - 200), the result will be returned in the form of: 
 subTask.element.criteriaGroup
 subTask.element.scale.answers
 answers
- 
In case of a mistake (HTTP response code - 400, 500) returns JSON object with information about the error