Skip to main content
Aria Knowledge Central

create_supp_obj_field_m Sample Call and Response

This example shows a client creating a new supplemental product field that lets a plan carry a selectable warranty coverage level. It is based on the create_supp_obj_field_m method as defined in methods_m_r73.yml, Admin Tools API. This method creates a supplemental field on a product-level object such as a plan, inventory item, service code, or usage type, which is distinct from create_supp_field_m, which creates a supplemental field on the account itself.

This example includes the required field, plus a representative set of optional fields describing a select-style field with three selection options, one field category assignment, and an object type of Plan. It does not attempt to show every optional field the method accepts.

Sample call

{
  "rest_call": "create_supp_obj_field_m",
  "output_format": "json",
  "client_no": 700123,
  "auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "field_name": "Warranty Coverage Level",
  "description": "Indicates the warranty coverage level associated with this plan.",
  "min_no_sel": "1",
  "max_no_sel": 1,
  "datatype": "string",
  "form_input_type": "select",
  "use_allowed_vals_ind": "Yes",
  "option_value": ["Standard", "Extended", "Premium"],
  "option_value_order": [1, 2, 3],
  "allow_instance_override": 1,
  "assign_field_categories": [
    {
      "field_category_no": 415,
      "field_category_directive": 1
    }
  ],
  "object_type": ["Plan"]
}

The rest_call and output_format fields are not part of the method’s own documented arguments. The REST layer adds them to every call: rest_call names the method being invoked, and output_format requests a JSON response rather than the default WDDX format. Within the method’s own arguments, client_no and auth_key identify and authenticate the client making the call. The only required field is field_name. As documented in the yml, min_no_sel carries a string type while max_no_sel carries an int type, an inconsistency this example preserves rather than corrects. form_input_type is set to "select," one of the valid values alongside checkbox, radio, text, and textarea, and use_allowed_vals_ind is set to "Yes," meaning the field is restricted to the predefined values supplied in option_value. Since option_value and option_value_order are each declared as their own repeatable field, this example represents the three selection options as two parallel arrays, position by position, rather than as an array of combined objects: "Standard" at display order one, "Extended" at order two, and "Premium" at order three. assign_field_categories identifies one category by its Aria-assigned field_category_no rather than the alternative field_category_name, with field_category_directive set to one, meaning the category is being added rather than removed. allow_instance_override is set to one, meaning the field value can be saved on a specific plan instance assigned to an account rather than only on the product catalog definition. object_type is declared in the yml as a field nested one level deep under its own name, which represents a flat array of the scalar object-type strings rather than an array of one-key objects; this example supplies a single value, "Plan," though the field could carry more than one recognized object type.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "field_no": 91024
}

An error_code of zero, paired with an error_msg of “OK,” indicates that Aria created the supplemental product field successfully. The field_no field returns the Aria-assigned unique identifier for the new field. The method’s returns block consists only of these three fields, so there is no additional output to show.

TOP
  • Was this article helpful?