Skip to main content
Aria Knowledge Central

get_unbilled_usage_summary_m Sample Call and Response

This example retrieves the summary value of unbilled usage on an account, including a filtered set of the underlying usage detail records, based on the get_unbilled_usage_summary_m method defined in plsql_m_r73.yml.

This example includes every required field and a representative set of optional filters that narrow the results to one plan and one usage type. It does not cover every optional field or return field the method accepts.

Sample call

{
  "rest_call": "get_unbilled_usage_summary_m",
  "output_format": "json",
  "client_no": 1275,
  "auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "acct_no": 900412233,
  "master_plan_instance_id": 55018,
  "usage_details_flag": "true",
  "plan_no": 30512,
  "usage_type_cd": "DATA_GB",
  "retrieve_excluded_usage": "false"
}

The rest_call and output_format fields form the envelope that the REST layer adds to every call; they are not part of the method's own documented arguments. The acct_no field identifies the account and is one of two alternative fields for this purpose; this example uses the Aria-assigned acct_no rather than the client-defined client_acct_id. The master_plan_instance_id field narrows the results to one specific master subscription plan instance. The usage_details_flag field is set to true so that the response includes the individual unbilled usage detail records, rather than suppressing them. The plan_no field narrows the results to one plan; it is one of a group of three alternative fields for identifying a plan instance (plan_no, plan_instance_no, and client_plan_instance_id), and this example uses plan_no. The usage_type_cd field narrows the results to one usage type using the client-assigned code; it is one of two alternative fields for that purpose, and this example uses usage_type_cd rather than the Aria-assigned usage_type_no. The retrieve_excluded_usage field is set to false, meaning permanently discarded usage records are not included in the response; its default value of true would include them instead.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "currency_cd": "usd",
  "currency_name": "US Dollar",
  "acct_no": 900412233,
  "master_plan_instance_id": 55018,
  "mpi_mtd_threshold_amount": 500.00,
  "mpi_ptd_threshold_amount": 750.00,
  "mtd_balance_amount": 342.18,
  "ptd_balance_amount": 610.45,
  "mpi_mtd_delta_sign": "-",
  "mpi_mtd_delta_amount": 157.82,
  "mpi_ptd_delta_sign": "-",
  "mpi_ptd_delta_amount": 139.55,
  "unapp_svc_credit_bal_amount": 25.00,
  "unbilled_usage_rec": [
    {
      "plan_instance_id": 55018,
      "usage_type_no": 4021,
      "usage_type_description": "Data Usage (GB)",
      "usage_date": "2026-07-20",
      "units": 12.5,
      "specific_record_charge_amount": 6.25,
      "pre_rated_rate": 0.50,
      "recorded_units": 12.5,
      "usage_rec_no": 990188221,
      "usage_type_code": "DATA_GB"
    },
    {
      "plan_instance_id": 55018,
      "usage_type_no": 4021,
      "usage_type_description": "Data Usage (GB)",
      "usage_date": "2026-07-21",
      "units": 8.2,
      "specific_record_charge_amount": 4.10,
      "pre_rated_rate": 0.50,
      "recorded_units": 8.2,
      "usage_rec_no": 990188304,
      "usage_type_code": "DATA_GB"
    }
  ]
}

An error_code of zero, together with an error_msg of "OK," indicates that Aria located the account and returned its unbilled usage summary successfully. The mpi_mtd_delta_sign and mpi_ptd_delta_sign fields use a three-value symbolic code: a plus sign means the associated delta amount is over its threshold, a minus sign means it is under the threshold, and an equals sign means it matches the threshold exactly; this example shows both signs as minus, meaning the account's month-to-date and period-to-date unbilled usage balances are currently under their configured threshold amounts. The unbilled_usage_rec array is shown here with two entries, reflecting the usage_details_flag of true in the call, to illustrate that an account can have more than one unbilled usage detail record; an actual response could contain additional entries beyond what is shown here.

This example leaves out several optional return fields the yml defines, including client_acct_id, client_master_plan_instance_id, the client-facing client_mtd_threshold_amount, client_ptd_threshold_amount, client_mtd_delta_sign, client_mtd_delta_amount, client_ptd_delta_sign, and client_ptd_delta_amount fields, the unapp_svc_credit_delta_sign and unapp_svc_credit_delta_amount fields, the unit_threshold_details array (which would only be populated when include_all_usage_unit_thresholds is requested), acct_locale_no, and acct_locale_name, to keep the example focused on a small, coherent set of account, threshold, and usage detail fields.

TOP
  • Was this article helpful?