Skip to main content
Aria Knowledge Central

get_acct_statement_history_m Sample Call and Response

This example retrieves every statement generated within a single billing period across all master plan instances (subscriptions) on an account. It is based on the get_acct_statement_history_m method definition in plsql_m_r73.yml.

This example includes every required field, plus start_date, end_date, and include_invoice_activity_eligibility to scope the results to one billing period and check email-sending eligibility. It leaves out master_plan_instance_no and client_master_plan_instance_id, since this example retrieves statements across every subscription on the account rather than one specific subscription.

Although get_acct_statement_history_m and get_acct_statement_all_m sound similar, they serve different purposes. This method filters by a billing period date range and returns a period-level financial summary for each statement, including account_balance and unapplied_payment_summary. The get_acct_statement_all_m method instead filters by a specific statement, invoice, or master plan instance, with no date range, and returns billing group, payment method, installment, and payment plan detail that this method does not return.

Sample call

{
  "rest_call": "get_acct_statement_history_m",
  "output_format": "json",
  "client_no": 6423,
  "auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
  "acct_no": 6621789,
  "start_date": "2026-06-01",
  "end_date": "2026-06-30",
  "include_invoice_activity_eligibility": true
}

The acct_no field identifies the account, using the Aria-assigned numeric identifier rather than its alternatives, user_id and client_acct_id. The start_date and end_date fields bound the billing period to June 2026. The include_invoice_activity_eligibility field of true directs Aria to check whether each returned statement is eligible to be sent by email; setting it to false, the default, skips that eligibility check, and a null value is also treated as false.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "statements_history": [
    {
      "statement_no": 981204,
      "create_date": "2026-06-01",
      "currency_cd": "usd",
      "due_date": "2026-06-16",
      "due_date_plus_grace_period": "2026-06-21",
      "new_charges_amount": 224.10,
      "new_payments_amount": 0.00,
      "balance_forward_amount": 0.00,
      "total_amount": 224.10,
      "is_paid_ind": 1,
      "invoice_activity_ind": 1,
      "seq_statement_id": "SEQ-2026-0601-A",
      "statement_master_plan_instances": [
        {
          "master_plan_instance_no": 500213,
          "client_master_plan_instance_id": "MPI-CORE-01"
        }
      ],
      "invoice_no": 774401,
      "unapplied_payment_summary": 0.00,
      "account_balance": 0.00,
      "sent_status": "Sent",
      "date_sent": "2026-06-01"
    },
    {
      "statement_no": 981205,
      "create_date": "2026-06-03",
      "currency_cd": "usd",
      "due_date": "2026-06-18",
      "due_date_plus_grace_period": "2026-06-23",
      "new_charges_amount": 45.00,
      "new_payments_amount": 0.00,
      "balance_forward_amount": 0.00,
      "total_amount": 45.00,
      "is_paid_ind": 0,
      "invoice_activity_ind": 1,
      "seq_statement_id": "SEQ-2026-0601-B",
      "statement_master_plan_instances": [
        {
          "master_plan_instance_no": 500288,
          "client_master_plan_instance_id": "MPI-ADDON-02"
        }
      ],
      "invoice_no": 774450,
      "unapplied_payment_summary": 0.00,
      "account_balance": 45.00,
      "sent_status": "Sent",
      "date_sent": "2026-06-03"
    }
  ]
}

An error_code value of zero and an error_msg value of "OK" together indicate that Aria retrieved the statement history successfully. The statements_history array shows two statements for illustration, one for each of two master plan instances billed during June, because is_paid_ind of one indicates the first statement is fully paid and is_paid_ind of zero indicates the second remains unpaid; an account with more subscriptions or a longer billing period could return additional entries. Each entry's invoice_activity_ind of one, checked because include_invoice_activity_eligibility was set to true in the request, indicates the statement is eligible to be sent by email. This example leaves out the xml_statement_no field, which only appears when the client's Notification Settings enable XML Statement Distillation, a configuration not used by this account.

TOP
  • Was this article helpful?