get_usage_summary_by_type_m Sample Call and Response
This example retrieves a summary of usage records, grouped by usage type, for an account over a date range, based on the method definition in plsql_m_r73.yml.
This example includes every required field and a representative set of commonly used optional fields, not every field the method accepts.
Sample call
{
"rest_call": "get_usage_summary_by_type_m",
"output_format": "json",
"client_no": 10023,
"auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"acct_no": 3300481,
"master_plan_instance_no": 20200456,
"date_filter_start_date": "2026-06-01",
"date_filter_end_date": "2026-06-30",
"billed_filter": 0,
"retrieve_excluded_usage": "false"
}
The envelope fields rest_call and output_format are added by the REST layer and are not part of the method’s own documented arguments. The account is identified with acct_no, one of three alternatives alongside user_id and client_acct_id. The master plan instance is identified with master_plan_instance_no rather than its alternative, client_master_plan_instance_id. This example omits usage_type_filter and its alternative, usage_type_cd_filter, so that the response summarizes every usage type incurred on the account during the date range rather than a single one. The billed_filter value of zero means the call returns both billed and unbilled usage summaries.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"error_details": "",
"start_date": "2026-06-01",
"start_time": "00:00:00",
"end_date": "2026-06-30",
"end_time": "23:59:59",
"usage_summary_recs": [
{
"out_acct_no": 3300481,
"out_client_acct_id": "ACME-3300481",
"out_plan_instance_no": 20200456,
"out_plan_instance_cdid": "ACME-PLAN-55019",
"usage_type_no": 4021,
"usage_type_label": "International Call Minutes",
"billed_ind": 0,
"total_units": 16.5,
"total_value_amount": 8.25,
"total_value_currency_code": "USD",
"last_usage_date": "2026-06-18",
"usage_type_cd": "INTL_MIN"
},
{
"out_acct_no": 3300481,
"out_client_acct_id": "ACME-3300481",
"out_plan_instance_no": 20200456,
"out_plan_instance_cdid": "ACME-PLAN-55019",
"usage_type_no": 4108,
"usage_type_label": "Data Overage",
"billed_ind": 0,
"total_units": 2.75,
"total_value_amount": 13.99,
"total_value_currency_code": "USD",
"last_usage_date": "2026-06-22",
"usage_type_cd": "DATA_OVER"
}
]
}
An error_code of zero and an error_msg of OK indicate that the call succeeded. The usage_summary_recs array holds one entry per usage type incurred by the account during the date range; this example shows two entries to illustrate a multi-type account, and a real account could return more. This example leaves out usage_type_filter, usage_type_cd_filter, billing_period_flag, usage_qualifier_1 through usage_qualifier_4, locale_no and locale_name (and the corresponding acct_locale_no and acct_locale_name response fields), and the date_filter_start_time and date_filter_end_time inputs (their absence in the call means the response defaults to midnight and end-of-day boundaries, shown in start_time and end_time).