1. List task and appointments (api1/tasks/tasks_appointments)
This method will answer with a collection of task and appointments. The collection wil be in JSON format.
If no case ID is given, it will filter by the current user ID
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-uk-uat.iinsightonline.com/api1/tasks/tasks_appointments |
GET |
| PRODUCTION |
https://api-uk.iinsightonline.com/api1/tasks/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 |
| case_id |
Case ID (i.e.: 1) |
No (If no case ID is given, it will filter by the current user ID) |
| 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 |
| 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
[
{
"id": "4797",
"type": "appointment",
"description": "",
"title": "iin: test",
"status": "Completed",
"is_recurrent": "Yes/No",
"date": "19-05-2023",
"time_from": "10:00 AM",
"time_to": "10:30 AM",
"assigned_to": "John Doe",
"created_by": null,
"priority": "",
"location": "Sydney",
"resource": null,
"billed": "No",
"invoiced": "No",
"invoice_no": null,
"amount": null,
"paid": null,
"case": "Eric Jones (VIC3)",
"case_id": "6",
"has_alert": "Yes/No"
},
{
"id": "82",
"type": "task",
"description": "This is a description",
"title": "Test title",
"status": "Completed",
"is_recurrent": "Yes/No",
"date": "21-10-2020",
"time_from": "",
"time_to": "",
"assigned_to": "John Doe",
"created_by": "John Doe",
"priority": "low",
"location": "",
"resource": "",
"billed": "",
"invoiced": "",
"invoice_no": "",
"amount": "",
"paid": "",
"case": "Eric Jones (VIC3)",
"case_id": 3,
"has_alert": "No"
}
]
2. Get Task description (api1/tasks/description)
This method will answer with a collection of task description.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-uk-uat.iinsightonline.com/api1/tasks/description |
GET |
| PRODUCTION |
https://api-uk.iinsightonline.com/api1/tasks/description |
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 |
| id |
Task ID |
Yes |
Response
{
"task_id": "81",
"title": "task1",
"description": "Description with HTML",
"priority": "low",
"due_date": "01-10-2020",
"assigned_to_id": "166",
"assigned_to": "John Doe",
"created_by_id": null,
"created_by": null,
"status": "Working On",
"status_id": "2",
"case_id": "2",
"case": "tests (VIC214)"
}
3. New case Task (api1/tasks/new)
This method will allow to create a new case task.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-uk-uat.iinsightonline.com/api1/tasks/new |
POST |
| PRODUCTION |
https://api-uk.iinsightonline.com/api1/tasks/new |
POST |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token is generated using the /auth/login method |
Yes |
Query Params
| Parameter |
Value |
Mandatory |
| case_id |
Case ID (i.e.: 1) |
Yes |
| title |
Task title (i.e.: Minor task) |
Yes |
| assigned_to_id |
User assigned to task ID (i.e.: 1) |
Yes |
| created_by_id |
Task created by user ID (i.e.: 1) |
Yes |
| due_date |
Task due date (i.e.: dd-mm-yyyy) |
Yes |
| status_id |
Task status ID (i.e.: 1) |
Yes |
| priority |
Task priority (Options: low, medium, high) |
Yes |
| description |
Task description (i.e.: This is a description) |
No |
Response
{
"response": "Task created successfuly",
"task_id": 256
}
4. Update case Task (api1/tasks/update)
This method will allow to update a case task.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-uk-uat.iinsightonline.com/api1/tasks/update |
PUT |
| PRODUCTION |
https://api-uk.iinsightonline.com/api1/tasks/update |
PUT |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token is generated using the /auth/login method |
Yes |
Query Params (As it's PUT method this need to go on the x-www-form-urlencoded)
| Parameter |
Value |
Mandatory |
| task_id |
Task ID (i.e.: 1) |
Yes |
| title |
Task title (i.e.: Minor task) |
No |
| assigned_to_id |
User assigned to task ID (i.e.: 1) |
No |
| created_by_id |
Task created by user ID (i.e.: 1) |
No |
| due_date |
Task due date (i.e.: dd-mm-yyyy) |
No |
| status_id |
Task status ID (i.e.: 1) |
No |
| priority |
Task priority (Options: low, medium, high) |
No |
| description |
Task description (i.e.: This is a description) |
No |
Response
{
"response": "Task updated successfuly",
"task_id": 256
}
5. Delete case Task (api1/tasks/delete)
This method will allow to delete a case task.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-uk-uat.iinsightonline.com/api1/tasks/delete |
DELETE |
| PRODUCTION |
https://api-uk.iinsightonline.com/api1/tasks/delete |
DELETE |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token is generated using the /auth/login method |
Yes |
Query Params (As it's DELETE method this need to go on the x-www-form-urlencoded)
| Parameter |
Value |
Mandatory |
| task_id |
Task ID (i.e.: 1) |
Yes |
Response
{
"response": "Task deleted successfuly",
}