布局元数据
目的
要检索与您的Zoho CRM帐户中特定模块相关的所有布局或特定布局的详细信息。
端点
- GET /settings/layouts?module={module_API_name}
- GET /settings/layouts/{layout_ID}?module={module_API_name}
- {module_api_name} : 您想要检索其布局的模块的 API 名称。
- {layout_ID} : 您想要获取的特定布局的唯一ID。
请求详情
请求 URL
{api-domain}/crm/{version}/settings/layouts
支持的模块
潜在客户,Account,联系人,交易,活动,任务,案例,事件,通话,解决方案,产品,Vendors,价格表,报价单,Sales Orders,采购Orders,Invoices,自定义,预约和服务。
标题
授权: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
范围
ZohoCRM.settings.layouts.READ (或)
ZohoCRM.settings.layouts.ALL (或)
ZohoCRM.settings.ALL
参数
- module字符串,必填
指定所需模块的 API 名称。使用 GET - 模块元数据 API 来检索所有可用的模块 API 名称。例如,Leads、Contacts、Account、Deals 等等。
注意
- 在交易模块中,“forecast_category”键从字符串更改为JSON对象。
- 在事件模块中,为“Remind_At”键引入了一种新的数据类型“multireminder”。
- 当启用管道功能时,响应中会添加一个新字段“Pipeline”。
管道内的pick_list_values表示管道中可用的阶段。 - 当您在模块中创建了一个向导时,“fields”数组将包含一个向导对象。
- “fields”数组还将分别包含用于图像上传、多选查找和多选用户查找字段的对象,其数据类型分别为imageupload、multiselectlookup和mutliuserlookup。
- 只有在您启用这些功能时,评分摘要和访问摘要相关的部分才会在响应中呈现。
- 对于Users模块,
- 时区偏移量会根据日光设置而变化。因此,选择列表字段的display_value也会相应更改。
- 在Country_Locale字段中,如果启用了翻译,选择列表值将被翻译。
示例请求
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/layouts?module=Leads"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"Copiedresponse = invokeurl
[
url: "https://www.zohoapis.com/crm/v8/settings/layouts?module=Leads"
type: GET
connection:"crm_oauth_connection"
];
info response;响应 JSON
- created_timestring
表示当前布局的创建日期和时间。
- convert_mappingJSON object
表示用于将记录从一个模块转换到另一个模块的基本布局详细信息。
- modified_time string
表示布局最后修改的日期和时间。
- visible Boolean
表示当前布局是否对用户可见。
true: 当前布局对用户可见。
false: 当前布局对用户不可见。 - name string
表示布局的名称。
- modified_byJSON object
表示最后修改布局的用户的姓名和ID。
- profiles JSON array
数组中的每个对象表示具有访问当前布局权限的配置文件的名称和ID。当用户没有模块自定义权限时,此键的值将为null。
- _default_viewJSON object
当向导布局被设置为模块的创建视图中的默认布局时,此键被启用。它包含每个配置文件的默认布局的ID和名称。
- _default_assignment_view JSON object
当画布布局被设置为模块的详细视图中的默认布局时,此键被启用,即在查看模块中的记录时。标准布局是默认布局视图。
- id string
表示布局的唯一ID。
- created_byJSON object
表示创建布局的用户的姓名和ID。
- api_nameJSON array
表示布局的API名称。
- sectionsJSON array
数组中的每个对象代表当前布局中各部分的详细信息。
- display_labelstring
表示该部分的显示名称。
- modestring
表示布局中部分的模式。
- 可能的值:
- 所有模块除外:
- default_create:该部分用于默认创建模式。
- quick_create:该部分用于快速创建模式。
- business_card:该部分用于名片模式。
- 事件模块:
- create:该部分用于创建模式。
- view:该部分用于查看模式。
- quick_view:该部分用于快速查看模式。
- 子表单:
- create:该部分用于创建模式。
- view:该部分用于查看模式。
- 向导:
- create:该部分用于创建模式。
- sequence_numberinteger
表示该部分在布局中的位置。
- isSubformSectionBoolean
表示该部分是否为子表单部分。
可能的值:
- true: 当前部分是子表单部分。
- false: 当前部分不是子表单部分。
- actions_allowedJSON object
表示该部分允许的一组操作。
- add_fieldBoolean
表示是否可以向该部分添加字段。
- renameBoolean
表示该部分是否可以重命名。
- change_tab_traversalBoolean
表示是否可以更改该部分的标签顺序。
- reorderBoolean
表示是否可以更改该部分的顺序。
- deleteBoolean
表示该部分是否可以删除。
- remove_fieldBoolean
表示是否可以从该部分中移除字段。
- change_column_countBoolean
表示是否可以更改部分中的列数。
- tab_traversal string
表示在按下“Tab”按钮时光标在一个部分中的字段之间移动的顺序。此键有助于理解部分内的导航流。
可能的值:
- top_to_bottom : 光标从顶部字段移动到底部字段。
- left_to_right : 光标从左侧字段移动到右侧字段。
- api_namestring
表示该部分的API名称。
- namestring
表示当前部分的显示名称。
- generated_typestring
表示该部分是系统定义的还是自定义的。
- typestring
表示该部分在布局中是否使用或未使用。
- show_business_cardBoolean
表示是否必须在布局中显示名片部分。
可能的值:
- true: 名片部分显示在布局中。
- false: 名片部分不显示在布局中。
- fieldsJSON array
数组中的每个对象代表该部分中一个字段的详细信息。请参阅GET - 字段元数据 API了解有关此数组中键的更多信息。
- searchableBoolean
表示该字段是否支持搜索。
可能的值:
- true : 该字段支持搜索。
- false : 该字段不支持搜索。
- enable_colour_codeBoolean
表示是否为该字段启用了颜色编码。
可能的值:
- true : 为该字段启用了颜色编码。
- false : 未为该字段启用颜色编码。
- status string
表示布局的当前状态。
可能的值:
- active:布局当前处于活动状态并正在使用。
- inactive:布局当前处于非活动状态并且未在使用。
- downgrade:布局已被降级。
- hidden:布局对用户隐藏。
- source string
表示布局的来源。此键有助于了解布局的创建或来源。
可能的值:
- CRM:布局是在Zoho CRM中创建的。
- platform_plugin:布局是通过平台插件创建的。
- marketplace_plugin:布局是通过市场插件创建的。
- campaign_integration:布局是通过活动集成创建的。
可能的错误
- REQUIRED_PARAM_MISSINGHTTP 400
错误请求
解决方法:您未指定必需的参数。请参阅参数部分。 - INVALID_MODULEHTTP 400
给定的模块名称似乎无效
解决方法:您指定了一个无效的模块名称,或者没有标签权限,或者该模块可能已从可用模块中删除。请指定一个有效的模块 API 名称。使用 GET - 模块元数据 API 获取模块的 API 名称。 - INVALID_MODULEHTTP 400
给定的模块在API中不受支持
解决方案: 当前API不支持Documents和Projects等模块。(一旦这些模块被支持,此错误将不会显示)。请指定一个有效的模块API名称。使用GET - 模块元数据API来获取模块的API名称。 - INVALID_REQUEST_METHODHTTP 400
HTTP请求方法类型无效
解决方案:您指定了一个无效的HTTP方法来访问API URL。请指定一个有效的请求方法。请参阅端点部分。 - AUTHORIZATION_FAILEDHTTP 400
用户没有足够的权限读取布局数据
解决方案:用户没有权限检索布局数据。请联系系统管理员。 - OAUTH_SCOPE_MISMATCHHTTP 401
未经授权
解决方案:客户端没有ZohoCRM.settings.layouts.READ范围。创建一个具有有效范围的新客户端。请参阅范围部分。 - NO_PERMISSIONHTTP 403
无权限读取
解决方案:用户没有读取布局数据的权限。请联系系统管理员。 - INVALID_URL_PATTERNHTTP 404
请检查尝试访问的URL是否正确
解决方案:请求的URL不正确。请指定一个有效的请求URL。请参阅请求URL部分。 - INTERNAL_ERRORHTTP 500
内部服务器错误
解决方案:服务器中出现意外且未处理的异常。请联系支持团队。
示例响应
Copied{
"layouts": [
{
"has_more_profiles": false,
"created_time": null,
"convert_mapping": {
"Contacts": {
"name": "Standard",
"id": "2276164000000095059"
},
"Deals": {
"name": "Standard",
"id": "2276164000000095023",
"fields": [
{
"api_name": "Amount",
"field_label": "Amount",
"id": "2276164000000000517",
"required": false
},
{
"api_name": "Deal_Name",
"field_label": "Potential Name",
"id": "2276164000000000519",
"required": true
},
{
"api_name": "Closing_Date",
"field_label": "Closing Date",
"id": "2276164000000000521",
"required": false
},
{
"api_name": "Stage",
"field_label": "Stage",
"id": "2276164000000000525",
"required": true
}
]
},
"Accounts": {
"name": "Standard",
"id": "2276164000000095047"
}
},
"visible": true,
"created_for": null,
"profiles": [
{
"_default_assignment_view": {
"name": "Standard",
"id": "2276164000000095055",
"type": "layout"
},
"default": true,
"name": "Administrator",
"id": "2276164000000015972",
"_default_view": {
"name": "Standard",
"id": "2276164000000095055",
"type": "layout"
}
}
],
"source": "crm",
"created_by": null,
"sections": [
{
"isSubformSection": false,
"type": "used",
"display_label": "Lead Image",
"mode": "default_create",
"sequence_number": 1,
"actions_allowed": {
"add_field": false,
"rename": false,
"change_tab_traversal": false,
"reorder": false,
"delete": false,
"remove_field": false,
"change_column_count": false
},
"tab_traversal": "left_to_right",
"api_name": "Record_Image__s",
"column_count": 1,
"name": "Record Image",
"generated_type": "default",
"id": "2276164000000266005",
"fields": [
{
"associated_module": null,
"webhook": false,
"operation_type": {
"web_update": true,
"api_create": true,
"web_create": true,
"api_update": true
},
"colour_code_enabled_by_system": false,
"field_label": "Lead Image",
"tooltip": null,
"type": "used",
"field_read_only": false,
"customizable_properties": [
"image_enable",
"add_to_other_layouts"
],
"required": false,
"subform_properties": null,
"display_label": "Record Image",
"read_only": false,
"association_details": null,
"businesscard_supported": false,
"multi_module_lookup": {},
"id": "2276164000000179001",
"created_time": null,
"filterable": false,
"visible": true,
"profiles": [
{
"permission_type": "read_write",
"name": "Administrator",
"id": "2276164000000015972"
},
{
"permission_type": "read_write",
"name": "Standard",
"id": "2276164000000015975"
}
],
"view_type": {
"view": true,
"edit": true,
"quick_create": false,
"create": true
},
"separator": false,
"searchable": false,
"external": null,
"api_name": "Record_Image",
"unique": {},
"enable_colour_code": false,
"pick_list_values": [],
"system_mandatory": false,
"virtual_field": false,
"json_type": "string",
"crypt": null,
"created_source": "default",
"display_type": -1,
"ui_type": 66,
"validation_rule": null,
"modified_time": null,
"public": false,
"section_id": 5,
"email_parser": {
"fields_update_supported": false,
"record_operations_supported": false
},
"currency": {},
"custom_field": false,
"lookup": {},
"convert_mapping": {
"Contacts": null,
"Deals": null,
"Accounts": null
},
"rollup_summary": {},
"length": 255,
"column_name": "PHOTO_FILEID",
"display_field": false,
"pick_list_values_sorted_lexically": false,
"default_value": null,
"sortable": false,
"sequence_number": 1,
"global_picklist": null,
"history_tracking": null,
"data_type": "profileimage",
"formula": {},
"additional_column": null,
"decimal_place": null,
"mass_update": false,
"multiselectlookup": {},
"auto_number": {}
}
],
"properties": null
},
.
.
.
],
"display_label": "Standard",
"show_business_card": true,
"actions_allowed": {
"edit": true,
"rename": true,
"clone": true,
"downgrade": false,
"delete": false,
"deactivate": false,
"set_layout_permissions": true
},
"modified_time": "2024-12-16T15:32:24+05:30",
"api_name": "Standard__s",
"name": "Standard",
"modified_by": {
"name": "Patricia",
"id": "2276164000000471001"
},
"generated_type": "system",
"id": "2276164000000095055",
"status": "active"
}
]
}