API version 2 Invoices
1. List Invoices (api2/invoices)
This method will answer with a collection of iinsight's invoices that has been modified/created since a provided date. The collection wil be in JSON format.
The results would be paginated, having a maximum of 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/api2/invoices | GET |
| PRODUCTION | https://api-uk.iinsightonline.com/api2/invoices | 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 |
|---|---|---|
| modified_since |
Date since last update or insert. Format: YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601) Example: 2024-02-29T12:28:01Z |
Yes |
| page | The page number of the paginated results. (i.e.: 1) | Yes |
| status | The status of the invoice. (i.e.: active / voided / reversed) | Yes |
Response
[
{
"invoice_id": "1686",
"company_id": "123",
"to": "abc pty ltd",
"to_attention": "Mr abc def",
"to_address": "",
"to_email": "zalles@gmail.com",
"abn": "",
"invoice_number": "NSW2014477",
"case_number": "NSW170",
"terms": "19",
"date_of_invoice": "2024-03-01T12:00:00Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"due_date": "2024-03-20T12:00:00Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"notes": "",
"total_amount_payable": "143.00",
"client": "Prepayment Xero 1 Test",
"claim_no": "1234",
"provider_number": "345666",
"assigned_to": "admin admin",
"start_date": "2024-03-01T12:00:00Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"end_date": "2024-03-01T12:00:00Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"contact_id": "335",
"item": [
{
"cost_id": "221066", // The line item ID
"service": "Equipment",
"description": "Equipment - Test description", // a description from billing
"service_contract": "Allianz",
"revenue_centre": "Another Revenue Centre",
"service_date": "2024-03-01T12:00:00Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"professional": "",
"charge_code": "OR04",
"general_ledger_id": "3",
"general_ledger_code": "003",
"general_ledger_description": "account 3.",
"quantity": "1.00",
"rate": "130.00",
"tax_amount": "13.00",
"total": "143.00"
}
],
"sub_total": "130.00",
"total_tax": "13.00",
"total": "143.00",
"office_department_id": null,
"office_department_name": null,
"last_update": "01-03-2024 04:58:54",
"last_update_utc": "2024-02-29T17:58:54Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"reference_date": "2024-06-12T16:52:53Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601) (e.g. voided_on)
"status": "ACTIVE"
},
{
"invoice_id": "1669",
"company_id": "611",
"to": "Fox Sports",
"to_attention": "Mr Paul McGurgor",
"to_address": "4 Broadcast Way",
"to_email": "zalles@gmail.com",
"abn": "",
"invoice_number": "TED3",
"case_number": "TED1",
"terms": "19",
"date_of_invoice": "2024-02-27T12:00:00Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"due_date": "2024-03-17T12:00:00Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"notes": "",
"total_amount_payable": "265.00",
"client": "qb au test",
"claim_no": "1235",
"provider_number": "",
"assigned_to": "admin admin",
"start_date": "2024-02-27T12:00:00Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"end_date": "2024-02-27T12:00:00Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"contact_id": "456",
"item": [
{
"cost_id": "221067", // The line item ID
"service": "act1",
"description": "act1", // a description from billing
"service_contract": "dvy-sc",
"revenue_centre": null,
"service_date": "2024-02-27T12:00:00Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"professional": "",
"charge_code": "ch1",
"general_ledger_id": "0",
"general_ledger_code": null,
"general_ledger_description": null,
"quantity": "1.00",
"rate": "150.00",
"tax_amount": "15.00",
"total": "165.00"
},
{
"cost_id": "221068", // The line item ID
"service": "itm1",
"description": "itm1", // a description from billing
"service_contract": "dvy-sc",
"revenue_centre": null,
"service_date": "2024-02-27T12:00:00Z", // YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
"professional": "",
"charge_code": "ch2",
"general_ledger_id": "0",
"general_ledger_code": null,
"general_ledger_description": null,
"quantity": "1.00",
"rate": "100.00",
"tax_amount": "0.00",
"total": "100.00"
}
],
"sub_total": "250.00",
"total_tax": "15.00",
"total": "265.00",
"office_department_id": null,
"office_department_name": null,
"last_update": "27-02-2024 04:12:07",
"last_update_utc": "2024-02-26T17:12:07Z",
"reference_date": "2024-06-12T16:52:53Z",
"status": "ACTIVE"
}
]