门户中的用户类型
用户类型是一个标签,用于标识将通过门户访问CRM模块的用户。您可以为用户类型配置权限,以启用或限制对CRM帐户中数据的访问。门户用户类型的一些示例包括供应商、客户、顾问、客户、合作伙伴或经销商。
获取门户用户类型
目的
获取您组织门户中可用的用户类型。
端点
- GET /settings/portals/{portal_name}/user_type
- GET /settings/portals/{portal_name}/user_type/{user_type_id}
请求详情
请求 URL
获取所有用户类型 - {api-domain}/crm/{version}/settings/portals/{portal_name}/user_type
获取特定用户类型 - {api-domain}/crm/{version}/settings/portals/{portal_name}/user_type/{user_type_id}
标题
授权: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
范围
scope=ZohoCRM.settings.clientportal.ALL
(或)
Scope=ZohoCRM.settings.clientportal.READ
示例请求
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/portals/PortalsAPItest200/user_type/3652397000006231003"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"响应 JSON
- default
表示用户类型是否为门户的默认类型。
- personality_module
配置用户类型的模块的 API 名称和 ID。
- name
用户类型的名称。
- active
布尔键,指示用户类型是否活跃。
- no_of_users
在门户中分配了此用户类型的用户数量。
- modules
此用户类型可用模块的详细信息。这个JSON数组还包含此用户类型可以访问的“字段”、“布局”、“视图”(列表视图或画布视图)的详细信息,以及授予的权限,例如编辑、创建、查看等。
可能的错误
- INVALID_DATAHTTP 400
门户名称无效。
解决方法:在请求中指定正确的门户名称。请参阅获取门户 API响应中的键“name”。 - NO_PERMISSIONHTTP 403
您没有“管理门户”和“管理门户Users”的权限。
解决方法:联系您的管理员。
示例响应
Copied{
"user_type": [
{
"default": true,
"personality_module": {
"plural_label": "Contacts",
"api_name": "Contacts",
"id": "3652397000000002179"
},
"name": "Vendor",
"active": true,
"id": "3652397000006231003",
"no_of_users": 2,
"modules": [
{
"plural_label": "Contacts",
"shared_type": "private",
"api_name": "Contacts",
"permissions": {
"view": true,
"edit": false,
"edit_shared_records": false,
"create": false,
"delete": false
},
"id": "3652397000000002179",
"filters": null,
"fields": [
{
"read_only": false,
"api_name": "Owner",
"id": "3652397000000002485"
}....
],
"layouts": [
{
"display_label": "Standard",
"name": "Standard",
"id": "3652397000000091033"
}
],
"views": {
"display_label": "Default List View",
"name": "All_Contacts",
"id": "3652397000000087529",
"type": "custom_view"
}
}
]
}
]
}