[POST] .../v1/firmgroup/edit
Edits group enterprises. Use this method to rename a firm group or move it within the firm group tree. It requires a positive id, rejects parent_id equal to id, validates name length, verifies the new parent group and prevents moving a group under its own descendant. The caller must have firm group edit permission; missing body, invalid id, invalid parent_id, hierarchy-cycle errors, denied access, missing records and storage errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | Firm group ID. |
| name | String | Optional | Firm group name. Maximum length is 150 characters. |
| parent_id | Int64 | Optional | Parent firm group ID. Use 0 to move the group to the root level. |
Request Example
{
"id": 1,
"parent_id": 0,
"name": "Retail companies"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1
}
}