Skip to main content
Aria Knowledge Central

create_acct_message_m Sample Call and Response

This example shows a typical call to create_acct_message_m that sends a third-party usage allowance threshold notification to an account holder for a specific master plan instance, along with a representative response. The example is based on the method definition in plsql_m_r74.yml.

This example includes every field required to send the message and a representative set of commonly used optional fields, not every field the method accepts.

Sample call

{
  "rest_call": "create_acct_message_m",
  "output_format": "json",
  "client_no": 10023,
  "auth_key": "8f3e2b1a9c7d4e6f0a1b2c3d4e5f6789",
  "acct_no": 4471198,
  "template_class": "TPALR",
  "alt_template_no": 5522,
  "master_plan_instance_no": 9042377,
  "message_content": "{\"recipient_email\":\"morgan.chen@example.com\",\"account_holder_name\":\"Morgan Chen\",\"plan_name\":\"Business Data 50GB\",\"allowance_threshold_percent\":80,\"current_usage_gb\":40.2,\"allowance_gb\":50}"
}

rest_call and output_format are added by the REST layer common to every Core API call; they do not appear among the method's own documented arguments. acct_no identifies the account holder who receives the message; client_acct_id is the client-defined alternative, and only one of the two is supplied, not both.

template_class is set to TPALR, meaning the message reports that a third-party usage allowance threshold has been reached. Other values cover a prepaid credit balance being exhausted (TPPCE), a prepaid credit top-up being applied (TPPCA), and a usage accumulator threshold being reached (TPACR). alt_template_no overrides the client's default template for this class with a specific alternate template, for example a template branded for one product line.

master_plan_instance_no scopes the message to the specific master plan instance whose usage crossed the threshold, since usage allowances are tracked at the plan instance level. billing_group_no is the alternative, which scopes the message to a billing group instead; the method does not accept both in the same call, so this example supplies only master_plan_instance_no.

message_content is documented as a plain string field, not a nested object, so its JSON payload is supplied as an escaped string rather than as nested JSON within the request body. Decoded, the payload in this example carries the recipient's email address (recipient_email) and the replacement values the template needs: the account holder's name, the plan name, the threshold percentage reached, and the current and total allowance amounts. The message_content field is optional per the method definition, but in practice you always supply it, since it is the only place the recipient's email address is specified. This example includes a representative set of replacement values; the actual fields available depend on the template referenced by template_class and alt_template_no.

Sample response

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

error_code of 0 with error_msg of "OK" indicates the message was created and sent successfully. This method returns no other fields; it does not assign or return an identifier for the message itself.

TOP
  • Was this article helpful?