Skip to main content
Aria Knowledge Central

get_acct_service_outage_credit_m Sample Call and Response

This example calculates the service outage credit owed to an account for a service disruption affecting two plans on a specific master plan instance (subscription), without creating the credit itself. It is based on the get_acct_service_outage_credit_m method definition in plsql_m_r73.yml.

This example includes every required field, the plans_to_get_outage array to scope the calculation to two specific plans, and the adjust_percent field to model a partial, rather than full, credit. It leaves out locale_no and locale_name, since this example does not need locale-specific formatting.

Sample call

{
  "rest_call": "get_acct_service_outage_credit_m",
  "output_format": "json",
  "client_no": 6423,
  "auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
  "acct_no": 8842001,
  "master_plan_instance_no": 500213,
  "outage_start_date": "2026-07-10",
  "outage_start_time": "14:00:00",
  "outage_end_date": "2026-07-11",
  "outage_end_time": "09:30:00",
  "plans_to_get_outage": [
    {
      "plan_no": 70011
    },
    {
      "plan_no": 70045
    }
  ],
  "adjust_percent": 80.00
}

The acct_no field identifies the account, using the Aria-assigned numeric identifier rather than its alternative, client_acct_id. The master_plan_instance_no field scopes the calculation to one subscription; leaving it null would calculate outage credit across the account as a whole. The outage_start_time and outage_end_time fields mark a partial-day outage rather than a full calendar day; if omitted, they default to "00:00:00" and "23:59:59" respectively. The plans_to_get_outage array lists the Aria-assigned plan numbers affected by the outage rather than its alternative, client_plan_ids_to_get_outage, which instead accepts client-defined plan identifiers. The adjust_percent field of eighty indicates that the calculated credit should be reduced to eighty percent of its full pro-rated value, reflecting a case where a full credit is not warranted; omitting this field defaults to one hundred percent, a full pro-rated credit.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "acct_no": 8842001,
  "service_outage_line_items": [
    {
      "plan_no": 70011,
      "plan_name": "Business Pro Monthly",
      "service_no": 3301,
      "service_name": "Platform Access",
      "outage_duration": 0.81,
      "credit_amount": 12.50,
      "client_plan_id": "PLAN-BIZPRO",
      "client_service_id": "SVC-PLATFORM",
      "out_acct_no": 8842001,
      "out_master_plan_instance_no": 500213,
      "out_client_mp_instance_id": "MPI-CORE-01"
    },
    {
      "plan_no": 70045,
      "plan_name": "Premium Support Add-on",
      "service_no": 3355,
      "service_name": "24/7 Support",
      "outage_duration": 0.81,
      "credit_amount": 3.75,
      "client_plan_id": "PLAN-SUPPORT",
      "client_service_id": "SVC-SUPPORT",
      "out_acct_no": 8842001,
      "out_master_plan_instance_no": 500213,
      "out_client_mp_instance_id": "MPI-CORE-01"
    }
  ],
  "total_outage_credit": 16.25,
  "adjusted_outage_credit": 13.00
}

An error_code value of zero and an error_msg value of "OK" together indicate that Aria calculated the outage credit successfully. The service_outage_line_items array contains one entry for each plan named in the request; this example shows two entries because plans_to_get_outage listed two plan numbers, but a request naming more plans would return a correspondingly longer array. Each line item's outage_duration of 0.81 reflects the roughly nineteen-and-a-half-hour outage window expressed in days. The total_outage_credit field of 16.25 is the sum of both line items' credit_amount values before adjustment, and adjusted_outage_credit of 13.00 applies the eighty percent adjust_percent factor from the request. This example leaves out the acct_locale_no, acct_locale_name, and acct_locale_no_2 fields that this method can also return, since this client does not use locale-specific account formatting; note that acct_locale_no itself is a deprecated field as of update version 19 and would not appear in current integrations regardless.

TOP
  • Was this article helpful?