[POST] .../v1/retailcustomergroup/add
Creates a new group customers. Use this method to create a retail customer group in the customer segmentation hierarchy. The request requires name, accepts parent_id as 0 for a root group, validates that name length does not exceed 150 characters and returns new_id for the created group. The method checks the current request user and requires retail customer group add permission; missing body, missing name, unknown parent group, denied permission and storage errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | String | Required | Group name. |
| parent_id | Int64 | Optional | Parent group ID. Default value is 0. |
Request Example
{
"name": "string",
"parent_id": 1
}
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
}
}