Get Variable Groups
Purpose
To get the details of variable groups. Specify the unique ID or the API name of the variable group in your API request to get the data for that particular variable group.
Endpoints
- GET /settings/variable_groups
- GET /settings/variable_groups/{variable_group_id (or) variable_group_API_name}
Request Details
Request URL
{api-domain}/crm/{version}/settings/variable_groups
To fetch a specific variable group:
{api-domain}/crm/{version}/settings/variable_groups/{variable_group_id (or) variable_group_API_name}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.variable_groups.{operation_type}
Possible operation types
ALL - Full access to variable data
READ - Get variable group data
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/variable_groups"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"Copiedresponse = invokeurl
[
	url: "https://www.zohoapis.com/crm/v8/settings/variable_groups/40000000047003"
	type: GET
	connection:"crm_oauth_connection"
];
info response;Response JSON
- display_labelstringRepresents the display name of the CRM variable group. 
- api_namestringRepresents the API name of the CRM variable group. 
- namestringRepresents the name of the CRM variable group. 
- descriptionstringRepresents the description of the CRM variable group, if any. 
- idstringRepresents the unique ID of the CRM variable group. 
Possible Errors
- INVALID_REQUEST_METHODHTTP 400The 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.
- AUTHORIZATION_FAILEDHTTP 400User does not have sufficient privilege to read variable group data 
 Resolution: The user does not have the permission to read variable group data. Contact your system administrator.
- OAUTH_SCOPE_MISMATCHHTTP 401Unauthorized 
 Resolution: Client does not have ZohoCRM.settings.variable_groups.READ scope. Create a new client with valid scope. Refer to scope section above.
- NO_PERMISSIONHTTP 403Permission denied to read records 
 Resolution: The user does not have permission to read variable group data. Contact your system administrator.
- INVALID_URL_PATTERNHTTP 404Please 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.
- INTERNAL_ERRORHTTP 500Internal Server Error 
 Resolution: Unexpected and unhandled exception in Server. Contact support team.
Sample Response
Copied{
    "variable_groups": [
       {
            "display_label": "General",
            "api_name": "General",
            "name": "General",
            "description": null,
            "id": "40000000039001"
        },
       {
            "display_label": "Group1",
            "api_name": "Group1",
            "name": "Group1",
            "description": null,
            "id": "40000000047001"
        },
       {
            "display_label": "Group2",
            "api_name": "Group2",
            "name": "Group2",
            "description": null,
            "id": "40000000047005"
        },
       {
            "display_label": "Group3",
            "api_name": "Group3",
            "name": "Group3",
            "description": "This describes variable 3",
            "id": "40000000042001"
        },
       {
            "display_label": "Group4",
            "api_name": "Group4",
            "name": "Group4",
            "description": null,
            "id": "40000000042002"
        },
       {
            "display_label": "MyCustsdomGroup",
            "api_name": "MyCustsdomGroup",
            "name": "MyCustsdomGroup",
            "description": null,
            "id": "40000000044003"
        },
       {
            "display_label": "Variable6",
            "api_name": "VariableSix",
            "name": "Variable6",
            "description": "On the sea shore",
            "id": "40000000044001"
        }
    ]
}