更新用户组
目的
更新用户组。
端点
- PUT /settings/user_groups/{user_group_ID}
请求详情
请求 URL
{api-domain}/crm/{version}/settings/user_groups/{user_group_id}
标题
授权:Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
范围
scope=ZohoCRM.settings.user_groups.UPDATE
示例请求
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/user_groups/3652397000009949005"
-X PUT
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"输入 JSON
- 名称字符串,必填
用户组的名称。接受字母和数字字符。请注意,每个用户组的名称必须唯一。
- description字符串,可选
用户组的描述。
- sourceJSON 数组,必填
此数组中的每个 JSON 对象包含以下键:
- type - 字符串,必填 - 你想要添加到用户组中的成员类型。可能的值有 users(用户)、roles(角色)、groups(组)以及 territories(辖区)。
- source - JSON 对象,必填 - 你想要添加到用户组中的用户、组、角色或辖区的 API 名称和 ID。如果你的 "type" 为 "roles",这里只需提供角色的详细信息。
- subordinates - 布尔值,选填 - 当你的类型为 "roles" 或 "territories" 时,该键表示你是否也希望将下属角色或子辖区分配给该用户组。
- _delete - 布尔值,当你想要删除成员时必填 - 如果值为 "true",则从用户组中删除该成员。
示例输入
Copied{
"user_groups": [
{
"name": "test group",
"description": "my group",
"sources": [
{
"source": {
"name": "Patricia Boyle",
"id": "3652397000000186017"
},
"type": "users"
},
{
"source": {
"name": "Manager",
"id": "3652397000000026008"
},
"type": "roles",
"subordinates": true
},
{
"source": {
"name": "New York",
"id": "3652397000007622003"
},
"type": "territories",
"subordinates": true
},
{
"source": {
"name": "Deborah Gill",
"id": "3652397000000281001"
},
"type": "users",
"_delete":true
}
]
}
]
}可能的错误
- INVALID_DATAHTTP 400
- 角色或区域ID无效。
- 用户组ID无效。
解决方法:请参考响应中的“details”键以获取具体错误,并相应地进行修正。
- NO_PERMISSIONHTTP 403
您没有权限更新用户组。
解决方法:请联系您的管理员以获取“管理群组”权限,从而可以创建用户组。
示例回复
Copied{
"user_groups": [
{
"code": "SUCCESS",
"details": {
"id": "3652397000009949005"
},
"message": "User Group Updated successfully",
"status": "success"
}
]
}