Appearance
PATCH
/admin/user-group/user-groups/{groupId}Required scope:
viskan:usergroup:updateUpdates a user group.
Parameters
Path parameters
groupId integerThe ID of the group to update.
Request body
JSON
{
"groupName": "Customer service",
"active": true,
"reports": {
"added": [
10000,
10001
],
"removed": [
10002
]
},
"roles": {
"added": [
"currency"
],
"removed": [
"customer:update"
]
},
"warehouses": {
"added": [
{
"warehouseCompanyId": 0,
"warehouseId": 1
}
],
"removed": [
{
"warehouseCompanyId": 0,
"warehouseId": 1
}
]
},
"returnReasons": {
"added": [
{
"returnReasonId": 1
}
],
"removed": [
12345
]
},
"webStores": {
"added": [
{
"storeId": 1
}
],
"removed": [
12345
]
}
}
Response
The user group was successfully updated.
| Error code | Description |
|---|---|
group-already-have-access-to-report | The user group already have access to the one of the given reports. |
group-already-have-access-to-role | The user group already have access to the one of the given roles. |
group-name-is-unavailable | The user group you are trying to use is already used by another user group. |
user-group-not-found | No user group was found with the given ID. |