元数据API
模块元数据 API检索特定模块的元数据,包括:
- 字段(模块中的所有可用字段)
- 布局
- 相关列表
模块元数据
目的
要获取模块的元数据,请在请求中指定其API 名称(例如,Leads,Accounts,Deals)。使用GET - Modules API来检索可用的模块 API 名称。
端点
- GET /settings/modules/{module_API_name}
- {module_API_name} : 您想要检索其元数据的模块的 API 名称。
请求详情
请求 URL
{api-domain}/crm/{version}/settings/modules/{module_api_name}
标题
授权: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
范围
ZohoCRM.settings.ALL 或
ZohoCRM.settings.modules.{operation_type}
可能的操作类型
全部 - 完整数据访问
读取 - 获取模块数据
注意
- 在访问资源时,请参考 Name 关键字在 JSON 数据中的位置。每个模块、字段和相关列表都会有一个 API Name,您可以在第三方集成中使用。例如,如果您想访问潜在客户模块,请使用“Leads”,这是每次访问资源时的 api_Name。Zoho CRM 在创建自定义模块、自定义字段或相关列表标签时会内部生成一个 API Name。请注意,您不能更改默认模块、字段和相关列表的 API Name。您只能更改自定义模块、字段和相关列表的 API Name。
- 生成的 API Name 只能包含字母、数字和下划线。API Name 应以字母开头,且不能有两个连续的下划线或以下划线结尾。
- 响应仅包含用户配置文件有权限查看的模块。
- 当向模块添加新文件上传/图片上传字段时,会添加新模块。
示例请求
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/modules/Leads"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"Copiedresponse = invokeurl
[
url: "https://www.zohoapis.com/crm/v8/settings/modules/Leads"
type: GET
connection:"crm_oauth_connection"
];
info response;Response JSON
- global_search_supported Boolean
表示当前模块是否支持全局搜索。
可能的值:
- true:当前模块支持全局搜索。
- false:当前模块不支持全局搜索。
- deletable Boolean
描述用户是否可以删除当前模块中的记录。
可能的值:
- true: 用户可以删除当前模块中的记录。
- false: 用户不能删除当前模块中的记录。
- description string
表示模块的描述(如果有)。
- creatable Boolean
表示用户是否可以在当前模块中创建记录。
可能的值:
- true: 用户可以在当前模块中创建记录。
- false: 用户不能在当前模块中创建记录。
- inventory_template_supported Boolean
表示模块支持库存模板。该值仅对报价单、Invoices、Purchase Orders和SalesOrders模块为真。
可能的值:
- true: 当前模块支持库存模板。
- false: 当前模块不支持库存模板。
- modified_timeISO8601格式的日期和时间
表示模块属性最后修改的日期和时间。
- plural_label string
表示模块名称的复数形式。例如:Leads。
- singular_label string
表示模块名称的单数形式。例如:Lead。
- has_more_profilesBoolean
表示是否有更多的配置文件可以访问该模块。默认情况下,模块元数据 API 在 "profiles" 键中列出最多 50 个配置文件。如果配置文件超过 50 个,则该值为 true;如果配置文件为 50 个或更少,则该值为 false。
- access_typestring
指定模块的访问类型。
可能的值:- org_based - 默认设置,允许在组织级别进行访问。
- team_based - 访问限制在团队级别权限(如果启用了团队空间功能)。
- private_profile JSON array
表示您创建的 Teams 模块中可用的配置文件。
- recycle_bin_on_deleteBoolean
表示模块中的记录在删除时是否可以移至回收站。
- web_link string
此键与网页标签相关,网页标签被视为模块。网页标签可以从两个来源创建:链接或小部件。此键的值将是网页标签的URL(在链接的情况下)或小部件的URL(在小部件的情况下)。
- presence_sub_menu Boolean
表示模块是否有子菜单。例如,Calls 模块中的 Tasks 是一个子菜单。
可能的值:
- true: 当前模块有子菜单。
- false: 当前模块没有子菜单。
- triggers_supported Boolean
表示模块是否支持来自自定义按钮、工作流、审批等的触发器。
可能的值:
- true: 当前模块支持触发器。例如,联系人,Account等。
- false: 当前模块不支持触发器。例如,活动,动态等。
- id string
表示模块的唯一ID。例如,4150868000000002173
- 可见性整数
表示当前用户对模块的可见性。
- 2- 模块在UI中隐藏,但在API响应中可用
- 1- 模块可见
- 0- 模块隐藏
- -1 - 由于计划降级,模块不可用/被系统本身隐藏。
- convertable Boolean
描述用户是否可以将记录转换为另一种类型的记录。例如:将潜在客户转换为交易。
可能的值:
- true: 用户可以将当前模块中的记录转换为另一种类型的记录。
- false: 用户不能将当前模块中的记录转换为另一种类型的记录。
- viewable Boolean
表示用户是否可以查看当前模块中的记录。
可能的值:
- true: 用户可以查看当前模块中的记录。
- false: 用户不能查看当前模块中的记录。
- editable Boolean
描述用户是否可以编辑当前模块中的记录。
可能的值:
true: 用户可以编辑当前模块中的记录。
false: 用户不能编辑当前模块中的记录。 - emailTemplate_support Boolean
表示模块是否支持使用电子邮件模板。
可能的值:
- true: 模块支持电子邮件模板。
- false: 模块不支持电子邮件模板。
- api_supported Boolean
描述当前模块是否可以通过 API 访问。
可能的值:
- true: 当前模块可以通过 API 访问。例如,Leads,Quotes。
- false: 当前模块不能通过 API 访问。例如,Feeds,Documents 等。
- profiles JSON array
数组中的每个对象代表有权访问该模块的配置文件的详细信息。
例如: {
"name": "Administrator",
"id": "4150868000000026011"
}, - filter_supported Boolean
表示模块是否支持在自定义视图中使用系统定义的过滤器之外的自定义过滤器。
可能的值:
- true: 当前模块支持自定义过滤器。
- false: 当前模块不支持自定义过滤器。
- show_as_tab Boolean
表示模块是否在CRM用户界面中显示为选项卡。
可能的值:
- true: 模块在CRM用户界面中显示为选项卡。例如,联系人、账户等。
- false: 模块不在CRM用户界面中显示为选项卡。例如,任务、链接模块等。
- web_link string
表示模块的网页链接(如果有)。例如,https://extensions.zoho.com/plugin/facebook
- sequence_number integer
表示模块在CRM中的位置。
- api_name string
表示模块的API名称。例如:Leads。
- quick_create Boolean
表示模块是否支持快速创建。
可能的值:
- true: 用户可以在当前模块中使用快速创建添加记录。例如,联系人、账户等。
- false: 用户不能在当前模块中使用快速创建添加记录。例如,动态、预测等。
- modified_by JSON object
表示最后修改模块属性的用户的姓名和ID。
例如:
"modified_by": {
"name": "Patricia Boyle",
"id": "4150868000000225013"
} - generated_type string
表示模块的创建方式。
可能的值:- default: 这是一个标准模块。例如,潜在客户、联系人、账户等。
- linking: 这是一个链接模块,即 MxN 模块。
- subform: 这是一个库存模块中的行项目子表单。
- web: 这是一个网页标签小部件。
- custom: 这是一个自定义模块。
- feeds_required Boolean
表示是否为模块启用了feeds。
可能的值:
true: 当前模块启用了feeds。
false: 当前模块未启用feeds。 - scoring_supported Boolean
表示该模块的记录是否符合评分过程的要求(如果有的话)。
可能的值:
true: 当前模块符合评分过程的要求。
false: 当前模块不符合评分过程的要求。 - webform_supported Boolean
表示模块中的记录是否可以通过网络表单创建。
可能的值:
true: 当前模块支持网络表单。
false: 当前模块不支持网络表单。 - arguments JSON array
表示用于 Web 标签的链接参数。每个对象表示显示名称和参数的值。
例如:
"arguments": [
{
"name": "sample",
"value": "users.city"
}
] - module_name string
表示唯一的模块名称。
- business_card_field_limit integer
表示您可以在名片详情中拥有的字段数量。
注意:名片详情显示在记录的“详细视图”页面上。这也是当您悬停在查找字段上时显示的信息。 - custom_view JSON object
表示为此模块创建的自定义视图的详细信息。如果您传递自定义视图 ID,响应将包含该自定义视图的详细信息。否则,系统将获取该模块中默认视图的详细信息。
- parent_module JSON object
表示父模块的详细信息(如果有)。例如,销售订单是订购商品(子表单模块)的父模块。
- status string
状态参数可用于检索特定类型的模块。
可能的值:
- user_hidden - 对用户隐藏的模块。
- system_hidden - 被系统隐藏的模块。
- scheduled_for_deletion - 计划删除的模块。
- visible - 对用户可见的模块。
- sub_menu_available Boolean
表示该模块是否有子菜单选项。
- actual_plural_label string
表示模块名称的实际复数形式。
- actual_singular_label string
表示模块名称的实际单数形式。
- lookupable Boolean
表示该模块是否可以在其他模块中用作查找字段。
- isBlueprintSupported Boolean
表示模块是否支持蓝图。
- profile_count integer
表示有权访问该模块的配置文件数量。
- public_fields_configured Boolean
表示模块是否配置了公共字段。
可能的错误
- INVALID_MODULE HTTP 400
模块的 API 名称无效。
解决方法:响应中的 key resource_path_index 提供了错误发生的索引。索引 0 从 URL 中的版本号之后开始计算。因此,如果响应中的索引是 2,则表示错误发生在版本号之后的第三个位置。 - INVALID_REQUEST_METHOD HTTP 400
HTTP请求方法类型无效
解决方法:您指定了一个无效的HTTP方法来访问API URL。请指定一个有效的请求方法。请参阅端点部分。 - AUTHORIZATION_FAILED HTTP 400
用户没有足够的权限读取模块详情。
解决方案:用户没有权限检索模块详情。请联系系统管理员。 - OAUTH_SCOPE_MISMATCH HTTP 401
未授权
解决方案:客户端没有 ZohoCRM.settings.modules.READ 范围。创建一个具有有效范围的新客户端。请参阅范围部分。 - NO_PERMISSION HTTP 403
没有读取权限
解决方案:用户没有读取记录的权限。请联系您的系统管理员。 - INVALID_URL_PATTERN HTTP 404
请检查尝试访问的URL是否正确
解决方法: 请求的URL不正确。请指定一个有效的请求URL。请参阅请求URL部分。 - INTERNAL_ERROR HTTP 500
内部服务器错误
解决方案:服务器中出现意外和未处理的异常。请联系支持团队。
示例响应
Copied{
"modules": [
{
"private_profile": null,
"global_search_supported": true,
"activity_badge": "Enabled",
"$field_states": [
"convert_scheduler"
],
"recycle_bin_on_delete": true,
"plural_label": "Leads",
"presence_sub_menu": true,
"chart_view": false,
"id": "5725767000000002175",
"per_page": 10,
"$properties": [
"$approval_state",
"$wizard_connection_path",
"$converted_detail",
"$cpq_executions",
"$currency_symbol",
"$zia_owner_assignment",
"$review",
"$review_process",
"$approval",
"$in_merge",
"$process_flow",
"$orchestration",
"$pathfinder",
"$stop_processing",
"$data_source_details",
"$zia_visions",
"$layout_id",
"$editable",
"$field_states",
"$locked_for_me",
"$sharing_permission"
],
"visibility": 1,
"sub_menu_available": true,
"profiles": [
{
"name": "Administrator",
"id": "5725767000000026011"
},
{
"name": "Standard",
"id": "5725767000000026014"
},
{
"name": "asd",
"id": "5725767000000871001"
}
],
"$on_demand_properties": [
"$blocked_reason",
"$client_portal_invited",
"$client_portal_permission"
],
"kanban_view_supported": true,
"web_link": null,
"lookup_field_properties": {
"fields": [
{
"sequence_number": 1,
"api_name": "Full_Name",
"id": "5725767000000002631"
},
{
"sequence_number": 2,
"api_name": "Company",
"id": "5725767000000002591"
},
{
"sequence_number": 3,
"api_name": "Owner",
"id": "5725767000000002589"
},
{
"sequence_number": 4,
"api_name": "Email",
"id": "5725767000000002599"
},
{
"sequence_number": 5,
"api_name": "Last_Name",
"id": "5725767000000002595"
},
{
"sequence_number": 6,
"api_name": "Created_Time",
"id": "5725767000000002627"
},
{
"sequence_number": 7,
"api_name": "Total_Notes_Added",
"id": "5725767000005100020"
}
]
},
"viewable": true,
"api_name": "Leads",
"public_fields_configured": false,
"module_name": "Leads",
"chart_view_supported": true,
"custom_view": {
"display_value": "All Leads",
"created_time": null,
"access_type": "public",
"criteria": {
"comparator": "equal",
"field": {
"api_name": "Converted__s",
"id": "5725767000000323001"
},
"type": "value",
"value": false
},
"system_name": "ALLVIEWS",
"sort_by": null,
"created_by": null,
"shared_to": null,
"default": true,
"modified_time": "2025-01-23T22:46:41-08:00",
"name": "All Open Leads",
"system_defined": true,
"modified_by": {
"name": "Patricia Boyle",
"id": "5725767000000411001"
},
"id": "5725767000000087501",
"fields": [
{
"api_name": "Full_Name",
"_pin": false,
"id": "5725767000000002631"
},
{
"api_name": "Company",
"_pin": false,
"id": "5725767000000002591"
},
{
"api_name": "Owner",
"_pin": false,
"id": "5725767000000002589"
},
{
"api_name": "Email",
"_pin": false,
"id": "5725767000000002599"
},
{
"api_name": "Last_Name",
"_pin": false,
"id": "5725767000000002595"
},
{
"api_name": "Created_Time",
"_pin": false,
"id": "5725767000000002627"
},
{
"api_name": "Total_Notes_Added",
"_pin": false,
"id": "5725767000005100020"
}
],
"category": "public_views",
"last_accessed_time": "2025-04-15T22:15:13-07:00",
"locked": false,
"sort_order": null,
"favorite": null
},
"parent_module": {},
"status": "visible",
"has_more_profiles": false,
"access_type": "org_based",
"kanban_view": false,
"deletable": true,
"description": null,
"creatable": true,
"filter_status": true,
"modified_time": "2025-04-24T10:32:20-07:00",
"actual_plural_label": "Leads",
"lookupable": true,
"isBlueprintSupported": true,
"related_list_properties": {
"sort_by": null,
"fields": [
"Full_Name",
"Company",
"Email",
"Lead_Source",
"Lead_Status",
"Phone"
],
"sort_order": null
},
"convertable": true,
"editable": true,
"actual_singular_label": "Lead",
"display_field": "Full_Name",
"search_layout_fields": [
"Owner",
"Company",
"Email",
"Phone",
"Lead_Source",
"Full_Name"
],
"show_as_tab": true,
"sequence_number": 2,
"singular_label": "Lead",
"api_supported": true,
"quick_create": true,
"modified_by": {
"name": "Patricia Boyle",
"id": "5725767000000411001"
},
"generated_type": "default",
"feeds_required": false,
"arguments": [],
"profile_count": 3,
"business_card_field_limit": 5,
"territory": {
"name": "All Territories",
"id": "0",
"subordinates": false
}
}
]
}