Skip to main content
Aria Knowledge Central

get_invoice_history_m Sample Call and Response

This example retrieves the invoice history for one master plan instance on an account, filtered to a specific billing date range. It is based on the get_invoice_history_m method as defined in plsql_m_r73.yml.

This example shows a date-range lookup against a single master plan instance. It does not cover the multi-master-plan-instance filter array, the rebill-only filter option, or payment plan detail retrieval.

Sample call

{
  "rest_call": "get_invoice_history_m",
  "output_format": "json",
  "client_no": 100234,
  "auth_key": "8f3d2a19c6b74e0a9d1f5c6e7a8b9c0d",
  "acct_no": 5567890,
  "master_plan_instance_id": 400321,
  "start_bill_date": "2026-01-01",
  "end_bill_date": "2026-06-30",
  "include_voided": "false"
}

The acct_no field is one of a group of alternative identifiers that also includes client_acct_id and user_id; this example uses the Aria-assigned acct_no rather than the client-defined or user ID alternatives. Similarly, master_plan_instance_id is one of a pair of alternatives with client_master_plan_instance_id; this example uses the Aria-assigned identifier. Because a specific master_plan_instance_id is supplied here (rather than the special value of negative one), the filter_master_plan_instance array is not used to select additional master plan instances. The include_voided field is set to false, its default value, so voided invoices are excluded from the results; the rb_option field, which would otherwise filter for original invoices only or rebilled invoices only, is left at its default of returning all invoices, including rebilled ones. The rest_call and output_format fields are added by the REST layer and are not part of the method's own argument list.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "invoice_hist": [
    {
      "invoice_no": 8823410,
      "outacct_no": 5567890,
      "outclient_acct_id": "ACME-5567890",
      "billing_group_no": 220145,
      "client_billing_group_id": "ACME-BG-01",
      "currency_cd": "usd",
      "bill_date": "2026-01-15",
      "paid_date": "2026-01-20",
      "amount": 249.99,
      "credit": 0.00,
      "recurring_bill_from": "2026-01-15",
      "recurring_bill_thru": "2026-02-14",
      "overall_bill_from_date": "2026-01-15",
      "overall_bill_thru_date": "2026-02-14",
      "is_voided_ind": 0,
      "invoice_type_cd": "F",
      "rb_flag": 0,
      "rb_status": "False",
      "balance_due": 0.00
    },
    {
      "invoice_no": 8845102,
      "outacct_no": 5567890,
      "outclient_acct_id": "ACME-5567890",
      "billing_group_no": 220145,
      "client_billing_group_id": "ACME-BG-01",
      "currency_cd": "usd",
      "bill_date": "2026-02-15",
      "paid_date": null,
      "amount": 249.99,
      "credit": 0.00,
      "recurring_bill_from": "2026-02-15",
      "recurring_bill_thru": "2026-03-14",
      "overall_bill_from_date": "2026-02-15",
      "overall_bill_thru_date": "2026-03-14",
      "is_voided_ind": 0,
      "invoice_type_cd": "F",
      "rb_flag": 0,
      "rb_status": "False",
      "balance_due": 249.99
    },
    {
      "invoice_no": 8861233,
      "outacct_no": 5567890,
      "outclient_acct_id": "ACME-5567890",
      "billing_group_no": 220145,
      "client_billing_group_id": "ACME-BG-01",
      "currency_cd": "usd",
      "bill_date": "2026-03-15",
      "paid_date": "2026-03-18",
      "amount": 259.99,
      "credit": 10.00,
      "recurring_bill_from": "2026-03-15",
      "recurring_bill_thru": "2026-04-14",
      "overall_bill_from_date": "2026-03-15",
      "overall_bill_thru_date": "2026-04-14",
      "is_voided_ind": 0,
      "invoice_type_cd": "F",
      "rb_flag": 0,
      "rb_status": "False",
      "balance_due": 0.00
    }
  ]
}

An error_code of zero, paired with an error_msg of "OK", indicates the call succeeded. The invoice_hist array shown here contains three representative entries covering three consecutive billing periods, one of which still shows an outstanding balance_due; a real account with a longer history could return many more entries covering additional billing periods. The error_details field is left out of this response entirely because it is a nonpublic field not exposed to callers. Also left out are the deprecated master_plan_no, master_plan_name, and client_master_plan_id fields (all deprecated as of version thirty-two), the orig_invoice_no, rb_no, rb_reason_cd, and rb_comments fields (which are only populated on rebill invoices, and none of the invoices in this example are rebills), the usage_bill_from and usage_bill_thru fields (not applicable because these are full recurring invoices rather than usage invoices), the installment_ind field, and the invoice_payment_plan_info array, which is only populated when include_payment_plan_info is set to true in the request.

TOP
  • Was this article helpful?