Skip to main content
Aria Knowledge Central

get_recurring_credit_template_details_m Sample Call and Response

This example shows a client looking up the full details of a single recurring credit template, including its eligibility rules, discount amount, and associated coupons, based on the get_recurring_credit_template_details_m method defined in methods_m_r73.yml.

This example includes every required field for the call and a coherent, representative subset of the returned eligibility, discount, and coupon fields for a flat-rate, monthly credit template. It does not cover the percentage-based discount fields, which apply only when a template uses a percentage discount type.

Sample call

{
  "rest_call": "get_recurring_credit_template_details_m",
  "output_format": "json",
  "client_no": 60123,
  "auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "credit_template_no": 7010
}

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 client_no and auth_key, along with an identifier for the template being looked up. The yml lists credit_template_no and client_credit_template_id as an alternative pair, so a caller supplies only one of the two; this example supplies credit_template_no, Aria’s assigned identifier for the template, rather than client_credit_template_id, the client-defined identifier.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "credit_template_id": 7010,
  "client_credit_template_id": "anniversary-credit",
  "credit_template_name": "Anniversary Service Credit",
  "eligible_plan_no": 10045,
  "eligible_client_plan_id": "gold-monthly",
  "eligible_service_no": 20031,
  "eligible_client_service_id": "gold-svc",
  "no_of_credits": 4,
  "credit_interval_type_ind": "M",
  "credit_interval_months": 3,
  "discount_type": "1",
  "discount_amt": 25.00,
  "eligible_service_types": [
    "01"
  ],
  "coupons": [
    {
      "coupon_cd": "ANNIV2026",
      "coupon_msg": "Thank you for being a loyal customer.",
      "coupon_desc": "Anniversary loyalty coupon",
      "status_ind": 1,
      "no_of_uses": 1,
      "start_date": "2026-01-01",
      "end_date": "2026-12-31",
      "coupon_scope": 3
    }
  ]
}

An error_code of zero and an error_msg of “OK” indicate that the template’s details were retrieved successfully. The credit_interval_type_ind value of “M” means the credit_interval_months value of three applies, so a credit is issued every three months; the yml also defines “W” for weeks and “D” for days, each paired with its own interval field. A discount_type of “1” means this template issues a flat discount amount, shown in discount_amt, rather than a percentage discount, so this example leaves out percentage_plan_no, percentage_client_plan_id, percentage_service_no, and percentage_client_service_id, which the yml documents as populated only when discount_type is “2.” It likewise leaves out alt_service_no and alt_client_service_id, since this template uses the standard service code rather than an alternative one. The eligible_service_types field is documented in the yml as a nested structure containing only a repeat of its own single scalar field, so this example represents it as a flat array of service type codes rather than an array of one-key objects; a template eligible for more service types would list additional codes in the same array. The coupons array lists every coupon tied to this template; a template with more coupons than the one shown here would return additional entries in the same format. A coupon_scope value of three means the coupon shown can be applied to an account or to a master plan instance. This example leaves out the nonpublic, placeholder-only fields expires_desc and coupon_no, neither of which represents real, populated data.

TOP
  • Was this article helpful?