[POST] .../v1/firmgroup/add
Creates a new group enterprises. Use this method to create a firm group before assigning companies to it. It returns new_id, validates required name with maximum length 150 and verifies parent_id when a non-root parent is supplied. The caller must have firm group add permission; missing body, invalid name, denied access, missing parent group and storage errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | String | Required | Firm group name. Maximum length is 150 characters. |
| parent_id | Int64 | Optional | Parent firm group ID. Use 0 or omit the field to create a root group. |
Request Example
{
"parent_id": 0,
"name": "Retail group"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Insert | Created record result. |
Response Example
{
"ok": true,
"result": {
"new_id": 1
}
}