Skip to main content
Aria Knowledge Central

get_client_plan_service_rates_m Sample Call and Response

This example shows a call to get_client_plan_service_rates_m that retrieves the rate tiers for one service within a specified plan, based on the plsql_m_r73.yml definition file for release 73.

This example includes the identifiers needed to locate the plan and service, plus an alternate rate schedule to illustrate a customer service override, and it does not attempt to cover every internal field the method accepts.

Sample call

{
  "rest_call": "get_client_plan_service_rates_m",
  "output_format": "json",
  "client_no": "10021",
  "auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
  "plan_no": 3301,
  "service_no": 5510,
  "alt_rate_schedule_no": 6042
}

The plan is identified by one of two alternative fields, plan_no or client_plan_id; this example uses plan_no, the Aria-assigned numeric identifier. The service is identified the same way, using service_no in place of client_service_id. The optional alt_rate_schedule_no field asks Aria to return rates from an alternative rate schedule rather than the plan’s default schedule; this is the kind of override a customer service representative applies to give an account holder a discounted rate, and it has an alternative field of its own, client_alt_rate_schedule_id, which this example does not use. The example omits several internal-only fields, including plan_instance_no, acct_no, locale_no, locale_name, and do_translations, since the yml file marks each of these nonpublic.

Sample response

{
  "plan_service_rates": [
    {
      "rate_seq_no": 1,
      "from_unit": 0.0,
      "to_unit": 100.0,
      "rate_per_unit": 0.15,
      "future_rate_per_unit": 0.15,
      "monthly_fee": null,
      "weekly_fee": null,
      "daily_fee": null,
      "client_rate_schedule_id": "csr-discount-schedule",
      "rate_tier_description": "First 100 units"
    },
    {
      "rate_seq_no": 2,
      "from_unit": 100.01,
      "to_unit": 500.0,
      "rate_per_unit": 0.12,
      "future_rate_per_unit": 0.12,
      "monthly_fee": null,
      "weekly_fee": null,
      "daily_fee": null,
      "client_rate_schedule_id": "csr-discount-schedule",
      "rate_tier_description": "Next 400 units"
    },
    {
      "rate_seq_no": 3,
      "from_unit": 500.01,
      "to_unit": null,
      "rate_per_unit": 0.09,
      "future_rate_per_unit": 0.09,
      "monthly_fee": null,
      "weekly_fee": null,
      "daily_fee": null,
      "client_rate_schedule_id": "csr-discount-schedule",
      "rate_tier_description": "All units over 500"
    }
  ],
  "error_code": 0,
  "error_msg": "OK",
  "error_details": null
}

An error_code of 0 with an error_msg of OK indicates that Aria found the plan, service, and alternate rate schedule, and returned the applicable rates successfully. The plan_service_rates array holds one entry per tier in the rate schedule; this example shows three representative tiers of a graduated per-unit rate, with a null to_unit on the final tier meaning it applies to all usage above the from_unit threshold, but the array is not exhaustive of every plan and service combination Aria supports. This example leaves out the translation_support section entirely, since the yml file marks it nonpublic and internal for locale translation lookups the method performs behind the scenes.

TOP
  • Was this article helpful?