create_plan_group_m Sample Call and Response
This example shows a call to create_plan_group_m that creates a new plan group, which lets customer service representatives or self-service users choose among a defined set of plans when changing an account’s plan. It is based on methods_m_r73.yml, Admin Tools API.
This example covers the group’s name, description, usage scope, a client-defined identifier, and the plans it contains; it does not cover create_promo_plan_set_m, a separate method that groups plans for promotional eligibility rather than for plan-change selection, and the two should not be confused with each other.
Sample call
{
"rest_call": "create_plan_group_m",
"output_format": "json",
"client_no": 10023,
"auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"group_name": "Business Tier Plans",
"group_desc": "Plans available for selection when moving a business account between service tiers",
"group_usage": "3",
"client_plan_change_group_id": "BIZ-TIER-GRP",
"group_plans": "4021|4022|4023"
}
The fields rest_call and output_format are REST-layer additions that sit outside the method’s own documented arguments in the yml; you supply rest_call with the method name and output_format with json to request a JSON response. The required fields are group_name, group_desc, and group_usage, along with the standard client_no and auth_key credentials. The group_usage value of "3" means this plan group is available to both customer service representatives and self-service users; a value of "1" would restrict it to customer service representatives only, and "2" would restrict it to self-service users only. The client_plan_change_group_id field is an optional client-assigned identifier for the group itself. The group_plans field is a scalar string field whose description explains that it accepts a "|"-delimited list of Aria-assigned plan numbers in a single string, so this example represents it as "4021|4022|4023" rather than as a JSON array; the yml also defines an alternative field, group_plan_ids, which accepts the same delimited-string convention for client-defined plan identifiers, but only one of group_plans or group_plan_ids is required, and this example uses the Aria-assigned plan numbers.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"group_no": 7215
}
An error_code value of zero, together with an error_msg value of "OK", indicates that Aria created the plan group successfully. The group_no value is the Aria-assigned unique identifier for the newly created plan group. This example does not attempt to show a failure response, such as one where group_plans referenced a plan number that does not exist for this client.