Skip to main content
Aria Knowledge Central

get_supp_fields_m Sample Call and Response

This example shows a call that retrieves every client-defined supplemental account field for a client, based on the get_supp_fields_m method defined in methods_m_r73.yml.

This example covers the full, unfiltered list behavior of this method, including one field-level translation, and it does not cover the single-field lookup that the related get_supp_field_details_m method performs.

Sample call

{
  "rest_call": "get_supp_fields_m",
  "output_format": "json",
  "client_no": 30215,
  "auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "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; they are not part of the yml’s arguments block, but every sample call includes them, and output_format requests a JSON response. The client_no and auth_key fields are required for every call. This method takes no field-name or filter argument at all; it always returns the complete set of supplemental fields defined for the client, which is what distinguishes its scope from get_supp_field_details_m, a method that requires a specific field_name and returns details for only that one field. The locale_no and locale_name fields are an alternative pair (a caller supplies one or the other, never both) that identify which locale’s translations to retrieve; 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_translation array for each field in the specified locale.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "supp_fields": [
    {
      "field_name": "loyalty_tier",
      "field_desc": "Customer loyalty program tier",
      "field_order": 1,
      "supp_field_translation": [
        {
          "locale_no": 10,
          "locale_name": "fr_FR",
          "field_name": "niveau_de_fidelite",
          "field_desc": "Niveau du programme de fidelite du client",
          "field_order": 1
        }
      ]
    },
    {
      "field_name": "preferred_contact_method",
      "field_desc": "Customer's preferred method of contact",
      "field_order": 2,
      "supp_field_translation": [
        {
          "locale_no": 10,
          "locale_name": "fr_FR",
          "field_name": "methode_de_contact_preferee",
          "field_desc": "Methode de contact preferee du client",
          "field_order": 2
        }
      ]
    },
    {
      "field_name": "referral_source",
      "field_desc": "Source that referred the customer",
      "field_order": 3,
      "supp_field_translation": [
        {
          "locale_no": 10,
          "locale_name": "fr_FR",
          "field_name": "source_de_recommandation",
          "field_desc": "Source ayant recommande le client",
          "field_order": 3
        }
      ]
    }
  ]
}

An error_code of zero and an error_msg of “OK” together indicate that the call succeeded. The supp_fields array holds one entry per supplemental account field defined for the client; this example shows three representative entries (loyalty_tier, preferred_contact_method, and referral_source), and an actual client could have more or fewer fields defined, so the array shown here is illustrative, not exhaustive. Each entry’s nested supp_field_translation array holds one entry per requested locale; because the sample call asked for only one locale (locale_no ten), each field shows exactly one translation entry rather than several. This example leaves out clients that have no supplemental fields defined at all, in which case supp_fields would be returned as an empty array, and it leaves out the case where include_translations is left at its default of false, in which case the supp_field_translation key would not appear.

TOP
  • Was this article helpful?