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 Contacts or Deals in your API request.

Request Details

Request URL

https://www.zohoapis.com/bigin/v1/settings/modules/{module_api_name}

module_api_name - The API name of the module

Scope

scope=ZohoBigin.settings.modules.READ
(or)
scope=ZohoBigin.settings.modules.ALL
(or)
scope=ZohoBigin.settings.ALL

Sample Request

Copiedcurl "https://www.zohoapis.com/bigin/v1/settings/modules/Contacts"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
CopiedZCRMRestClient client = ZCRMRestClient.getInstance();
APIResponse response = client.getModule("Products");//module api name
ZCRMModule module = (ZCRMModule) response.getData();
Copiedtry{
$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();
}
Copieddef 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)
CopiedZCRMRestClient restClient = ZCRMRestClient.GetInstance();
APIResponse response = restClient.GetModule("Leads"); //module api name
ZCRMModule module = (ZCRMModule)response.Data;
Copiedresponse = invokeurl
[
	url: "https://www.zohoapis.com/crm/v2/settings/modules/Leads"
	type: GET
	connection:"crm_oauth_connection"
];
info response;

Possible Errors

  • INVALID_MODULEHTTP 400

    The module name given seems to be invalid
    Resolution: You have specified an invalid module name or there is no tab permission, or the module could have been removed from the available modules. Specify a valid module API name.

  • INVALID_MODULEHTTP 400

    The given module is not supported in API
    Resolution: The modules such as Documents and Projects are not supported in the current API. (This error will not be shown, once these modules are been supported). Specify a valid module API name.

Sample Response

Copied{
    "modules": [
        {
            "global_search_supported": true,
            "kanban_view": false,
            "deletable": true,
            "description": null,
            "creatable": true,
            "filter_status": true,
            "modified_time": null,
            "plural_label": "Contacts",
            "presence_sub_menu": true,
            "triggers_supported": true,
            "id": "529793000000000129",
            "related_list_properties": {
                "sort_by": null,
                "fields": [
                    "First_Name",
                    "Last_Name",
                    "Full_Name",
                    "Email",
                    "Phone",
                    "Mobile"
                ],
                "sort_order": null
            },
            "$properties": [
                "$approval_state",
                "$state",
                "$currency_symbol",
                "$in_merge",
                "$followed",
                "$followers",
            ],
            "per_page": 10,
            "visibility": 1,
            "convertable": false,
            "editable": true,
            "emailTemplate_support": true,
            "profiles": [
                {
                    "name": "Administrator",
                    "id": "529793000000015972"
                },
                {
                    "name": "Standard",
                    "id": "529793000000015975"
                }
            ],
            "filter_supported": true,
            "display_field": "Full_Name",
            "search_layout_fields": [
                "Account_Name",
                "Email",
                "Phone",
                "Owner",
                "Full_Name"
            ],
            "kanban_view_supported": true,
            "sequence_number": 3,
            "singular_label": "Contact",
            "viewable": true,
            "api_supported": true,
            "api_name": "Contacts",
            "quick_create": true,
            "modified_by": null,
            "generated_type": "default",
            "feeds_required": true,
            "webform_supported": true,
            "module_name": "Contacts",
            "custom_view": {
                "display_value": "All Contacts",
                "shared_type": "all",
                "criteria": null,
                "system_name": "ALLVIEWS",
                "shared_details": null,
                "sort_by": "Email",
                "offline": true,
                "default": true,
                "system_defined": true,
                "name": "All Contacts",
                "id": "529793000000091529",
                "category": "shared_with_me",
                "fields": [
                    "Full_Name",
                    "Account_Name",
                    "Email",
                    "Phone",
                    "Owner"
                ],
                "favorite": null,
                "sort_order": "asc"
            },
            "parent_module": {}
        }
    ]
}