create_product_field_category_m Sample Call and Response
This example shows a call to create_product_field_category_m that creates a new product field category, which groups supplemental object fields together and associates that group with one or more plans. It is based on methods_m_r73.yml, Admin Tools API.
This example covers the category name along with the plans and supplemental fields assigned to it at creation time; it does not cover the plan_directive or field_directive values, since the yml leaves their accepted values undocumented and they are more relevant to later edit operations than to an initial creation call.
Sample call
{
"rest_call": "create_product_field_category_m",
"output_format": "json",
"client_no": 10023,
"auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"field_category_name": "Hardware Warranty Details",
"assign_category_plans": [
{
"plan_no": 4021
}
],
"assign_category_fields": [
{
"field_no": 9105
},
{
"field_no": 9106
}
]
}
The fields rest_call and output_format are REST-layer additions that sit outside the method’s own documented arguments in the yml; you supply rest_call with the method name and output_format with json to request a JSON response. The field_category_name field is the only required argument beyond the standard client_no and auth_key credentials; the yml notes that this field also functions as the client-defined identifier for the category. The assign_category_plans array associates the new category with an existing plan by its Aria-assigned plan_no; the yml documents an alternative client_plan_id field for the same array, but only one of plan_no or client_plan_id is required per entry, and this example uses plan_no. Similarly, the assign_category_fields array associates two existing supplemental object fields with the category by their Aria-assigned field_no values, using field_no in preference to the alternative client-defined field_name.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"field_category_no": 3312
}
An error_code value of zero, together with an error_msg value of "OK", indicates that Aria created the product field category successfully. The field_category_no value is the Aria-assigned unique identifier for the newly created category. With more entries, assign_category_plans and assign_category_fields would simply contain additional objects following the same pattern shown here. This example does not attempt to show a failure response.