1. List case costs linked to an appointment (api1/costs/appointment)
This method will answer with a collection of case's costs linked to an appointment. The collection will be in JSON format.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-uk-uat.iinsightonline.com/api1/costs/appointment |
GET |
| PRODUCTION |
https://api-uk.iinsightonline.com/api1/costs/appointment |
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 |
Appointment ID |
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 |
| page |
The page number of the paginated results. (i.e.: 1) |
No |
| limit |
The limit amount of items. (i.e.: 1) |
No |
Response
[
{
"id": "7579", // default field
"duration": "30.00",
"quantity": "",
"unit": "30.00",
"date": "24-01-2024",
"employee": "John Doe",
"code": "Test Code 1",
"type": "Activity",
"description": "3. This is test activity",
"charge": "1650.00",
"charge_code_type": "Standard",
"actual_duration": null,
"service_contract": "AU Test: BD",
"options": "This is standard cost", // default field
"inv": "This cost is not invoiced", // default field
"plan": "This cost is not based on an estimate" // default field
},
{
"id": "7578",
"duration": "",
"quantity": "11.00",
"unit": "11.00",
"date": "24-01-2024",
"employee": "John Doe",
"code": "Test Code 1",
"type": "Item",
"description": "2. This is test item",
"charge": "54.45",
"charge_code_type": "Standard",
"actual_duration": null,
"service_contract": "AU Test: BD",
"options": "This is standard cost",
"inv": "This cost is not invoiced",
"plan": "This cost is not based on an estimate"
}
]
2. List case costs not linked to an appointment (api1/costs/not_linked)
This method will answer with a collection of case costs not linked to an appointment. The collection will be in JSON format.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-uk-uat.iinsightonline.com/api1/costs/not_linked |
GET |
| PRODUCTION |
https://api-uk.iinsightonline.com/api1/costs/not_linked |
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 |
Case ID |
Yes |
| name |
Name of the cost (code or description) |
No |
Response
[
{
"id": "7580",
"name": "09-01-2023 - Charge Code 4 - 1. Test"
},
{
"id": "7581",
"name": "10-01-2023 - Charge Code 5 - 1. Test"
}
]
3. Link cost to appointment (api1/costs/link_to_appointment)
This method will allow to link a cost to an appointment.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-uk-uat.iinsightonline.com/api1/costs/link_to_appointment |
PUT |
| PRODUCTION |
https://api-uk.iinsightonline.com/api1/costs/link_to_appointment |
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 |
| appointment_id |
Appointment ID. (i.e.: 1) |
Yes |
| cost_id |
Cost ID. (i.e.: 1) |
Yes |
Response
{
"success": true,
"message": "Cost successfuly linked to appointment"
}
4. Unlink cost from appointment (api1/costs/unlink_from_appointment)
This method will allow to unlink a cost from an appointment.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-uk-uat.iinsightonline.com/api1/costs/link_to_appointment |
PUT |
| PRODUCTION |
https://api-uk.iinsightonline.com/api1/costs/link_to_appointment |
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 |
| cost_id |
Cost ID. (i.e.: 1) |
Yes |
Response
{
"success": true,
"message": "Cost successfuly unlinked from appointment"
}
5. Draft or submit cost (api1/costs/submit_or_draft)
This method will allow to draft or submit a cost from an appointment.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-uk-uat.iinsightonline.com/api1/costs/submit_or_draft |
PUT |
| PRODUCTION |
https://api-uk.iinsightonline.com/api1/costs/submit_or_draft |
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 |
| cost_id |
Cost ID. (i.e.: 1) |
Yes |
Response
{
"success": true,
"message": "Cost successfuly drafted/submitted"
}