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 Details

Request URL

{api-domain}/crm/{version}/settings/modules/{module_api_name}

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope=ZohoCRM.settings.ALL
(or)
scope=ZohoCRM.settings.modules.{operation_type}

Possible operation types

ALL - Full data access
READ - Get module data

Note
  • Refer to the key api_name in the JSON data while accessing the resource. Every module, field, and related lists will have an API name, which you can use in the third-party integrations. For example, if you want to access the Leads module, use “Leads" which is the api_name every time you access the resource. The Zoho CRM generates an API name internally while creating a custom module, custom field, or related list label. Please note that you cannot alter the API Names for the default modules, fields, and related lists. You can change the API names only for custom modules, fields, and related lists.

  • The generated API name can contain only alphabets, numbers, and underscores. The API name should start with an alphabet and should not have two consecutive underscores or end with an underscore.

  • For the Events module,

    • The singular_label and plural_label will be Meeting and Meetings, respectively.

    • The Module_Name will be Meetings.

    • The api_name will remain Events.

  • The response contains only those modules that the user's profile has permission to view.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v2.1/settings/modules/Leads"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
4.0.04.x
Copied//Get instance of ModulesOperations Class
$moduleOperations = new ModulesOperations();
//Call getModule method that takes moduleAPIName as parameter
$response = $moduleOperations->getModule($moduleAPIName);
Copied<?php
class GetListofModules{
    
    public function execute(){
        $curl_pointer = curl_init();
        
        $curl_options = array();
        $url = "https://www.zohoapis.com/crm/v2/settings/modules";

        $curl_options[CURLOPT_URL] = $url;
        $curl_options[CURLOPT_RETURNTRANSFER] = true;
        $curl_options[CURLOPT_HEADER] = 1;
        $curl_options[CURLOPT_CUSTOMREQUEST] = "GET";
        $headersArray = array();
        
        $headersArray[] = "Authorization". ":" . "Zoho-oauthtoken " ."1000.30f3a589XXXXXXXXXXXXXXXXXXX4077.dc5XXXXXXXXXXXXXXXXXXXee9e7c171c";
        $curl_options[CURLOPT_HTTPHEADER]=$headersArray;
        
        curl_setopt_array($curl_pointer, $curl_options);
        
        $result = curl_exec($curl_pointer);
        $responseInfo = curl_getinfo($curl_pointer);
        curl_close($curl_pointer);
        list ($headers, $content) = explode("\r\n\r\n", $result, 2);
        if(strpos($headers," 100 Continue")!==false){
            list( $headers, $content) = explode( "\r\n\r\n", $content , 2);
        }
        $headerArray = (explode("\r\n", $headers, 50));
        $headerMap = array();
        foreach ($headerArray as $key) {
            if (strpos($key, ":") != false) {
                $firstHalf = substr($key, 0, strpos($key, ":"));
                $secondHalf = substr($key, strpos($key, ":") + 1);
                $headerMap[$firstHalf] = trim($secondHalf);
            }
        }
        $jsonResponse = json_decode($content, true);
        if ($jsonResponse == null && $responseInfo['http_code'] != 204) {
            list ($headers, $content) = explode("\r\n\r\n", $content, 2);
            $jsonResponse = json_decode($content, true);
        }
        var_dump($headerMap);
        var_dump($jsonResponse);
        var_dump($responseInfo['http_code']);
        
    }
    
}
(new GetListofModules())->execute();
2.1.0
Copied# Get instance of ModulesOperations Class
mo = Modules::ModulesOperations.new
# Call get_module method that takes module_api_name as parameter
response = mo.get_module(module_api_name)
Copied# Get instance of ModulesOperations Class
mo = Modules::ModulesOperations.new
# Call get_module method that takes module_api_name as parameter
response = mo.get_module(module_api_name)
Copiedresponse = invokeurl
[
	url: "https://www.zohoapis.com/crm/v2.1/settings/modules/Leads"
	type: GET
	connection:"crm_oauth_connection"
];
info response;

Response JSON Keys

  • global_search_supportedboolean

    Represents if the current module has global search support.
    Possible values- true: The current module has global search support.
    false: The current module does not have global search support.

  • deletableboolean

    Describes if the user can delete a record in the current module.
    Possible values- true: The user can delete a record in the current module.
    false: The user cannot delete a record in the current module.

  • descriptionstring

    Represents the description of the module, if any.

  • creatableboolean

    Represents if the user can create records in the current module.
    Possible values- true: The user can create records in the current module.
    false: The user cannot create records in the current module.

  • inventory_template_supportedboolean

    Represents the module supports inventory template. The value will be true only for Quotes, Invoices, Purchase Orders, and Sales Orders modules.
    Possible values- true: The current module supports inventory template.
    false: The current module does not support inventory template.

  • modified_timedate and time in ISO8601 format

    Represents the date and time of when the module properties were last modified.

  • plural_labelstring

    Represents the plural of the module name. Example: Leads.

  • singular_labelstring

    Represents the singular of the module name. Example: Lead.

  • presence_sub_menuboolean

    Represents if the module has a submenu. For instance, Tasks in Activities is a submenu.
    Possible values- true: The current module has a submenu.
    false: The current module does not have a submenu.

  • triggers_supportedboolean

    Represents if the module supports triggers from custom buttons, workflows, approval etc.
    Possible values- true: The current module supports triggers. For instance, Contacts, Accounts,and so on.
    false: The current module does not support triggers. For instance, Activities, Feeds, and so on.

  • idstring

    Represents the unique ID of the module. For instance, 4150868000000002173

  • visibilityinteger

    Represents the visibility of the module to the current user.

    • 1- The module is visible

    • 0- The module is hidden

    • -1 - The module is unavailable/hidden by the system itself due to the downgrading of the plan.

  • convertableboolean

    Describes if the user can convert the record into another type of record. For example: Convert Leads into Deals.
    Possible values- true: The user can convert the records in the current module into another type of record.
    false: The user cannot convert the records in the current module into another type of record.

  • viewableboolean

    Represents if the user can view the records in the current module.
    Possible values- true: The user can view the records in the current module.
    false: The user cannot view the records in the current module.

  • editableboolean

    Describes if the user can edit a record in the current module.
    Possible values- true: The user can edit a record in the current module.
    false: The user cannot edit a record in the current module.

  • emailTemplate_supportboolean

    Represents if the module supports the usage of the email templates.
    Possible values- true: The module has email template support.
    false: The module does not have email template support.

  • api_supportedboolean

    Describes if the current module is accessible via API.
    Possible values- true: The current module is accessible via API. For instance, Leads, Quotes.
    false: The current module is not accessible via API. For instance, Feeds, Documents, and so on.

  • profilesJSON array

    Each object in the array represents the details of the profile that has access to the module. Example: {
    "name": "Administrator",
    "id": "4150868000000026011"
    },

  • filter_supportedboolean

    Represents if the module supports custom filters besides the system-defined ones in a custom view.
    Possible values- true: The current module has custom-filter support.
    false: The current module does not have custom-filter support.

  • show_as_tabboolean

    Represents if the module is displayed as a tab in the CRM UI.
    Possible values- true: The module is displayed as a tab in the CRM UI. For instance, Contacts, Accounts, and so on.
    false: The module is not displayed as a tab in the CRM UI. For instance, Tasks, linking modules, and so on.

  • web_linkstring

    Represents the web link of the module, if any. For instance, https://extensions.zoho.com/plugin/facebook

  • sequence_numberinteger

    Represents the position of the module in the CRM.

  • api_namestring

    Represents the API name of the module. Example: Leads.

  • quick_createboolean

    Represents if the module supports quick create.
    Possible values- true: The user can add records using quick create in the current module. For instance, Contacts, Accounts, and so on.
    false: The user cannot add records using quick create in the current module. For instance, Feeds, Forecasts, and so on.

  • modified_byJSON object

    Represents the name and ID of the user who last modified the module properties. For example: "modified_by": {
    "name": "Patricia Boyle",
    "id": "4150868000000225013"
    }

  • generated_typestring

    Represents how the module was created.
    Possible values- default: It is a default module. For instance, Contacts, Accounts, and so on.
    linking: It is a linking module.
    subform: It is a line item subform in one of the inventory modules.
    web: It is a web-tab widget.
    custom: It is a custom module.

  • feeds_requiredboolean

    Represents if feeds is enabled for the module.
    Possible values- true: Feeds is enabled for the current module.
    false: Feeds is not enabled for the current module.

  • scoring_supportedboolean

    Represents if the records of the module qualify for the scoring process, if there is one.
    Possible values- true: The current module qualifies for the scoring process.
    false: The current module does not qualify for the scoring process.

  • webform_supportedboolean

    Represents if the records in the module can be created via web forms.
    Possible values- true: The current module supports webforms.
    false: The current module does not support webforms.

  • argumentsJSON array

    Represents the parameters for the link used in Web-tab. Each object represents display name and the value of the argument. Example: "arguments": [
    {
    "name": "sample",
    "value": "users.city"
    }
    ]

  • module_namestring

    Represents the display name of the module.

  • business_card_field_limitinteger

    Represents the number of fields you can have in the business card details.
    Note: Business card details are displayed on the "Details View" page of a record. This is also the information shown when you hover over a lookup field.

  • custom_viewJSON object

    Represents the details of the custom views created for this module. If you pass the custom view ID, the response contains the details of that custom view. Otherwise, the system fetches the details of the default view in that module.

  • parent_moduleJSON object

    Represents the details of the parent module, if any. For instance, Activities is the parent module for Tasks, Calls, and Events.

Possible Errors

  • INVALID_URL_PATTERNHTTP 404

    Please check if the URL trying to access is a correct one
    Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to request URL section above.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: Client does not have ZohoCRM.settings.modules.READ scope. Create a new client with valid scope. Refer to scope section above.

  • NO_PERMISSIONHTTP 403

    Permission denied to read
    Resolution: The user does not have permission to read records. Contact your system administrator.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in the server. Contact support team.

  • INVALID_REQUEST_METHODHTTP 400

    The http request method type is not a valid one
    Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above.

  • INVALID_MODULEHTTP 400

    The API name of the module is invalid.
    Resolution: The key resource_path_index in the response gives the index at which the error has occurred. The index 0 starts after the version number in the URL. So, if the index in the response is 2, it means the error is three places after the version number.

  • AUTHORIZATION_FAILEDHTTP 400

    User does not have sufficient privilege to read module details.
    Resolution: The user does not have the permission to retrieve module details. Contact your system administrator.

Sample Response

Copied{
    "modules": [
        {
            "global_search_supported": true,
            "kanban_view": false,
            "deletable": true,
            "description": null,
            "creatable": true,
            "filter_status": true,
            "inventory_template_supported": false,
            "modified_time": "2021-02-15T11:54:09+05:30",
            "plural_label": "Leads",
            "presence_sub_menu": true,
            "triggers_supported": true,
            "id": "3652397000000002175",
            "isBlueprintSupported": true,
            "related_list_properties": {
                "sort_by": null,
                "fields": [
                    "Full_Name",
                    "Company",
                    "Email",
                    "Lead_Source",
                    "Lead_Status",
                    "Phone"
                ],
                "sort_order": null
            },
            "per_page": 100,
            "$properties": [
                "$converted",
                "$approved",
                "$approval_state",
                "$state",
                "$converted_detail",
                "$currency_symbol",
                "$review",
                "$review_process",
                "$approval",
                "$in_merge",
                "$process_flow",
                "$orchestration",
                "$stop_processing",
                "$data_source_details",
                "$has_more"
            ],
            "visible": true,
            "visibility": 1,
            "convertable": true,
            "editable": true,
            "emailTemplate_support": true,
            "profiles": [
                {
                    "name": "Administrator",
                    "id": "3652397000000026011"
                },
                {
                    "name": "Standard",
                    "id": "3652397000000026014"
                },
                {
                    "name": "Free",
                    "id": "3652397000001614008"
                }
            ],
            "filter_supported": true,
            "$on_demand_properties": [
                "$blocked_reason"
            ],
            "display_field": "Full_Name",
            "search_layout_fields": [
                "Owner",
                "Company",
                "Email",
                "Phone",
                "Lead_Source",
                "Full_Name"
            ],
            "kanban_view_supported": true,
            "show_as_tab": 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,
            "webform_supported": true,
            "arguments": [],
            "module_name": "Leads",
            "business_card_field_limit": 5,
            "custom_view": {
                "display_value": "All Leads",
                "access_type": "public",
                "criteria": {
                    "comparator": "equal",
                    "field": {
                        "api_name": "$converted"
                    },
                    "value": "false"
                },
                "system_name": "ALLVIEWS",
                "sort_by": null,
                "created_by": null,
                "shared_to": null,
                "default": true,
                "modified_time": "2020-04-13T11:52:02+05:30",
                "name": "All Open Leads",
                "system_defined": true,
                "modified_by": {
                    "name": "Patricia Boyle",
                    "id": "3652397000000186017"
                },
                "id": "3652397000000087501",
                "fields": [
                    {
                        "api_name": "Full_Name",
                        "id": "3652397000000002631"
                    },
                    {
                        "api_name": "Lead_Source",
                        "id": "3652397000000002609"
                    },
                    {
                        "api_name": "Owner",
                        "id": "3652397000000002589"
                    },
                    {
                        "api_name": "Company",
                        "id": "3652397000000002591"
                    },
                    {
                        "api_name": "Email",
                        "id": "3652397000000002599"
                    },
                    {
                        "api_name": "Phone",
                        "id": "3652397000000002601"
                    }
                ],
                "category": "public_views",
                "last_accessed_time": "2021-02-15T12:12:37+05:30",
                "sort_order": null,
                "favorite": null
            },
            "parent_module": {}
        }
    ]
}