1. List staff (api1/staff)
This method will answer with a collection of case staff. The collection wil be in JSON format.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-aus-uat.iinsightonline.com/api1/staff |
GET |
| PRODUCTION |
https://api-aus.iinsightonline.com/api1/staff |
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 |
Yes |
| fields |
Contacs fields seperated by comma and no blank spaces. (i.e.: field_name1,field_name2,...) |
Yes |
| status |
Filter by contact status. Options: all, closed, opened, assigned, assigned_open, team |
No |
| 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,value3"}) |
No |
| page |
The page number of the paginated results. (i.e.: 1) |
No |
| limit |
The limit amount of items. (i.e.: 1) |
No |
Response
[
{
"first_name": "xxx",
"last_name": "xxx",
"email": "xxx@xxx.xxx",
"case_manager": "Yes/No",
"view_case": "Yes/No",
"modify_case": "Yes/No",
"user_id": "210" //internal iinsight ID
},
{
"first_name": "xxx",
"last_name": "xxx",
"email": "xxx@xxx.xxx",
"case_manager": "Yes/No",
"view_case": "Yes/No",
"modify_case": "Yes/No",
"user_id": "131"//internal iinsight ID
}
]
2. New staff (api1/staff/new)
This method will allow to add or update a case staff.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-aus-uat.iinsightonline.com/api1/staff/new |
POST |
| PRODUCTION |
https://api-aus.iinsightonline.com/api1/staff/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 |
| user_id |
User ID. (i.e.: 1) |
Yes |
| role |
Staff role. Options: modify_case, view_case |
Yes |
Response
{
"respond": "Added user to case staff",
"user_id": "171",
"case_id": "2",
}
3. Update staff (api1/staff/update)
This method will allow to update staff role.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-aus-uat.iinsightonline.com/api1/staff/update |
PUT |
| PRODUCTION |
https://api-aus.iinsightonline.com/api1/staff/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 |
| case_id |
Case ID. (i.e.: 1) |
Yes |
| user_id |
User ID. (i.e.: 1) |
Yes |
| role |
Staff role. Options: modify_case, view_case |
Yes |
Response
{
"respond": "Staff updated",
"user_id": "171",
"case_id": "2"
}
4. Delete staff (api1/staff/delete)
This method will allow to add or update a case staff.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-aus-uat.iinsightonline.com/api1/staff/delete |
DELETE |
| PRODUCTION |
https://api-aus.iinsightonline.com/api1/staff/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 |
| case_id |
Case ID. (i.e.: 1) |
Yes |
| user_id |
User ID. (i.e.: 1) |
Yes |
| role |
Staff role. Options: modify_case, view_case |
Yes |
Response
{
"respond": "Staff deleted",
"user_id": "171"
}