Skip to main content
Aria Knowledge Central

get_catalog_hierarchy_m Sample Call and Response

This example shows a client retrieving the plan catalog hierarchy for a parent plan, based on the get_catalog_hierarchy_m method defined in plsql_m_r73.yml. The method returns the master plan and its immediate child plans, along with total and paging counts, so a developer can build a navigable view of the plan catalog.

The example filters the catalog by a specific parent_plan_no and requests both the parent and child plan lists with a total count. It does not cover filtering by promo_code, and it leaves the limit and offset paging fields at their defaults rather than showing a partial page of results.

Sample call

{
  "rest_call": "get_catalog_hierarchy_m",
  "output_format": "json",
  "client_no": 4009,
  "auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "parent_plan_no": 88001,
  "include_plan_hierarchy": "true",
  "include_parent_plan_list": "true",
  "include_child_plans_list": "true",
  "include_total_count": "true"
}

The parent_plan_no field and the client_parent_plan_id field form an alternative-required pair; this example supplies parent_plan_no and omits client_parent_plan_id. The locale_no field and the locale_name field form another alternative-required pair; this example omits both, since neither is required and the account plan names return in the client's default locale when omitted. The include_plan_hierarchy, include_parent_plan_list, and include_child_plans_list fields are each set to the string value true, one of the two allowable string values (true or false) for these fields; setting them to false would suppress the corresponding lists in the response. The include_total_count field of true requests the plans_count field in the response. This example omits the promo_code, limit, and offset fields; promo_code would otherwise filter results to plans tied to one promotion, while limit and offset support paging through large result sets. The rest_call and output_format fields are added by the REST layer.

Sample response

{
  "error_code": 0,
  "error_msg": "",
  "plans_count": 3,
  "all_plan_basic_details": [
    {
      "plan_no": 88001,
      "plan_name": "Streaming Platinum Bundle",
      "supp_plan_ind": 0,
      "client_plan_id": "STREAM-PLATINUM",
      "parent_plan_list": [],
      "child_plan_list": [
        {
          "plan_no": 88011,
          "client_plan_id": "STREAM-PLATINUM-VIDEO"
        },
        {
          "plan_no": 88012,
          "client_plan_id": "STREAM-PLATINUM-MUSIC"
        }
      ]
    },
    {
      "plan_no": 88011,
      "plan_name": "Platinum Video Add-on",
      "supp_plan_ind": 1,
      "client_plan_id": "STREAM-PLATINUM-VIDEO",
      "parent_plan_list": [
        {
          "parent_plan_no": 88001,
          "parent_plan_name": "Streaming Platinum Bundle",
          "client_parent_plan_id": "STREAM-PLATINUM"
        }
      ],
      "child_plan_list": []
    },
    {
      "plan_no": 88012,
      "plan_name": "Platinum Music Add-on",
      "supp_plan_ind": 1,
      "client_plan_id": "STREAM-PLATINUM-MUSIC",
      "parent_plan_list": [
        {
          "parent_plan_no": 88001,
          "parent_plan_name": "Streaming Platinum Bundle",
          "client_parent_plan_id": "STREAM-PLATINUM"
        }
      ],
      "child_plan_list": []
    }
  ]
}

An error_code value of zero together with an empty error_msg indicates that Aria found and returned the requested catalog hierarchy successfully. The plans_count field of three reflects the total number of plans returned by this request; a broader query against a large catalog would return a much higher count, and the caller would then use the limit and offset fields to page through the remaining all_plan_basic_details entries. The all_plan_basic_details array shows three representative entries: the requested parent plan, Streaming Platinum Bundle, and its two child plans. The supp_plan_ind value of one on each child plan indicates that plan is a supplemental plan rather than a standalone master plan, one of two allowable values (zero for a standalone plan, one for a supplemental plan). The parent_plan_list and child_plan_list arrays are shown empty on entries that have no corresponding parents or children, respectively, in this three-plan slice. This example omits the error_details field.

TOP
  • Was this article helpful?