变量API

CRM变量可以有唯一的一组值,可以广泛用作电子邮件模板、邮件合并模板和库存模板中的合并字段。您还可以将它们用作API中可重用的身份验证参数。

获取变量数据

目的

通过API请求检索所有可用变量。

请求URL

https://www.zohoapis.com.cn/crm/v2/settings/variables

请求方法

GET

范围

scope=ZohoCRM.settings.variables.{operation_type}

 
可能的操作类型
ALL - 完全访问变量数据
READ - 获取变量数据
备注:

在获取特定变量数据时,必须使用组ID/组API名称。

示例请求


				curl "https://www.zohoapis.com.cn/crm/v2/settings/variables"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"			

示例响应


				{
    "variables": [
       {
            "api_name": "Variable1",
            "name": "Variable1",
            "description": "This denotes variable 1 description",
            "id": "40000000047003",
            "type": "text",
            "variable_group": {
                "api_name": "Group1",
                "id": "40000000047001"
            },
            "value": "This denotes variable one value"
        },
       {
            "api_name": "Variable2",
            "name": "Variable2",
            "description": "This denotes variable 2 description",
            "id": "40000000047007",
            "type": "integer",
            "variable_group": {
                "api_name": "Group2",
                "id": "40000000047005"
            },
            "value": "2"
        },
       {
            "api_name": "VariableSix",
            "name": "Variable6",
            "description": "On the sea shore",
            "id": "40000000044005",
            "type": "text",
            "variable_group": {
                "api_name": "MyCustsdomGroup",
                "id": "40000000044003"
            },
            "value": "She sells sea shells"
        }
    ]
}