Skip to main content
Aria Knowledge Central

get_unapplied_service_credits_m Sample Call and Response

This example retrieves the service credits, for a specified account, whose credit amounts have not yet been fully applied, based on the get_unapplied_service_credits_m method defined in plsql_m_r73.yml.

This example includes every required field and a representative optional field used to narrow the results to one subscription instance. It does not cover every optional field or return field the method accepts.

Sample call

{
  "rest_call": "get_unapplied_service_credits_m",
  "output_format": "json",
  "client_no": 1275,
  "auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "acct_no": 900412233,
  "master_plan_instance_no": 55018
}

The rest_call and output_format fields form the envelope that the REST layer adds to every call; they are not part of the method's own documented arguments. The acct_no field identifies the account and is one of two alternative fields for this purpose; this example uses the Aria-assigned acct_no rather than the client-defined client_acct_id. The master_plan_instance_no field is optional and narrows the results to service credits associated with one specific master subscription plan instance; it is one of two alternative fields for that purpose, and this example uses the Aria-assigned master_plan_instance_no rather than the client-defined client_master_plan_instance_id.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "unapplied_service_credits_details": [
    {
      "credit_id_2": 771402,
      "create_date": "2026-06-02",
      "create_user": "svc_admin",
      "initial_amount": 50.00,
      "amount_left_to_apply": 50.00,
      "reason_cd": 5,
      "reason_text": "Customer Dissatisfaction",
      "comments": "One-time courtesy credit for a service outage in May 2026.",
      "currency_cd": "usd",
      "service_no_to_apply": 88041,
      "service_name_to_apply": "Premium Support",
      "client_service_id_to_apply": "SUP-PREM-01",
      "amount_reserved_for_anniversary": 0.00,
      "out_acct_no": 900412233,
      "out_master_plan_instance_no": 55018
    },
    {
      "credit_id_2": 771488,
      "create_date": "2026-06-15",
      "create_user": "jsanchez",
      "initial_amount": 25.00,
      "amount_left_to_apply": 10.00,
      "reason_cd": 3,
      "reason_text": "Billing / Pricing Issue",
      "comments": "Partial credit issued after a rate correction.",
      "currency_cd": "usd",
      "service_no_to_apply": 88041,
      "service_name_to_apply": "Premium Support",
      "client_service_id_to_apply": "SUP-PREM-01",
      "amount_reserved_for_anniversary": 0.00,
      "out_acct_no": 900412233,
      "out_master_plan_instance_no": 55018
    }
  ]
}

An error_code of zero, together with an error_msg of "OK," indicates that Aria located the account and returned its unapplied service credit records successfully. The unapplied_service_credits_details array is shown here with two entries to illustrate that an account can have more than one unapplied service credit; an actual response could contain additional entries beyond what is shown here. The reason_cd field uses a numeric enumeration of credit reasons; this example shows the values 5 ("Customer Dissatisfaction") and 3 ("Billing / Pricing Issue"), and other values exist for reasons such as installation issues, customer returns, and system testing. This example uses credit_id_2 rather than the older credit_id field, since credit_id carries a deprecate_version of 19 in this release. It also leaves out several fields the yml marks with a deprecate_version of 23, namely eligible_plan_no, eligible_plan_name, eligible_service_no, eligible_service_name, client_eligible_plan_id, and client_eligible_service_id, along with the eligible_service_types array and the svc_credit_source fields, to keep the example focused on a small, coherent set of credit details.

TOP
  • Was this article helpful?