Skip to main content
Aria Knowledge Central

discard_usage_m Sample Call and Response

This example discards one usage record that was submitted in error, marking it as excluded rather than deleting it outright. It is based on the plsql_m_r73.yml definition file.

This example includes a representative set of commonly used optional fields; the method has no strictly required arguments beyond client_no, since it accepts either Aria-assigned or client-defined identifiers for the usage records to discard.

Sample call

{
  "rest_call": "discard_usage_m",
  "output_format": "json",
  "client_no": 100,
  "auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "usage_record_nos": [
    { "usage_record_no": 88213045 }
  ],
  "exclusion_reason_cd": 1005,
  "exclusion_comment": "Usage recorded twice due to a duplicate meter read; removing the duplicate record."
}

The rest_call and output_format fields are envelope fields added by the REST layer rather than fields documented on the method itself. This example identifies the usage record to discard with the Aria-assigned usage_record_nos array rather than the client-defined client_record_ids array; both are optional, repeatable structures, and a real call could supply either one, or both, with more than one entry. The exclusion_reason_cd field is an Aria-configured code identifying why the usage is being discarded; this example uses one representative value, and other codes exist for other scenarios. The exclusion_comment field records a free-text explanation for the discard action. This example leaves out the optional combined_client_usage_ids array, which is used only when a client's configuration enforces usage record uniqueness by requiring both a client record ID and a usage type code together.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "failed_records": []
}

An error_code of zero and an error_msg of "OK" indicate that Aria processed the discard request successfully. The failed_records array lists any individual usage records that Aria could not exclude, each with its own usage_record_no or client_record_id, record_error_code, and record_error_msg; because the single usage record in this example was excluded successfully, the array is empty. If a bulk call discarded several usage records and some failed, this array would contain one entry per failed record. This example omits the method's error_details output field, which is a nonpublic field with no client-facing purpose.

TOP
  • Was this article helpful?