Meta Data APIs
Returns the metadata for fields, layouts, and related lists for the specified module. It lists the entire fields available and related list for that module.
Module Metadata
Purpose
To get the metadata for a specific module. Specify the API name of the module, such as Leads, Accounts or Deals in your API request.
Request URL
https://www.zohoapis.com/crm/v2/settings/modules/{module_api_name}
module_api_name - The API name of the module
Request Method
GET
Scope
scope=ZohoCRM.settings.modules.read
(or)
scope=ZohoCRM.settings.modules.all
(or)
scope=ZohoCRM.settings.all
Possible Errors
| HTTP Status | Error Code | Message | Reason |
|---|---|---|---|
| 400 | INVALID_MODULE | The module name given seems to be invalid | Invalid module name or no tab permission, or the module could have been removed from the organized module |
| 400 | INVALID_MODULE | The given module is not supported in API | The modules such as Documents and Projects are not supproted in the current API. (This error will not be shown, once these modules are been supported.) |
Sample Request
curl "https://www.zohoapis.com/crm/v2/settings/modules/Leads"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf" Sample Response
{
"modules": [
{
"global_search_supported": true,
"kanban_view": false,
"deletable": true,
"creatable": true,
"filter_status": true,
"modified_time": "2019-02-05T11:33:03+05:30",
"plural_label": "Leads",
"presence_sub_menu": true,
"id": "3652397000000002175",
"related_list_properties": {
"sort_by": null,
"fields": [
"First_Name",
"Last_Name",
"Full_Name",
"Company",
"Email",
"Lead_Source",
"Lead_Status",
"Phone"
],
"sort_order": null
},
"$properties": [
"$converted",
"$approved",
"$converted_detail",
"$currency_symbol",
"$approval",
"$process_flow"
],
"per_page": 10,
"visibility": 1,
"convertable": true,
"editable": true,
"emailTemplate_support": true,
"profiles": [
{
"name": "Administrator",
"id": "3652397000000026011"
},
{
"name": "Standard",
"id": "3652397000000026014"
}
],
"filter_supported": true,
"display_field": "Full_Name",
"search_layout_fields": [
"Owner",
"Company",
"Email",
"Phone",
"Lead_Source",
"Full_Name"
],
"kanban_view_supported": true,
"web_link": null,
"sequence_number": 2,
"singular_label": "Lead",
"viewable": true,
"api_supported": true,
"api_name": "Leads",
"quick_create": true,
"modified_by": {
"name": "Patricia Boyle",
"id": "3652397000000186017"
},
"generated_type": "default",
"feeds_required": false,
"scoring_supported": true,
"arguments": [],
"module_name": "Leads",
"business_card_field_limit": 5,
"custom_view": {
"display_value": "All Leads",
"shared_type": null,
"criteria": {
"comparator": "equal",
"field": "$converted",
"value": false
},
"system_name": "ALLVIEWS",
"shared_details": null,
"sort_by": null,
"offline": true,
"default": true,
"system_defined": true,
"name": "All Open Leads",
"id": "3652397000000087501",
"category": "shared_with_me",
"fields": [
"Full_Name",
"Company",
"Email",
"Phone",
"Lead_Source",
"Owner",
"Prediction_Score"
],
"favorite": null,
"sort_order": null
},
"parent_module": {}
}
]
} Sample Request
ZCRMRestClient client = ZCRMRestClient.getInstance();
APIResponse response = client.getModule("Products");//module api name
ZCRMModule module = (ZCRMModule) response.getData(); Sample Response
{
"modules": [
{
"global_search_supported": true,
"kanban_view": false,
"deletable": true,
"creatable": true,
"filter_status": true,
"modified_time": "2019-02-05T11:33:03+05:30",
"plural_label": "Leads",
"presence_sub_menu": true,
"id": "3652397000000002175",
"related_list_properties": {
"sort_by": null,
"fields": [
"First_Name",
"Last_Name",
"Full_Name",
"Company",
"Email",
"Lead_Source",
"Lead_Status",
"Phone"
],
"sort_order": null
},
"$properties": [
"$converted",
"$approved",
"$converted_detail",
"$currency_symbol",
"$approval",
"$process_flow"
],
"per_page": 10,
"visibility": 1,
"convertable": true,
"editable": true,
"emailTemplate_support": true,
"profiles": [
{
"name": "Administrator",
"id": "3652397000000026011"
},
{
"name": "Standard",
"id": "3652397000000026014"
}
],
"filter_supported": true,
"display_field": "Full_Name",
"search_layout_fields": [
"Owner",
"Company",
"Email",
"Phone",
"Lead_Source",
"Full_Name"
],
"kanban_view_supported": true,
"web_link": null,
"sequence_number": 2,
"singular_label": "Lead",
"viewable": true,
"api_supported": true,
"api_name": "Leads",
"quick_create": true,
"modified_by": {
"name": "Patricia Boyle",
"id": "3652397000000186017"
},
"generated_type": "default",
"feeds_required": false,
"scoring_supported": true,
"arguments": [],
"module_name": "Leads",
"business_card_field_limit": 5,
"custom_view": {
"display_value": "All Leads",
"shared_type": null,
"criteria": {
"comparator": "equal",
"field": "$converted",
"value": false
},
"system_name": "ALLVIEWS",
"shared_details": null,
"sort_by": null,
"offline": true,
"default": true,
"system_defined": true,
"name": "All Open Leads",
"id": "3652397000000087501",
"category": "shared_with_me",
"fields": [
"Full_Name",
"Company",
"Email",
"Phone",
"Lead_Source",
"Owner",
"Prediction_Score"
],
"favorite": null,
"sort_order": null
},
"parent_module": {}
}
]
} Sample Request
try{
$ins=ZCRMRestClient::getInstance();
$apiResponse=$ins->getModule("Leads");//Module API Name
$module=$apiResponse->getData();
echo "ModuleName:".$module->getModuleName();
echo "SingLabel:".$module->getSingularLabel();
echo "PluLabel:".$module->getPluralLabel();
echo "BusinesscardLimit:".$module->getBusinessCardFieldLimit();
echo "ApiName:".$module->getAPIName();
$fields=$module->getFields();
if($fields==null)
{
continue;
}
foreach ($fields as $field)
{
echo $field->getApiName().", ";
echo $field->getLength().", ";
echo $field->IsVisible().", ";
echo $field->getFieldLabel().", ";
echo $field->getCreatedSource().", ";
echo $field->isMandatory().", ";
echo $field->getSequenceNumber().", ";
echo $field->isReadOnly().", ";
echo $field->getDataType().", ";
echo $field->getId().", ";
echo $field->isCustomField().", ";
echo $field->isBusinessCardSupported().", ";
echo $field->getDefaultValue().", ";
}
}
catch (ZCRMException $e)
{
echo $e->getCode();
echo $e->getMessage();
echo $e->getExceptionCode();
} Sample Response
{
"modules": [
{
"global_search_supported": true,
"kanban_view": false,
"deletable": true,
"creatable": true,
"filter_status": true,
"modified_time": "2019-02-05T11:33:03+05:30",
"plural_label": "Leads",
"presence_sub_menu": true,
"id": "3652397000000002175",
"related_list_properties": {
"sort_by": null,
"fields": [
"First_Name",
"Last_Name",
"Full_Name",
"Company",
"Email",
"Lead_Source",
"Lead_Status",
"Phone"
],
"sort_order": null
},
"$properties": [
"$converted",
"$approved",
"$converted_detail",
"$currency_symbol",
"$approval",
"$process_flow"
],
"per_page": 10,
"visibility": 1,
"convertable": true,
"editable": true,
"emailTemplate_support": true,
"profiles": [
{
"name": "Administrator",
"id": "3652397000000026011"
},
{
"name": "Standard",
"id": "3652397000000026014"
}
],
"filter_supported": true,
"display_field": "Full_Name",
"search_layout_fields": [
"Owner",
"Company",
"Email",
"Phone",
"Lead_Source",
"Full_Name"
],
"kanban_view_supported": true,
"web_link": null,
"sequence_number": 2,
"singular_label": "Lead",
"viewable": true,
"api_supported": true,
"api_name": "Leads",
"quick_create": true,
"modified_by": {
"name": "Patricia Boyle",
"id": "3652397000000186017"
},
"generated_type": "default",
"feeds_required": false,
"scoring_supported": true,
"arguments": [],
"module_name": "Leads",
"business_card_field_limit": 5,
"custom_view": {
"display_value": "All Leads",
"shared_type": null,
"criteria": {
"comparator": "equal",
"field": "$converted",
"value": false
},
"system_name": "ALLVIEWS",
"shared_details": null,
"sort_by": null,
"offline": true,
"default": true,
"system_defined": true,
"name": "All Open Leads",
"id": "3652397000000087501",
"category": "shared_with_me",
"fields": [
"Full_Name",
"Company",
"Email",
"Phone",
"Lead_Source",
"Owner",
"Prediction_Score"
],
"favorite": null,
"sort_order": null
},
"parent_module": {}
}
]
} Sample Request
def module_meta(self):
try:
resp = ZCRMRestClient.get_instance().get_module('Leads') # module API Name
modules = [resp.data]
print(resp.status_code)
for module in modules:
print(module.api_name)
print(module.is_convertable)
print(module.is_creatable)
print(module.is_editable)
print(module.is_deletable)
print(module.web_link)
print(module.singular_label)
print(module.plural_label)
print(module.modified_by)
print(module.modified_time)
print(module.is_viewable)
print(module.is_api_supported)
print(module.is_custom_module)
print(module.is_scoring_supported)
print(module.id)
print(module.module_name)
print(module.business_card_field_limit)
print(module.business_card_fields)
profiles = module.profiles
if profiles is not None:
for profile in profiles:
print(profile.name)
print(profile.id)
print(module.display_field_name)
print(module.display_field_id)
if module.related_lists is not None:
for relatedlist in module.related_lists:
print(relatedlist.display_label)
print(relatedlist.is_visible)
print(relatedlist.api_name)
print(relatedlist.module)
print(relatedlist.name)
print(relatedlist.id)
print(relatedlist.href)
print(relatedlist.type)
if module.layouts is not None:
for layout in module.layouts:
self.print_layout(layout)
if module.fields is not None:
for field_ins in module.fields:
self.print_field(field_ins)
if module.related_list_properties is not None:
print(module.related_list_properties.sort_by)
print(module.related_list_properties.sort_order)
print(module.related_list_properties.fields)
print(module.properties)
print(module.per_page)
print(module.search_layout_fields)
print(module.default_territory_name)
print(module.default_territory_id)
print(module.default_custom_view_id)
print(module.default_custom_view)
print(module.is_global_search_supported)
print(module.sequence_number)
except ZCRMException as ex:
print(ex.status_code)
print(ex.error_message)
print(ex.error_code)
print(ex.error_details)
print(ex.error_content) Sample Response
{
"modules": [
{
"global_search_supported": true,
"kanban_view": false,
"deletable": true,
"creatable": true,
"filter_status": true,
"modified_time": "2019-02-05T11:33:03+05:30",
"plural_label": "Leads",
"presence_sub_menu": true,
"id": "3652397000000002175",
"related_list_properties": {
"sort_by": null,
"fields": [
"First_Name",
"Last_Name",
"Full_Name",
"Company",
"Email",
"Lead_Source",
"Lead_Status",
"Phone"
],
"sort_order": null
},
"$properties": [
"$converted",
"$approved",
"$converted_detail",
"$currency_symbol",
"$approval",
"$process_flow"
],
"per_page": 10,
"visibility": 1,
"convertable": true,
"editable": true,
"emailTemplate_support": true,
"profiles": [
{
"name": "Administrator",
"id": "3652397000000026011"
},
{
"name": "Standard",
"id": "3652397000000026014"
}
],
"filter_supported": true,
"display_field": "Full_Name",
"search_layout_fields": [
"Owner",
"Company",
"Email",
"Phone",
"Lead_Source",
"Full_Name"
],
"kanban_view_supported": true,
"web_link": null,
"sequence_number": 2,
"singular_label": "Lead",
"viewable": true,
"api_supported": true,
"api_name": "Leads",
"quick_create": true,
"modified_by": {
"name": "Patricia Boyle",
"id": "3652397000000186017"
},
"generated_type": "default",
"feeds_required": false,
"scoring_supported": true,
"arguments": [],
"module_name": "Leads",
"business_card_field_limit": 5,
"custom_view": {
"display_value": "All Leads",
"shared_type": null,
"criteria": {
"comparator": "equal",
"field": "$converted",
"value": false
},
"system_name": "ALLVIEWS",
"shared_details": null,
"sort_by": null,
"offline": true,
"default": true,
"system_defined": true,
"name": "All Open Leads",
"id": "3652397000000087501",
"category": "shared_with_me",
"fields": [
"Full_Name",
"Company",
"Email",
"Phone",
"Lead_Source",
"Owner",
"Prediction_Score"
],
"favorite": null,
"sort_order": null
},
"parent_module": {}
}
]
} Sample Request
ZCRMRestClient restClient = ZCRMRestClient.GetInstance();
APIResponse response = restClient.GetModule("Leads"); //module api name
ZCRMModule module = (ZCRMModule)response.Data; Sample Response
{
"modules": [
{
"global_search_supported": true,
"kanban_view": false,
"deletable": true,
"creatable": true,
"filter_status": true,
"modified_time": "2019-02-05T11:33:03+05:30",
"plural_label": "Leads",
"presence_sub_menu": true,
"id": "3652397000000002175",
"related_list_properties": {
"sort_by": null,
"fields": [
"First_Name",
"Last_Name",
"Full_Name",
"Company",
"Email",
"Lead_Source",
"Lead_Status",
"Phone"
],
"sort_order": null
},
"$properties": [
"$converted",
"$approved",
"$converted_detail",
"$currency_symbol",
"$approval",
"$process_flow"
],
"per_page": 10,
"visibility": 1,
"convertable": true,
"editable": true,
"emailTemplate_support": true,
"profiles": [
{
"name": "Administrator",
"id": "3652397000000026011"
},
{
"name": "Standard",
"id": "3652397000000026014"
}
],
"filter_supported": true,
"display_field": "Full_Name",
"search_layout_fields": [
"Owner",
"Company",
"Email",
"Phone",
"Lead_Source",
"Full_Name"
],
"kanban_view_supported": true,
"web_link": null,
"sequence_number": 2,
"singular_label": "Lead",
"viewable": true,
"api_supported": true,
"api_name": "Leads",
"quick_create": true,
"modified_by": {
"name": "Patricia Boyle",
"id": "3652397000000186017"
},
"generated_type": "default",
"feeds_required": false,
"scoring_supported": true,
"arguments": [],
"module_name": "Leads",
"business_card_field_limit": 5,
"custom_view": {
"display_value": "All Leads",
"shared_type": null,
"criteria": {
"comparator": "equal",
"field": "$converted",
"value": false
},
"system_name": "ALLVIEWS",
"shared_details": null,
"sort_by": null,
"offline": true,
"default": true,
"system_defined": true,
"name": "All Open Leads",
"id": "3652397000000087501",
"category": "shared_with_me",
"fields": [
"Full_Name",
"Company",
"Email",
"Phone",
"Lead_Source",
"Owner",
"Prediction_Score"
],
"favorite": null,
"sort_order": null
},
"parent_module": {}
}
]
}