create_discount_bundle_m Sample Call and Response
This example shows a call to create_discount_bundle_m that groups two previously created discount rules into a single bundle, based on methods_m_r73.yml, Admin Tools API, release 73.
This example includes every required field for the method, plus the optional rules field for grouping existing discount rules into the bundle; it does not cover every optional field the method accepts.
Sample call
{
"rest_call": "create_discount_bundle_m",
"output_format": "json",
"client_no": 30219,
"auth_key": "8f3d2c1b9a7e4f6d5c2b1a0f9e8d7c6b",
"bundle_name": "Loyalty Program Discount Bundle",
"bundle_id": "loyalty-bundle-2026",
"bundle_description": "Groups the loyalty plan discount rules so that they apply together without overlapping benefits.",
"allow_overlap_ind": "N",
"rules": [88341, 88342]
}
The envelope fields rest_call and output_format sit outside the arguments that methods_m_r73.yml documents for this method; the REST layer adds them to every call, with rest_call naming the method being invoked and output_format requesting a JSON response. The fields client_no and auth_key are not declared under create_discount_bundle_m itself; they fall back to the shared param_defaults block, where both are required. The field allow_overlap_ind uses value N, meaning the rules grouped into this bundle cannot overlap with one another, as opposed to value Y, which would allow overlapping rules. The optional field rules groups the discount rules that belong to this bundle; the yml describes it as a flat array of Aria-assigned rule numbers, formatted on the wire as rules[1]=1002&rules[2]=103, rather than as an array of objects, so this example lists the rule_no values 88341 and 88342 directly. The field rules is an alternative to rule_ids, which instead accepts a flat array of client-defined rule identifier strings; this example uses rules, the Aria-assigned numeric identifiers, rather than rule_ids.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"bundle_no": 5502
}
The error_code value of 0 and the error_msg value of OK indicate that Aria created the discount bundle successfully; a nonzero error_code would instead carry a description of what went wrong in error_msg. The response returns the single Aria-assigned bundle_no for the newly created bundle; this method creates exactly one bundle per call, so this field is not an array. This example does not illustrate the rule_ids alternative to the rules field, since only one side of an alternative pair belongs in a single call.