标签 API

标签是关键字,帮助您根据记录的特征对记录进行分类。标签帮助您对数据进行排序,并在需要时轻松地找到它们。

获取标签

目的

显示机构中的所有标签。

请求URL

http://www.zohoapis.com.cn/crm/v2/settings/tags?module={module_api_name}

module_api_name - 模块的API名称

请求方法

GET

范围

scope=ZohoCRM.settings.all
(或)
scope=ZohoCRM.settings.tags.all
(或)
scope=ZohoCRM.settings.tags.read


参数

参数名称数据类型描述
module (必填)字符串指定模块的API名称,如Leads、Accounts、Deals等。
my_tags (可选)字符串显示当前用户创建的标签名称。

属性

  • "allowed_count" 表示可在当前版本中创建的标签数。

  • "count"表示创建的标签总数。

示例请求


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

示例响应


				{
    "tags": [
       {
            "created_by": {
                "id": "2000000030444",
                "name": "Construction Industry"
            },
            "created_time": "2017-03-24T11:08:23+05:30",
            "id": "2000000039007",
            "modified_by": {
                "id": "2000000030444",
                "name": "Chems"
            },
            "modified_time": "2017-03-24T11:08:23+05:30",
            "name": "Chemical Industry"
        }
    ],
    "info": {
        "allowed_count": 50,
        "count": 1
    }
}			

示例请求


				/** 获取标签 */
$zcrmModuleIns=ZCRMModule::getInstance("Leads");
$bulkAPIResponse = $zcrmModuleIns->getTags();
$tagsArray=$bulkAPIResponse->getData(); // $tagsArray - ZCRMTag实例的数组			

示例响应


				{
    "tags": [
       {
            "created_by": {
                "id": "2000000030444",
                "name": "Construction Industry"
            },
            "created_time": "2017-03-24T11:08:23+05:30",
            "id": "2000000039007",
            "modified_by": {
                "id": "2000000030444",
                "name": "Chems"
            },
            "modified_time": "2017-03-24T11:08:23+05:30",
            "name": "Chemical Industry"
        }
    ],
    "info": {
        "allowed_count": 50,
        "count": 1
    }
}			

示例请求


				ZCRMModule moduleIns = ZCRMModule.GetInstance("Leads"); //模块API名称
BulkAPIResponse<ZCRMTag> response = moduleIns.GetTags();
List<ZCRMTag> tags = response.BulkData; // tags - ZCRMTag实例列表			

示例响应


				{
    "tags": [
       {
            "created_by": {
                "id": "2000000030444",
                "name": "Construction Industry"
            },
            "created_time": "2017-03-24T11:08:23+05:30",
            "id": "2000000039007",
            "modified_by": {
                "id": "2000000030444",
                "name": "Chems"
            },
            "modified_time": "2017-03-24T11:08:23+05:30",
            "name": "Chemical Industry"
        }
    ],
    "info": {
        "allowed_count": 50,
        "count": 1
    }
}