api.v2.accounting module

api.v2.accounting.get_invoices(policy_id=None, bill_from_date=None, bill_to_date=None, due_from_date=None, due_to_date=None, sorting_order='asc', page_number=1, page_size=50)[source]

Retrieves paginated invoices list related to policy

Parameters:
  • policy_id (str) – Filter payments by policy_id
  • bill_from_date (date) – Filter invoices with bill date > bill_from_date
  • bill_to_date (date) – Filter invoices with bill date < bill_to_date
  • due_from_date (date) – Filter invoices with due date > due_from_date
  • due_to_date (date) – Filter invoices with due date < due_to_date
  • sorting_order (str) – Ascending/descending order. Choices {‘asc’, ‘desc’}
  • page_number (int) – Page number,starting from 1
  • page_size (int) – Page size, must be >0
Returns:

  • success (bool) – True if successful, false if not

  • messages (list of str) – List of human-readable error messages

  • data (dict) – The data response having the form:

    {
        "due_to_date": "06/06/2017",
        "page_number": 1,
        "bill_to_date": null,
        "invoices": [
          {}
        ],
        "sorting_order": "asc",
        "bill_from_date": null,
        "total_pages": 2,
        "due_from_date": null,
        "page_size": 2,
        "policy_id": "f855df19-ff58-4bc8-92e2-93efa35059d7"
    }