API:getInvoices - Get invoices

Get list of invoices.

Optional parameters

page
Which page to return
list
Status of invoices to list, possible values: all, paid, unpaid, cancelled

Request

GET http://url_to_your_hostbill.com/admin/api.php?api_id=API_ID&api_key=API_KEY&call=getInvoices

Response

   {
      "success": true,
      "invoices": [
         {
            "id": "62",
            "currency_id": "0",
            "date": "2011-12-09",
            "duedate": "2011-12-09",
            "subtotal2": "178.00",
            "credit": "0.00",
            "total": "178.00",
            "paid_id": "",
            "status": "Paid",
            "firstname": "Jack",
            "client_id": "8",
            "lastname": "Black",
            "module": "AlertPay",
            "recid": "0"
         },
         {
            "id": "61",
            "currency_id": "0",
            "date": "2011-12-07",
            "duedate": "2011-12-07",
            "subtotal2": "295.00",
            "credit": "0.00",
            "total": "295.00",
            "paid_id": "",
            "status": "Unpaid",
            "firstname": "Jack",
            "client_id": "8",
            "lastname": "Black",
            "module": "AlertPay",
            "recid": "0"
         },
         {
            "id": "58",
            "currency_id": "0",
            "date": "2011-11-22",
            "duedate": "2011-11-22",
            "subtotal2": "11.94",
            "credit": "0.00",
            "total": "11.94",
            "paid_id": "",
            "status": "Unpaid",
            "firstname": "Mike",
            "client_id": "6",
            "lastname": "Blue",
            "module": "AlertPay",
            "recid": "0"
         },
         {
            "id": "53",
            "currency_id": "0",
            "date": "2011-11-15",
            "duedate": "2011-11-15",
            "subtotal2": "50.00",
            "credit": "0.00",
            "total": "50.00",
            "paid_id": "",
            "status": "Unpaid",
            "firstname": "Mike",
            "client_id": "6",
            "lastname": "Blue",
            "module": "AlertPay",
            "recid": "0"
         },
         {
            "id": "46",
            "currency_id": "0",
            "date": "2011-11-02",
            "duedate": "2011-11-02",
            "subtotal2": "20.00",
            "credit": "20.00",
            "total": "0.00",
            "paid_id": "",
            "status": "Paid",
            "firstname": "Random",
            "client_id": "2",
            "lastname": "Customer",
            "module": "AlertPay",
            "recid": "0"
         },
         {
            "id": "43",
            "currency_id": "0",
            "date": "2011-10-31",
            "duedate": "2011-10-31",
            "subtotal2": "30.00",
            "credit": "0.00",
            "total": "30.00",
            "paid_id": "",
            "status": "Paid",
            "firstname": "John",
            "client_id": "1",
            "lastname": "Doe",
            "module": "AlertPay",
            "recid": "0"
         },
         {
            "id": "6",
            "currency_id": "0",
            "date": "2011-10-07",
            "duedate": "2012-01-05",
            "subtotal2": "1.00",
            "credit": "0.00",
            "total": "1.00",
            "paid_id": "",
            "status": "Unpaid",
            "firstname": "Random",
            "client_id": "2",
            "lastname": "Customer",
            "module": null,
            "recid": "0"
         },
         {
            "id": "1",
            "currency_id": "0",
            "date": "2011-09-24",
            "duedate": "2011-09-24",
            "subtotal2": "11.94",
            "credit": "0.00",
            "total": "11.94",
            "paid_id": "",
            "status": "Paid",
            "firstname": "John",
            "client_id": "1",
            "lastname": "Doe",
            "module": null,
            "recid": "0"
         }
      ],
      "call": "getInvoices",
      "server_time": 1323444951
   }