Skip to main content
Aria Knowledge Central

get_promotions_m Sample Call and Response

This example shows a client retrieving the complete list of promotions defined for its account, based on the get_promotions_m method defined in methods_m_r73.yml.

This example includes every required field for the call and a representative set of returned promotion summaries. It does not cover the fuller detail, such as the promotional plan set and usage limits, associated with a single promotion; get_promotion_details_m covers that.

Sample call

{
  "rest_call": "get_promotions_m",
  "output_format": "json",
  "client_no": 60123,
  "auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
}

The rest_call and output_format fields are envelope fields that the REST layer adds to every call; neither appears in the method’s own documented arguments. The call requires only client_no, Aria’s identifier for the client requesting the list, and auth_key, the authentication key issued to that client. This example omits the optional locale_no, locale_name, and include_translations fields, since the reader is not requesting translated promotion information in this scenario.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "promotions": [
    {
      "promo_cd": "WELCOME25",
      "promo_desc": "Twenty-five percent off the first three months for new customers.",
      "expires_after": "2026-12-31"
    },
    {
      "promo_cd": "HOLIDAY10",
      "promo_desc": "Ten percent off any plan upgrade during the holiday season.",
      "expires_after": "2026-01-15"
    }
  ]
}

An error_code of zero and an error_msg of “OK” indicate that the promotion list was retrieved successfully. The promotions array holds one entry per promotion configured for the client; a real client could have more promotions than the two entries shown here. The expires_after value is a date in yyyy-mm-dd format, marking when each promotion stops being available. Each entry carries only promo_cd, promo_desc, and expires_after; this example leaves out promotion_translations, which the method returns only when the caller sets include_translations to true, and leaves out the promotional plan set, start date, and usage limit details that get_promotion_details_m returns instead.

TOP
  • Was this article helpful?