Skip to main content
Aria Knowledge Central

edit_item_class_m Sample Call and Response

This example edits an existing inventory item class, updating its name, description, and active status. It is based on the edit_item_class_m definition in methods_m_r73.yml, the Admin Tools API method file for the Aria release 73 build.

This example covers the fields most commonly used to update an inventory item class. It does not cover reassigning the class to a different parent class, since the parent_class field is optional and not part of this particular story.

Sample call

{
  "rest_call": "edit_item_class_m",
  "output_format": "json",
  "client_no": 100589,
  "auth_key": "8f3e2c9a1b7d4f6e9c2a5b8d1e4f7a2c",
  "class_no": 3021,
  "class_name": "Premium Hardware",
  "class_desc": "Inventory item class for premium hardware add-ons sold alongside subscription plans.",
  "active_ind": 1
}

The rest_call and output_format fields are REST-layer envelope fields and are not part of the method arguments defined in the yml file itself. client_no and auth_key are the standard Aria-assigned client identifier and authentication key that every call requires.

The class_no field identifies which inventory item class to edit. The yml file defines class_no and the client-defined client_inventory_class_id as an alternative required pair, so only one of the two needs to appear in a given call; this example uses class_no, the Aria-assigned numeric identifier. The class_name field renames the class, and class_desc updates its description. The active_ind field sets the class as active in this example; leaving it out would leave the current active status unchanged.

This example leaves out the parent_class field, which lets you associate the class with a parent inventory item class. It also leaves out client_inventory_class_id, since class_no already identifies the class being edited.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "class_no": 3021
}

An error_code of zero with an error_msg of “OK” indicates that Aria successfully edited the inventory item class. The class_no field in the response echoes back the identifier of the class that was edited, confirming which record the changes were applied to.

TOP
  • Was this article helpful?