get_client_plans_all_m Sample Call and Response
This example shows a call to get_client_plans_all_m that retrieves a detailed list of plans associated with a client, based on the plsql_m_r73.yml definition file for release 73. Because this example filters by plan_no rather than acct_no, the response includes the master plan service details rather than the reduced detail Aria returns when the call is filtered by an account.
This example includes the optional filter and inclusion flags most integrators use, and it shows two of the plans returned, a master plan and one of its supplemental plans, rather than a client’s entire plan catalog.
Sample call
{
"rest_call": "get_client_plans_all_m",
"output_format": "json",
"client_no": "10021",
"auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"plan_no": 3301,
"include_all_rate_schedules": "true",
"include_plan_hierarchy": "false",
"retrieve_bundled_nso": "false",
"retrieve_included_nso": "false",
"include_translations": "false"
}
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 for the Premium Streaming plan. This example does not filter by acct_no, since doing so would cause Aria to omit the master plan service and rate schedule details this example is meant to illustrate. Setting include_all_rate_schedules to true asks Aria to retrieve the rates and rate schedules tied to the plan, while include_plan_hierarchy, retrieve_bundled_nso, and retrieve_included_nso are all left at false to keep the response focused on the plan and its services rather than its child plans or bundled inventory items.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"error_details": null,
"all_client_plan_dtls": [
{
"plan_no": 3301,
"client_plan_id": "plan-premium-streaming",
"plan_name": "Premium Streaming",
"plan_desc": "Master subscription plan bundling hardware and streaming usage services.",
"currency_cd": "usd",
"supp_plan_ind": 0,
"billing_ind": 1,
"display_ind": 1,
"rollover_months": null,
"rollover_plan_no": null,
"early_cancel_fee": 25.0,
"early_cancel_min_months": 6,
"suspension_period": 30,
"new_acct_status": 1,
"rollover_acct_status": null,
"rollover_acct_status_days": null,
"init_free_months": 1,
"plan_2_assign_on_susp": null,
"default_notify_method": 1,
"first_retrieval_level_ind": "true",
"plan_services": [
{
"service_no": 5510,
"service_desc": "Consumer Electronics Hardware",
"is_recurring_ind": 1
},
{
"service_no": 5601,
"service_desc": "Streaming Data Usage",
"is_recurring_ind": 0
}
]
},
{
"plan_no": 3302,
"client_plan_id": "plan-premium-streaming-annual",
"plan_name": "Premium Streaming - Annual Supplement",
"plan_desc": "Supplemental plan applying an annual pricing discount to the Premium Streaming master plan.",
"currency_cd": "usd",
"supp_plan_ind": 1,
"billing_ind": 1,
"display_ind": 1,
"rollover_months": null,
"rollover_plan_no": null,
"early_cancel_fee": null,
"early_cancel_min_months": null,
"suspension_period": null,
"new_acct_status": null,
"rollover_acct_status": null,
"rollover_acct_status_days": null,
"init_free_months": null,
"plan_2_assign_on_susp": null,
"default_notify_method": null,
"first_retrieval_level_ind": "false",
"plan_services": []
}
]
}
An error_code of 0 with an error_msg of OK indicates that Aria found the client’s plans and returned the requested details successfully. The all_client_plan_dtls array holds one entry per plan; this example shows two representative entries, the requested master plan and one of its supplemental plans, but a real client catalog would typically include many more plans, and the array is not exhaustive. The first_retrieval_level_ind value of true on the master plan means it matched the initial plan_no filter directly, while the value of false on the supplemental plan means it was returned because of its relationship to that master plan rather than matching the filter itself. This example excludes plan_rate_schedules_details, since the yml file marks that field usage: unused in this release, and it excludes plan_groups, promotional_plan_sets, parent_plans, plan_supp_fields, child_plans, plan_nso_items, plan_nso_incl_list, and plan_translation_dtls, all of which the method can return but which are outside the scope of this worked example.