Skip to main content
Aria Knowledge Central

get_usage_history_m Guide

This API returns usage records for an account, and can be filtered by date range, usage type, invoice, exclude status, and qualifiers. Using limit and offset inputs, results can be paginated. The fields "locale_no" and "locale_name" can be specified to translate output fields for which translations have been assigned to Locales configured in Aria.

API Specification: get_usage_history_m
Required Fields:
  • <client_no>
  • <auth_key>
  • <acct_no> or <client_acct_id>
  • <master_plan_instance_no>
 

Additional Guidance

Input Fields
 
Field Name: Notes:
<master_plan_instance_no>

You can:

  1. Pass in the Aria-assigned unique identifier for the master plan instance (MPI) to get the usage history of only that MPI; or
  2. Pass in -1 to get the usage history of all MPIs for the specified account.
<specified_usage_type_no>

You can pass in:

  • a <specified_usage_type_no> or <specified_usage_type_code> without a <date_range_start> or  <invoice_no>; or
  • a combination of (<specified_usage_type_no> or <specified_usage_type_code>) and/or (<date_range_start> and <date_range_end>) and (<invoice_no>).
<specified_usage_type_code>

You can pass in:

  • a <specified_usage_type_no> or <specified_usage_type_code> without a <date_range_start> or  <invoice_no>; or
  • a combination of (<specified_usage_type_no> or <specified_usage_type_code>) and/or (<date_range_start> and <date_range_end>) and (<invoice_no>).
<date_range_start> A date_range_start is required if an invoice_no is not specified.
<invoice_no>

You can pass in:

  • a <specified_usage_type_no> or <specified_usage_type_code> without a <date_range_start> or  <invoice_no>; or
  • a combination of (<specified_usage_type_no> or <specified_usage_type_code>) and/or (<date_range_start> and <date_range_end>) and (<invoice_no>).

An invoice number is required if  date_range_start is not specified or if you are entering an invoice_line_item.

<invoice_line_item> The invoice_no input is required if you are entering an invoice_line_item.
<retrieve_excluded_usage>
Allowable Values
Values Description
true Discarded usage records will be included
false Discarded usage records will not be included
<billed_filter>
Allowable Values
Values Description
0 Return both billed and unbilled usage records. (Default)
1 Billed usage records only
2 Unbilled usage records only

Output Fields

 
Field Name Notes
<is_excluded>
Allowable Values
Values Description
true Usage record has been excluded from billing.
false Usage record has not been excluded from billing.
<exclude_reason_cd>
Allowable Values
Values Description
1 No reason provided when discarding.
Any Random reason number given by client when discarding.

<usage_history_recs> (array)

  • <usage_record_pre_taxed_ind>
Allowable Values
Values Description
1 Client calculated taxes provided as input to Aria.
2 Aria calculated taxes using Aria's internal tax method.

<usage_history_recs> (array)

  • <usage_record_tax_inclusive_ind>
Allowable Values
Values Description
0 Usage amount is Tax Exclusive.
1 Usage amount is Tax Inclusive.

<usage_record_tax_details> (array)

  • <tax_authority_level>
Allowable Values
Values Description
0 Federal
1 State/Province
2 County
3 City
4 Unincorporated Area
5 District

<usage_record_tax_details> (array)

  • <is_excluded>
Allowable Values
Values Description
0/null Tax record has not been excluded from billing.
1 Tax record has been excluded from billing.

Error Codes

Error Code/Description Associated Inputs

1001: unexpected error

 

1004: authentication error

Associated Inputs: auth_key, client_id, client_no

<auth_key>, <client_no>

1009: account does not exist, Account not found: AriaNo (acct_no), Account not found: Userid (userid), or Account not found: ClientId (client_acct_id)

Associated Inputs: acct_no, account_no, client_acct_id, user_id, userid, parent_acct_no

<acct_no>, <client_acct_id>

20003: Invalid Usage Type

Associated Inputs: specified_usage_type_no

<specified_usage_type_no>

20004: Invalid Usage Type Code

Associated Inputs: specified_usage_type_code

<specified_usage_type_code>

20007: Limit Records number must be greater than zero

Associated Inputs: Limit, limit_records

<limit>

20013: Skip Records number must be greater than zero

Associated Input: offset

<offset>

1016: invalid input

Additional Comments:  This error can be caused by the wrong type of input; for example, text in a numbers-only field, or specifying a value other than one of the documented allowable values.

<master_plan_instance_no>, <client_master_plan_instance_id>, <invoice_no>, <limit>, <offset>, <acct_no>

3036: Invoice_line_item does not have qualifying invoice_no or transaction_no

Associated Input: invoice_line_item

Additional Comments: Invoice_no is required if invoice_line_item is specified

<invoice_line_item>

1033:  a parameter that represents a true or false value contains invalid input

Associated Inputs: alt_collect_on_approve, alt_send_statement_on_approve, cancel_orders_on_discard, cascade_action, do_auto_discard, do_collect, change_status_after_coll, reset_dates_after_status, disable_existing_on_update, do_write, exclude_terminated_plan_inst, include_all_rate_schedules, include_plan_hierarchy, retrieve_bundled_nso, retrieve_included_nso, include_translations, include_inactive_items, include_invoice_activity_eligibility, include_rs_summary, include_translations, include_service_supp_fields/include_product_fields/, include_plan_instance_fields/include_plan_services/, include_surcharges, include_void_transactions, include_voided, invoice_unbilled_usage, is_unlinked_refund, record_cc_on_auth_failure, retrieve_excluded_usage, send_email, usage_pooling, do_write

<retrieve_excluded_usage>

14071: Master Plan Instance information is missing

Associated Inputs: plan_instance_no, client_plan_instance_id, master_plan_instance_no, client_master_plan_instance_id

Additional Comments: Both plan_no and plan_id must be entered. Master Plan Instance is required if the invoice_no is not provided.

<master_plan_instance_no>, <client_master_plan_instance_id> 

14053: Invalid Master Plan Instance number

Associated Inputs: master_plan_instance_no

<master_plan_instance_no>

14054: Invalid client Master Plan Instance identifier

Associated Inputs: client_master_plan_instance_id

<client_master_plan_instance_id> 

16012: Contract end date is less than start date

Associated Inputs: date_range_start, date_range_end, start_date, end_date, length_months

<date_range_start>, <date_range_end>

1067: Locale no does not exist in the system.

Associated Inputs: locale_no, master_plan_instance_no

<locale_no>

1066: Locale name does not exist in the system.

Associated Inputs: locale_name

<locale_name>
  • Was this article helpful?