get_avail_plans_for_acct_all_m Sample Call and Response
This example shows a client retrieving the full listing of plans, services, and rates available for assignment to one account, based on the get_avail_plans_for_acct_all_m method defined in plsql_m_r73.yml. When a plan_instance_no is supplied, this method returns both the child plans available under that plan instance and, at the same time, all master plans available for assignment to the account as a whole.
The example scopes the request to one existing master plan instance, asks Aria to include the full supplemental plan hierarchy under that instance, and asks for rate schedule summary information on each returned plan. It does not cover a request that omits plan_instance_no entirely, which would still return all master plans plus every child plan available under every one of the account's existing master plan instances.
Sample call
{
"rest_call": "get_avail_plans_for_acct_all_m",
"output_format": "json",
"client_no": 4009,
"auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"acct_no": 3300145,
"plan_instance_no": 990011,
"include_full_plan_hierarchy_plans": "true",
"include_rs_summary": "true"
}
The acct_no field and the client_acct_id field form an alternative-required pair; this example supplies acct_no and omits client_acct_id. The plan_instance_no field and the client_plan_instance_id field form a second alternative-required pair; this example supplies plan_instance_no to scope part of the response to the account's existing Premium Streaming Plan master instance. The include_full_plan_hierarchy_plans value of "true" tells Aria to also return plans available for assignment to every supplemental plan instance nested under plan_instance_no, not only its immediate children; the alternative value is "false". The include_rs_summary value of "true" tells Aria to include summary rate schedule information for each plan; leaving this field blank defaults to "false", which would omit the plan_rate_schedules_details array. This example omits the promo_cd filter and the locale_no and locale_name alternative pair. The rest_call and output_format fields are added by the REST layer.
Sample response
{
"error_code": 0,
"error_msg": "",
"all_client_plans_services": [
{
"plan_no": 5001,
"client_plan_id": "PLAN-PREMIUM-STREAM",
"plan_name": "Premium Streaming Plan",
"plan_desc": "Master plan offering unlimited streaming with premium support.",
"supp_plan_ind": 0,
"billing_ind": 1,
"display_ind": 1,
"currency_cd": "usd",
"plan_services": [
{
"service_no": 61023,
"service_desc": "Monthly Subscription Fee",
"is_recurring_ind": 1,
"is_usage_based_ind": 0,
"taxable_ind": 1
}
],
"plan_rate_schedules_details": [
{
"schedule_no": 71100,
"client_rate_schedule_id": "RS-STREAM-STD",
"schedule_name": "Standard Monthly Rate",
"schedule_currency": "usd",
"recurring_billing_interval": 1,
"recurring_billing_period_type": 3
}
]
},
{
"parent_plan_instance_no": 990011,
"plan_no": 5044,
"client_plan_id": "PLAN-HD-ADDON",
"plan_name": "HD Video Add-On",
"plan_desc": "Supplemental plan adding high-definition streaming to a master plan.",
"supp_plan_ind": 1,
"billing_ind": 1,
"display_ind": 1,
"currency_cd": "usd",
"plan_services": [
{
"service_no": 61045,
"service_desc": "HD Add-On Fee",
"is_recurring_ind": 1,
"is_usage_based_ind": 0,
"taxable_ind": 1
}
],
"plan_rate_schedules_details": [
{
"schedule_no": 71156,
"client_rate_schedule_id": "RS-HD-ADDON",
"schedule_name": "HD Add-On Monthly Rate",
"schedule_currency": "usd",
"recurring_billing_interval": 1,
"recurring_billing_period_type": 3
}
]
}
],
"acct_locale_no": 1,
"acct_locale_name": "English (United States)"
}
An error_code value of zero together with an empty error_msg indicates that Aria found the account and returned the available plans successfully. The all_client_plans_services field is an array because more than one plan can be available for assignment at once; this example shows two entries, the master Premium Streaming Plan available at the account level and a supplemental HD Video Add-On available as a child of plan instance 990011, but a real account could see many more of each. The first entry has no parent_plan_instance_no because it is a master plan assignable at the account level, while the second entry's parent_plan_instance_no of 990011 shows it is a supplemental plan assignable under that specific master plan instance. Within each plan, plan_services and plan_rate_schedules_details are themselves arrays because a plan can offer more than one service or rate schedule; each example here shows one entry for clarity. The supp_plan_ind value of zero on the master plan and one on the supplemental plan reflects that same master-versus-supplemental distinction. This example omits the rollover, contract rollover, and default notification fields on each plan entry, along with the nonpublic error_details field, to keep the response focused on the plan and rate schedule story.