Skip to main content
Aria Knowledge Central

record_usage_m Sample Call and Response

This example shows a call that records a usage record for an account, for inclusion in a future invoice, based on the record_usage_m method defined 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": "record_usage_m",
  "output_format": "json",
  "client_no": 66123,
  "auth_key": "sample-auth-key-not-real-000111",
  "acct_no": 3038219,
  "plan_instance_no": 902144,
  "usage_type": 5017,
  "usage_units": 250,
  "usage_date": "2026-07-20 14:35:00",
  "comments": "Monthly application programming interface call volume reported by the metering system.",
  "client_record_id": "USG-2026-07-20-88451",
  "caller_id": "metering-service-01"
}

Three groups of alternative fields appear in this method. First, acct_no, userid, and client_acct_id are alternatives for identifying the account; this example supplies the Aria-assigned acct_no. Second, plan_instance_no and client_plan_instance_id are alternatives for identifying the plan instance; this example supplies the Aria-assigned plan_instance_no. Third, usage_type and usage_type_code are alternatives for identifying the type of usage; this example supplies the Aria-assigned numeric usage_type rather than the client-defined usage_type_code. The auth_key and output_format fields sit outside the method's own documented arguments; auth_key authenticates the caller, and output_format, together with rest_call, forms the envelope that the REST gateway adds to every call, requesting a JSON response.

Sample response

{
  "usage_rec_no": 71029384,
  "error_code": 0,
  "error_msg": "OK"
}

An error_code value of 0 and an error_msg value of "OK" indicate that Aria recorded the usage record successfully. The usage_rec_no field returns the unique identifier Aria assigned to this newly recorded usage record. This example does not include the error_details field, since that field is for internal use and does not appear in a client-facing response. It also leaves out master_plan_instance_no, billable_units, amt, rate, telco_from, telco_to, exclude_from_billing, exclusion_comments, the qualifier_1 through qualifier_4 fields, parent_usage_rec_no, client_receipt_id, precalc_tax_inclusive, and precalc_tax_records, all of which are optional and not needed to illustrate a standard usage submission. The usage_field field is left out entirely because it is marked as unused by the system for this method.

TOP
  • Was this article helpful?