create_promo_plan_set_m Sample Call and Response
This example shows a call to create_promo_plan_set_m that creates a new promotional plan set, which defines the group of plans that a promotion can later be attached to through create_promotion_m. It is based on methods_m_r73.yml, Admin Tools API.
This example covers the plan set’s name, description, and the plans assigned to it; it does not cover create_plan_group_m, a separate method that groups plans for customer service and self-service plan-change selection rather than for promotional eligibility, and the two should not be confused with each other.
Sample call
{
"rest_call": "create_promo_plan_set_m",
"output_format": "json",
"client_no": 10023,
"auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"promo_plan_set_name": "Winter Bundle Set",
"promo_plan_set_desc": "Plans eligible for the winter promotional bundle discount",
"client_plan_type_id": "WINTER-BUNDLE-SET",
"plan_no": [4021, 4022]
}
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 promo_plan_set_name and promo_plan_set_desc, along with the standard client_no and auth_key credentials. The client_plan_type_id field is an optional client-assigned identifier for the plan set itself. The plan_no field is a scalar field marked in the yml with struct: array, so it is represented here as a flat JSON array of Aria-assigned plan numbers, [4021, 4022], rather than as an array of objects; the yml documents an alternative client_plan_id field that accepts the same array structure using client-defined plan identifiers, but only one of plan_no or client_plan_id is required, and this example uses the Aria-assigned plan numbers.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"promo_plan_set_no": 6612
}
An error_code value of zero, together with an error_msg value of "OK", indicates that Aria created the promotional plan set successfully. The promo_plan_set_no value is the Aria-assigned unique identifier for the newly created plan set. With more plans assigned, the plan_no array would simply contain additional plan numbers. This example does not attempt to show a failure response, such as one where plan_no referenced a plan number that does not exist for this client.