API version 1 Invoices

1. List Invoices (api1/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-usa-uat.iinsightonline.com/api1/invoices GET
PRODUCTION https://api-usa.iinsightonline.com/api1/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
satus The status of the invoice. (i.e.: active / voided) 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": "01-03-2024",
        "due_date": "20-03-2024",
        "notes": "",
        "total_amount_payable": "143.00",
        "client": "Prepayment Xero 1 Test",
        "claim_no": "1234",
        "provider_number": "345666",
        "assigned_to": "admin admin",
        "start_date": "01-03-2024",
        "end_date": "01-03-2024",
        "contact_id": "335",
        "item": [
            {
                "charge_code": "OR04",
                "employee_id": "2",
                "employee_info": {
                  "user_id": "2",
                  "first_name": "Luna",
                  "last_name": "Ramírez",
                  "name": "Luna Ramírez",
                  "title": "Ms"
                }
                "general_ledger_code": "003",
                "general_ledger_description": "account 3.",
                "general_ledger_id": "3",
                "professional": "",
                "quantity": "1.00",
                "rate": "130.00",
                "revenue_centre": "Another Revenue Centre",
                "service_contract": "Allianz",
                "service_date": "01-03-2024",
                "service": "Equipment",
                "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",
        "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": "27-02-2024",
        "due_date": "17-03-2024",
        "notes": "",
        "total_amount_payable": "265.00",
        "client": "qb au test",
        "claim_no": "1235",
        "provider_number": "",
        "assigned_to": "admin admin",
        "start_date": "27-02-2024",
        "end_date": "27-02-2024",
        "contact_id": "456",
        "item": [
            {
                "charge_code": "ch1",
                "employee_id": "3",
                "employee_info": {
                  "user_id": "3",
                  "first_name": "Diego",
                  "last_name": "Fernández",
                  "name": "Diego Fernández",
                  "title": "Mr"
                }
                "general_ledger_code": null,
                "general_ledger_description": null,
                "general_ledger_id": "0",
                "professional": "",
                "quantity": "1.00",
                "rate": "150.00",
                "revenue_centre": null,
                "service_contract": "dvy-sc",
                "service_date": "27-02-2024",
                "service": "act1",
                "tax_amount": "15.00",
                "total": "165.00"
            },
            {
                "charge_code": "ch2",
                "employee_id": "4",
                "employee_info": {
                  "user_id": "4",
                  "first_name": "Sofía",
                  "last_name": "Torres",
                  "name": "Sofía Torres",
                  "title": "Dr"
                }
                "general_ledger_code": null,
                "general_ledger_description": null,
                "general_ledger_id": "0",
                "professional": "",
                "quantity": "1.00",
                "rate": "100.00",
                "revenue_centre": null,
                "service_contract": "dvy-sc",
                "service_date": "27-02-2024",
                "service": "itm1",
                "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",
        "status": "ACTIVE"
    }
]

2. List Invoices billed to employer (api1/invoices/billed_to)

This method will answer with a collection of iinsight's invoices billed to an employer. 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-usa-uat.iinsightonline.com/api1/invoices/billed_to GET
PRODUCTION https://api-usa.iinsightonline.com/api1/invoices/billed_to 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
employer_id Employer ID. (i.e.: 1) 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,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
[
      {
        "invoice_id": "581",
        "case": "NSW86",
        "first_name": "Graham",
        "last_name": "Smith",
        "invoice": "NSW125"
    },
    {
        "invoice_id": "583",
        "case": "NSW86",
        "first_name": "Graham",
        "last_name": "Smith",
        "invoice": "NSW126"
    }
]

3. Transfer invoices (api1/invoices/transfer)

This method will allow to transfer invoices from one employer to another.

URL
Server URL HTTP type
UAT https://api-usa-uat.iinsightonline.com/api1/invoices/transfer PUT
PRODUCTION https://api-usa.iinsightonline.com/api1/invoices/transfer 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
employer_id Employer ID. (i.e.: 1) Yes
invoice_ids Invoice IDs seperated by comma and no blank spaces. (i.e.: 1,2,...) Yes
Response

    {
      "message": "Invoice(s) Transferred",
      "invoice_ids": "3256,3254",
      "updated_count": 2,
      "inserted_count": 0
    }