create_item_class_m Sample Call and Response
This example shows a call to create_item_class_m that creates a new inventory item class, used to organize inventory items such as physical goods or non-subscription offerings into a category. It is based on methods_m_r73.yml, Admin Tools API.
This example covers the class name, description, active status, a client-defined identifier, and an association to an existing parent class; it does not cover the inventory items that are later assigned to this class, since that assignment happens separately when the items themselves are created or edited.
Sample call
{
"rest_call": "create_item_class_m",
"output_format": "json",
"client_no": 10023,
"auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"class_name": "Hardware Accessories",
"class_desc": "Physical accessory items sold alongside subscription hardware plans",
"active_ind": 1,
"client_inventory_class_id": "HW-ACC-2026",
"parent_class": [
{
"class_no": 5002
}
]
}
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 class_name field is the only required argument beyond the standard client_no and auth_key credentials, so this example also includes four representative optional fields: class_desc, a free-text description of the class; active_ind, which is set to 1 to mark the class as active (0 would mark it inactive); client_inventory_class_id, a client-assigned identifier for the class; and parent_class, which associates this new class with an existing, broader parent class. The yml documents parent_class as a nested structure with a single field, class_no, and its own description shows the wire format as an indexed array (parent_class[0]=1002, parent_class[1]=1003, and so on), so this example represents it as a JSON array of objects, each containing one class_no value, rather than assuming only one parent class is possible.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"class_no": 5031
}
An error_code value of zero, together with an error_msg value of "OK", indicates that Aria created the item class successfully. The class_no value is the Aria-assigned unique identifier for the newly created item class. Since class_desc, active_ind, client_inventory_class_id, and parent_class are all optional, a minimal call could omit any of them and still succeed; if more than one parent class were associated, the parent_class array would simply contain additional {"class_no": ...} entries. This example does not attempt to show a failure response.