Skip to main content
Aria Knowledge Central

get_discount_bundle_details_m Sample Call and Response

This example shows an administrative client retrieving the full detail of a single discount bundle, bundle number 6010, which groups two discount rules used for a winter retention campaign, based on the get_discount_bundle_details_m method defined in methods_m_r73.yml.

This example covers a bundle's identifying fields plus the two parallel arrays of rules it groups, one identified by Aria-assigned rule number and one by client-defined rule ID. It does not cover the full detail of either underlying discount rule (its discount amount, duration, and so on), which is the scope of the separate get_discount_rules_m and get_discount_rule_details_m methods instead.

Sample call

{
  "rest_call": "get_discount_bundle_details_m",
  "output_format": "json",
  "client_no": 400218,
  "auth_key": "7f3a9c1d2e4b5f6a8c9d0e1f2a3b4c5d",
  "bundle_no": 6010
}

Besides client_no and auth_key, this call passes bundle_no, the Aria-assigned identifier for the discount bundle. bundle_no and bundle_id form an alt_required_field pair, meaning either one alone identifies the bundle; this example uses the Aria-assigned numeric identifier rather than the client-defined one.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "discount_bundles": [
    {
      "bundle_no": 6010,
      "bundle_name": "Winter Retention Bundle",
      "bundle_id": "WINTER-RETENTION",
      "description": "Groups the discount rules offered to accounts at risk of cancellation during the winter renewal cycle",
      "allow_overlap_ind": "N",
      "rules": [900101, 900215],
      "rule_ids": ["WINTER-LOYALTY-RULE", "SUMMER25-RULE"]
    }
  ]
}

An error_code of zero with an error_msg of “OK” indicates the request succeeded. The yml wraps this method's result in the same pluralized discount_bundles field used by the list-all method, get_discount_bundles_m, and does not mark it struct: single, so this response models it as an array; because a single bundle_no or bundle_id was requested, that array always contains exactly one entry. allow_overlap_ind of "N" means the rules grouped in this bundle cannot overlap when applied to the same invoice. Both rules and rule_ids are flat arrays of scalars rather than arrays of one-key objects, because the yml nests a single scalar child (rule and rule_id, respectively) under the plural field name, the same self-nested-scalar pattern documented for this API family; the two arrays are simply alternate identifier representations of the same underlying rules, shown here in matching order (rule 900101 corresponds to client rule ID WINTER-LOYALTY-RULE, and rule 900215 corresponds to SUMMER25-RULE). A bundle with more rules grouped into it would simply have more entries in each array.

TOP
  • Was this article helpful?