1. List Tasks and Appointments (api2/tasks/appointments)
This method returns a collection of tasks and appointments in JSON format.
If no case ID is provided, the collection is filtered by the current user ID.
URL
| Environment |
URL |
HTTP Method |
| UAT |
https://api-uk-uat.iinsightonline.com/api2/tasks/appointments |
GET |
| PRODUCTION |
https://api-uk.iinsightonline.com/api2/tasks/appointments |
GET |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token is generated using the /auth/login method. |
Yes |
Query Params
| Parameter |
Value |
Mandatory |
| type |
Task and Appointment type. Options: completed and incompleted |
Yes |
| fields |
Contacs fields seperated by comma and no blank spaces. (i.e.: field_name1,field_name2,...) |
Yes |
| case_id |
Case ID (i.e.: 1) |
No (If no case ID is given, it will filter by the current user ID) |
| sort_col |
Sort by column field name. (i.e.: field_name) |
No |
| sort_type |
Sort column type. Options: asc, desc |
No |
| search_criteria |
Search criteria in json format (i.e.: {"field_name1":"value1","field_name2":"value2"}) |
No |
| page |
The page number of the paginated results. (i.e.: 1) |
No |
| limit |
The limit amount of items. (i.e.: 1) |
No |
Response
{
"status": true,
"data": [
{
"id": "1012",
"type": "appointment",
"status": "Confirmed",
"is_recurrent": "1",
"title": "Dentist Checkup",
"assigned_to": "Dr. Emily Carter",
"date": "12-10-2035",
"case": null,
"priority": "Medium",
"case_id": null,
"has_alert": "Yes"
},
{
"id": "1025",
"type": "appointment",
"status": "Rescheduled",
"is_recurrent": "0",
"title": "Eye Examination",
"assigned_to": "Dr. Emily Carter, Dr. John Smith",
"date": "15-11-2035",
"case": "Patient John Doe (Case123)",
"priority": "High",
"case_id": "5678",
"has_alert": "No"
}
],
"displayed_records": 2,
"total_records": 45
}
2. Get Incomplete Tasks and Appointments Count (count/tasks-appointments)
This method retrieves the count of incomplete tasks and appointments assigned to the authenticated user.
URL
| Server |
URL |
HTTP Type |
| UAT |
https://api-uk-uat.iinsightonline.com/count/tasks-appointments |
GET |
| PRODUCTION |
https://api-uk.iinsightonline.com/count/tasks-appointments |
GET |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token is generated using the /auth/login method |
Yes |
Query Params
| Parameter |
Description |
Mandatory |
| case_id |
Case number identifier (optional) |
No |
| type |
Task filter type: "completed" or "incompleted" |
Yes |
| page |
Pagination page number (greater than 0) |
No |
| limit |
Results limit (between 1 and 100) |
No |
| fields |
Fields to return (must exist in the "task_appts" table) |
Yes |
| search_criteria |
Search filters (must exist in the "task_appts" table) |
No |
| sort_col |
Sorting column (must be sortable in "task_appts") |
No |
| sort_type |
Sorting type: "asc" or "desc" |
No |
Response
{
"status": true,
"message": "Count retrieved successfully",
"data": {
"incomplete_tasks_count": 5,
"incomplete_appointments_count": 3,
"total_incomplete_count": 8
}
}