Skip to main content
Aria Knowledge Central

get_supp_field_details_m Sample Call and Response

This example shows a call that retrieves the full configuration of one specific client-defined supplemental account field, identified by name, based on the get_supp_field_details_m method defined in methods_m_r73.yml.

This example covers a single-field lookup that includes selection-list options and one translation, and it does not cover the unfiltered, all-fields list that the related get_supp_fields_m method returns.

Sample call

{
  "rest_call": "get_supp_field_details_m",
  "output_format": "json",
  "client_no": 30215,
  "auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "field_name": "loyalty_tier",
  "locale_no": 10,
  "include_translations": true
}

The rest_call and output_format fields are REST-layer additions that sit outside the method’s own documented arguments, not part of the yml’s arguments block; every sample call includes them, and output_format requests a JSON response. The client_no and auth_key fields are required for every call. The field_name field is also required for this method; it is the name of the single supplemental account field whose details you want, which is exactly what distinguishes this method’s scope from get_supp_fields_m, a method that takes no field-name argument at all and always returns every supplemental field defined for the client. The locale_no and locale_name fields are an alternative pair (a caller supplies one or the other, never both); this example uses locale_no, the Aria-assigned numeric identifier, rather than locale_name. The include_translations field is optional and defaults to false if omitted; setting it to true, as shown here, tells the method to include the supp_field_translations array in the specified locale.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "field_name": "loyalty_tier",
  "field_desc": "Customer loyalty program tier",
  "field_order": 1,
  "hidden_ind": 0,
  "required_ind": 1,
  "sel_ind": 1,
  "presentation_mode": "select",
  "min_no_sel": 1,
  "max_no_sel": 1,
  "sel_options": [
    {
      "display_text": "Bronze",
      "option_value": "BRZ",
      "option_value_order": 1
    },
    {
      "display_text": "Silver",
      "option_value": "SLV",
      "option_value_order": 2
    },
    {
      "display_text": "Gold",
      "option_value": "GLD",
      "option_value_order": 3
    }
  ],
  "supp_field_translations": [
    {
      "locale_no": 10,
      "locale_name": "fr_FR",
      "field_name": "niveau_de_fidelite",
      "field_desc": "Niveau du programme de fidelite du client",
      "field_order": 1,
      "sel_options": [
        {
          "display_text": "Bronze",
          "option_value": "BRZ",
          "option_value_order": 1
        },
        {
          "display_text": "Argent",
          "option_value": "SLV",
          "option_value_order": 2
        },
        {
          "display_text": "Or",
          "option_value": "GLD",
          "option_value_order": 3
        }
      ]
    }
  ]
}

An error_code of zero and an error_msg of “OK” together indicate that the call succeeded. The hidden_ind, required_ind, and sel_ind fields are each zero-or-one indicators: hidden_ind of zero means the field is displayed rather than hidden, required_ind of one means the field is required, and sel_ind of one means the field offers a list of selectable values rather than free-form entry. The presentation_mode field describes the form input type; this example uses “select,” and the method also allows “text,” “textarea,” “radio,” and “checkbox” for fields presented differently. The sel_options array lists the field’s three defined tiers (Bronze, Silver, and Gold) in full for this example; a field with a larger or smaller set of selectable values would return a correspondingly different number of entries. Because the sample call requested translations for one locale, locale_no ten, the supp_field_translations array contains exactly one entry, itself carrying a translated copy of sel_options; a call requesting more locales would return one translation entry per locale. This example leaves out fields that have no selection options at all, in which case sel_ind would be zero and sel_options would not be populated, and it leaves out the case where include_translations is left at its default of false, in which case the supp_field_translations key would not appear.

TOP
  • Was this article helpful?