Skip to main content
Aria Knowledge Central

edit_coa_m Sample Call and Response

This example shows a client editing an existing, client-defined Chart of Accounts entry, updating its code and description. It is based on the edit_coa_m method as defined in methods_m_r73.yml, Admin Tools API.

This example includes the required identifier for the entry being edited, plus the two optional fields available for updating it. It does not cover creating a new entry, which is the role of the separate add_coa_m method.

Sample call

{
  "rest_call": "edit_coa_m",
  "output_format": "json",
  "client_no": 10023,
  "auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "coa_id": 4501,
  "coa_code": "REV-1000-A",
  "coa_description": "Subscription Revenue - Enterprise Plans (Annual)"
}

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, and coa_id is the required, Aria-assigned identifier of the entry being edited. The optional coa_code and coa_description fields are both included here to show the entry being renamed to reflect a more specific annual-plan code and description; you may supply either one alone if you only need to update one of the two.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "coa": {
    "coa_id": 4501,
    "coa_code": "REV-1000-A",
    "coa_description": "Subscription Revenue - Enterprise Plans (Annual)"
  }
}

An error_code of zero, paired with an error_msg of “OK,” indicates that Aria updated the entry successfully. The coa object represents the single Chart of Accounts entry just edited and is not a repeatable array, because each call to edit_coa_m updates exactly one entry, the same single-wrapper-object pattern seen elsewhere in this family for fields that represent exactly one instance of something the parent only ever has one of. The coa_id, coa_code, and coa_description fields in the response echo back the updated values. This example leaves out nothing else from the method’s return structure; the full response consists only of the error indicators and the single coa object shown here.

TOP
  • Was this article helpful?