API version 1 Billings

1. List Billings (api1/billings)

This method will answer with a collection of iinsight's Billings. The collection wil be in JSON format.
The results would be paginated, having a default 100 records per page. An empty collection and a status code 200 response, means that there is no records in the specified page.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/billings GET
PRODUCTION https://api-uk.iinsightonline.com/api1/billings GET
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes

Query Params - Query Builder

Parameter Value Mandatory
fields Billings fields separated by commas with no spaces. (i.e.: field_name1,field_name2,...) (default: all) No
query JSON string specifying filter conditions. Each key should be a field name and the value should be an array of conditions. (i.e.: {"case_id":["25"],"description":["%Assessment%"]}) No
sort JSON string specifying sort conditions. Each key should be a field name and the value should be the sort direction (asc or desc). (i.e.: {"field1":"asc","field2":"desc"}) No
page The page number of the paginated results. (i.e.: 2) (default: 1) No
limit The number of records to display per page. (i.e.: 50) (default: 100) No
Response
{
    "status": true,
    "data": [
        {
            "case_id": "4",
            "id": "48",
            "time_based": "1",
            "description": "Advice on Job Modifications",
            "estimate_link": "0",
            "employee": {
                "user_id": "1",
                "first_name": "iinsight",
                "last_name": "Software Support",
                "name": "iinsight Software Support",
                "title": "Mr"
            },
            "team": {
                "id": "3670",
                "description": "Huascar Team"
            },
            "reference_date": "1289563200",
            "start_time": "12",
            "quantity": "2.00",
            "unit_cost": "0",
            "unit_charge": "140.00",
            "tax_amount": "28.00",
            "tax_rate": "0.10",
            "total_charge": "308.00",
            "charge_code": "RTWNE01",
            "invoice": "315",
            "notes": "",
            "time_inserted": "1290647768",
            "reference_time": "1289526000",
            "payment_status": "N",
            "details": "",
            "appointment_id": {
                "appointment_id": "5125",
                "appointment_name": "Test All fields",
                "appointment_desc": "",
                "appointment_start": "1689908400",
                "appointment_finish": "1689910200"
            },
            "category_id": {
                "category_id": "12",
                "description": "QBE"
            },
            "activity_id": {
                "id": "47",
                "description": "Advice on Job Modifications (Lantern Pay)",
                "time_based": "1",
                "quantity": "0.00",
                "unit_charge": "150.00",
                "taxable": "1",
                "charge_code": "23"
            },
            "consultant_rate": "0.00",
            "consultant_expense_net": "0.00",
            "consultant_expense_tax": "0.00",
            "consultant_expense_total": "0.00",
            "consultant_time_expense": "2.00",
            "consultant_super_rate": "0.000000000000",
            "consultant_super_expense_net": "0.000000",
            "timer_paused": null,
            "live_timer_value": null,
            "signature": null,
            "claim_type": "0"
        }
    ],
    "displayed_records": 1,
    "total_records": 217
}
	

2. Create Billing (api1/billings)

This method will create a Billing and get an answer with the data of the Billing created in iinsight. The collection wil be in JSON format.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/billings POST
PRODUCTION https://api-uk.iinsightonline.com/api1/billings 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.: 25) Yes
time_based Time Based. (i.e.: Yes) (Values: Yes or No) Yes
quantity Quantity. (i.e.: 1.5) Yes
unit_charge Unit Charge. (i.e.: 195.75) Yes
tax_rate Tax Rate. (i.e.: 0.1) Yes
charge_code Charge Code. (i.e.: OC07) Yes
consultant_rate Consultant Rate. (i.e.: 100) No
consultant_time_expense Consultant Time Expense. (i.e.: 2) No
consultant_expense_tax Consultant Expense Tax. (i.e.: 20) No
consultant_super_rate Consultant Super Rate. (i.e.: 0.2) No
tax_id Tax id. (i.e.: 25) Yes
consultant_tax_id Consultant Tax id. (i.e.: 25) Yes
consultant_tax_rate Consultant Tax Rate. (i.e.: 0.1) Yes
Response
{
    "status": true,
    "message": "Cost successfully created",
    "data": {
        "case_id": "25",
        "id": "8770",
        "time_based": "1",
        "description": "",
        "estimate_link": "0",
        "employee": "0",
        "team": "0",
        "reference_date": "0",
        "start_time": "0",
        "quantity": "1.00",
        "unit_cost": "0",
        "unit_charge": "200.00",
        "tax_amount": "20.00",
        "tax_rate": "0.10",
        "total_charge": "220.00",
        "charge_code": "OS02",
        "invoice": "0",
        "notes": null,
        "time_inserted": "0",
        "reference_time": "0",
        "payment_status": "N",
        "details": "",
        "appointment_id": null,
        "category_id": "0",
        "activity_id": "0",
        "consultant_rate": "100.00",
        "consultant_expense_net": "200.00",
        "consultant_expense_tax": "20.00",
        "consultant_expense_total": "220.00",
        "consultant_time_expense": "2.00",
        "consultant_super_rate": "0.200000000000",
        "consultant_super_expense_net": "40.000000",
        "timer_paused": null,
        "live_timer_value": null,
        "signature": null,
        "claim_type": "0"
    }
}
	

3. Update Billing (api1/billings)

This method will update a Billing and get an answer with the data of the Billing updated in iinsight. The collection wil be in JSON format.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/billings PUT
PRODUCTION https://api-uk.iinsightonline.com/api1/billings PUT
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 Id. (i.e.: 3015) Yes
case_id Case Id. (i.e.: 25) No
time_based Time Based. (i.e.: No) (Values: Yes or No) No
quantity Quantity. (i.e.: 1.5) No
unit_charge Unit Charge. (i.e.: 195.75) No
tax_rate Tax Rate. (i.e.: 0.1) No
charge_code Charge Code. (i.e.: OC07) No
consultant_rate Consultant Rate. (i.e.: 100) No
consultant_time_expense Consultant Time Expense. (i.e.: 2) No
consultant_expense_tax Consultant Expense Tax. (i.e.: 20) No
consultant_super_rate Consultant Super Rate. (i.e.: 0.2) No
tax_id Tax id. (i.e.: 25) Yes
consultant_tax_id Consultant Tax id. (i.e.: 25) Yes
consultant_tax_rate Consultant Tax Rate. (i.e.: 0.1) Yes
Response
{
    "status": true,
    "message": "Cost successfully updated",
    "data": {
        "case_id": "25",
        "id": "8770",
        "time_based": "1",
        "description": "",
        "estimate_link": "0",
        "employee": "0",
        "team": "0",
        "reference_date": "0",
        "start_time": "0",
        "quantity": "1.00",
        "unit_cost": "0",
        "unit_charge": "200.00",
        "tax_amount": 20,
        "tax_rate": "0.10",
        "total_charge": 220.00000000000003,
        "charge_code": "OS02",
        "invoice": "0",
        "notes": null,
        "time_inserted": "0",
        "reference_time": "0",
        "payment_status": "N",
        "details": "",
        "appointment_id": null,
        "category_id": "0",
        "activity_id": "0",
        "consultant_rate": "100.00",
        "consultant_expense_net": 100,
        "consultant_expense_tax": "10",
        "consultant_expense_total": 110,
        "consultant_time_expense": "1",
        "consultant_super_rate": "0.200000000000",
        "consultant_super_expense_net": 20,
        "timer_paused": null,
        "live_timer_value": null,
        "signature": null,
        "claim_type": "0"
    }
}
	

4. Delete Billing (api1/billings)

This method will delete a Billing and get an answer confirming the deletion of the record in iinsight. The collection wil be in JSON format.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/billings DELETE
PRODUCTION https://api-uk.iinsightonline.com/api1/billings DELETE
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 Id. (i.e.: 3015) Yes
Response
{
    "status": true,
    "message": "Cost successfully deleted"
}
	

5. Create Group Billings (api1/group_billings)

This method will create a Group of Billings and get an answer with the data of the Billings created in iinsight. The collection wil be in JSON format.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/billings POST
PRODUCTION https://api-uk.iinsightonline.com/api1/billings 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_ids Case Ids. (i.e.: 25,26,32) Yes
time_based Time Based. (i.e.: Yes) (Values: Yes or No) Yes
quantity Quantity. (i.e.: 1.5) Yes
unit_charge Unit Charge. (i.e.: 195.75) Yes
tax_rate Tax Rate. (i.e.: 0.1) Yes
charge_code Charge Code. (i.e.: OC07) Yes
consultant_rate Consultant Rate. (i.e.: 100) No
consultant_time_expense Consultant Time Expense. (i.e.: 2) No
consultant_expense_tax Consultant Expense Tax. (i.e.: 20) No
consultant_super_rate Consultant Super Rate. (i.e.: 0.2) No
Response
{
    "status": true,
    "message": "Group costs successfully created",
    "data": [
        {
            "case_id": "25",
            "id": "8773",
            "time_based": "1",
            "description": "",
            "estimate_link": "0",
            "employee": "0",
            "team": "0",
            "reference_date": "0",
            "start_time": "0",
            "quantity": "1.00",
            "unit_cost": "0",
            "unit_charge": "200.00",
            "tax_amount": "20.00",
            "tax_rate": "0.10",
            "total_charge": "220.00",
            "charge_code": "OS02",
            "invoice": "0",
            "notes": null,
            "time_inserted": "0",
            "reference_time": "0",
            "payment_status": "N",
            "details": "",
            "appointment_id": null,
            "category_id": "0",
            "activity_id": "0",
            "consultant_rate": "100.00",
            "consultant_expense_net": "200.00",
            "consultant_expense_tax": "20.00",
            "consultant_expense_total": "220.00",
            "consultant_time_expense": "2.00",
            "consultant_super_rate": "0.200000000000",
            "consultant_super_expense_net": "40.000000",
            "timer_paused": null,
            "live_timer_value": null,
            "signature": null,
            "claim_type": "0"
        },
        {
            "case_id": "26",
            "id": "8774",
            "time_based": "1",
            "description": "",
            "estimate_link": "0",
            "employee": "0",
            "team": "0",
            "reference_date": "0",
            "start_time": "0",
            "quantity": "1.00",
            "unit_cost": "0",
            "unit_charge": "200.00",
            "tax_amount": "20.00",
            "tax_rate": "0.10",
            "total_charge": "220.00",
            "charge_code": "OS02",
            "invoice": "0",
            "notes": null,
            "time_inserted": "0",
            "reference_time": "0",
            "payment_status": "N",
            "details": "",
            "appointment_id": null,
            "category_id": "0",
            "activity_id": "0",
            "consultant_rate": "100.00",
            "consultant_expense_net": "200.00",
            "consultant_expense_tax": "20.00",
            "consultant_expense_total": "220.00",
            "consultant_time_expense": "2.00",
            "consultant_super_rate": "0.200000000000",
            "consultant_super_expense_net": "40.000000",
            "timer_paused": null,
            "live_timer_value": null,
            "signature": null,
            "claim_type": "0"
        },
        {
            "case_id": "32",
            "id": "8775",
            "time_based": "1",
            "description": "",
            "estimate_link": "0",
            "employee": "0",
            "team": "0",
            "reference_date": "0",
            "start_time": "0",
            "quantity": "1.00",
            "unit_cost": "0",
            "unit_charge": "200.00",
            "tax_amount": "20.00",
            "tax_rate": "0.10",
            "total_charge": "220.00",
            "charge_code": "OS02",
            "invoice": "0",
            "notes": null,
            "time_inserted": "0",
            "reference_time": "0",
            "payment_status": "N",
            "details": "",
            "appointment_id": null,
            "category_id": "0",
            "activity_id": "0",
            "consultant_rate": "100.00",
            "consultant_expense_net": "200.00",
            "consultant_expense_tax": "20.00",
            "consultant_expense_total": "220.00",
            "consultant_time_expense": "2.00",
            "consultant_super_rate": "0.200000000000",
            "consultant_super_expense_net": "40.000000",
            "timer_paused": null,
            "live_timer_value": null,
            "signature": null,
            "claim_type": "0"
        }
    ]
}
	

6. List Timesheet (api1/billings)

This method will answer with a collection of iinsight's Billings and Internal Expenses. The collection wil be in JSON format.
The results would be paginated, having a default 100 records per page. An empty collection and a status code 200 response, means that there is no records in the specified page.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/timesheets GET
PRODUCTION https://api-uk.iinsightonline.com/api1/timesheets GET
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes

Query Params - Query Builder

Parameter Value Mandatory
fields Billings fields separated by commas with no spaces. (i.e.: field_name1,field_name2,...) (default: all) No
query JSON string specifying filter conditions. Each key should be a field name and the value should be an array of conditions. (i.e.: {"case_id":["25"],"description":["%Assessment%"]}) No
sort JSON string specifying sort conditions. Each key should be a field name and the value should be the sort direction (asc or desc). (i.e.: {"field1":"asc","field2":"desc"}) No
page The page number of the paginated results. (i.e.: 2) (default: 1) No
limit The number of records to display per page. (i.e.: 50) (default: 100) No
Response
{
    "status": true,
    "data": [
        {
            "case_id": "4",
            "id": "48",
            "time_based": "1",
            "description": "Advice on Job Modifications",
            "estimate_link": "0",
            "employee": {
                "user_id": "1",
                "first_name": "iinsight",
                "last_name": "Software Support",
                "name": "iinsight Software Support",
                "title": "Mr"
            },
            "team": {
                "id": "3670",
                "description": "Huascar Team"
            },
            "reference_date": "1289563200",
            "start_time": "12",
            "quantity": "2.00",
            "unit_cost": "0",
            "unit_charge": "140.00",
            "tax_amount": "28.00",
            "tax_rate": "0.10",
            "total_charge": "308.00",
            "charge_code": "RTWNE01",
            "invoice": "315",
            "notes": "",
            "time_inserted": "1290647768",
            "reference_time": "1289526000",
            "payment_status": "N",
            "details": "",
            "appointment_id": {
                "appointment_id": "5125",
                "appointment_name": "Test All fields",
                "appointment_desc": "",
                "appointment_start": "1689908400",
                "appointment_finish": "1689910200"
            },
            "category_id": {
                "category_id": "12",
                "description": "QBE"
            },
            "activity_id": {
                "id": "47",
                "description": "Advice on Job Modifications (Lantern Pay)",
                "time_based": "1",
                "quantity": "0.00",
                "unit_charge": "150.00",
                "taxable": "1",
                "charge_code": "23"
            },
            "consultant_rate": "0.00",
            "consultant_expense_net": "0.00",
            "consultant_expense_tax": "0.00",
            "consultant_expense_total": "0.00",
            "consultant_time_expense": "2.00",
            "consultant_super_rate": "0.000000000000",
            "consultant_super_expense_net": "0.000000",
            "timer_paused": null,
            "live_timer_value": null,
            "signature": null,
            "claim_type": "0"
        }
    ],
    "displayed_records": 1,
    "total_records": 217
}