create_supp_field_m Sample Call and Response
This example shows a client creating a new supplemental account field that presents the account holder with a set of predefined contact-preference options. It is based on the create_supp_field_m method as defined in methods_m_r73.yml, Admin Tools API. This method creates a supplemental field on the account, which is distinct from create_supp_obj_field_m, which creates a supplemental field on a product-level object such as a plan.
This example includes every required field, plus a representative set of optional fields describing a select-style field with three selection options. It does not attempt to show every optional field the method accepts.
Sample call
{
"rest_call": "create_supp_field_m",
"output_format": "json",
"client_no": 700123,
"auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"field_name": "Preferred Contact Method",
"field_desc": "Indicates how the account holder prefers to be contacted regarding billing matters.",
"field_order": 5,
"required_ind": 0,
"hidden_ind": 0,
"sel_ind": 1,
"presentation_mode": "select",
"min_no_sel": 1,
"max_no_sel": 1,
"display_text": ["Email", "Phone", "Postal Mail"],
"option_value": ["EMAIL", "PHONE", "MAIL"],
"option_value_order": [1, 2, 3]
}
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 three required fields are field_name, field_order, and presentation_mode. This example sets presentation_mode to "select," one of the valid form input types alongside text, textarea, radio, and checkbox. Setting sel_ind to one indicates the field offers selection options, and required_ind and hidden_ind are both set to zero, meaning the field is optional for the account holder to complete and is displayed rather than hidden. Because presentation_mode is select, display_text, option_value, and option_value_order become required in practice: each is declared in the method as its own repeatable field rather than as one nested group, so this example represents the three selection options as three parallel arrays, position by position, rather than as an array of three combined objects. The first position pairs the display text "Email" with the option value "EMAIL" and a display order of one, and the second and third positions follow the same pattern for "Phone" and "Postal Mail." min_no_sel and max_no_sel are both set to one, meaning the account holder must choose exactly one option.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"field_name": "Preferred Contact Method"
}
An error_code of zero, paired with an error_msg of “OK,” indicates that Aria created the supplemental account field successfully. The field_name field echoes back the name of the field that was created. The method’s returns block consists only of these three fields, so there is no additional output to show.