[POST] .../v1/retailcardgroup/add
Creates a new a customer card group. Use this method to create a customer card group used to organize retail loyalty cards. 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 customer card group add permission; missing body, missing name, invalid parent_id, 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 0 means the root group. |
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
}
}