从特定记录中删除标签
目的
删除与特定记录关联的标签。
请求URL
https://www.zohoapis.com.cn/crm/v2/{module_api_name}/{record_id}/actions/remove_tags?tag_names={tag1},{tag2}
module_api_name - 模块的API名称
record_id - 记录的唯一ID
请求方法
POST
范围
scope=ZohoCRM.modules.all
(或)
scope=ZohoCRM.modules.{module_name}.{operation_type}
| 可能的模块名称 | 可能的操作类型 |
|---|---|
| leads, accounts, contacts, deals, campaigns, tasks, cases, events, calls, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, and custom | ALL - 完全数据访问 WRITE - 编辑标签数据 DELETE - 删除标签数据 |
参数
| 参数名称 | 数据类型 | 描述 |
|---|---|---|
| tag_names (必填) | 字符串 | 指定要从记录中删除的标签名称 |
示例请求
curl "https://www.zohoapis.com.cn/crm/v2/Contacts/2445013000000402006/actions/remove_tags?&tag_names=From Email,Low Priority"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf" 示例响应
{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "2445013000000402006",
"tags": [
"From Webforms",
"Negotiation"
]
},
"message": "tags updated successfully",
"status": "success"
}
]
} 示例请求
/** Remove Tags from a Specific record */
$zcrmRecordIns = ZCRMRecord::getInstance("Leads","3372164000001254034");
$tagNames = array("Name5","Name6");
$apiResponse = $zcrmRecordIns->removeTags($tagNames); //$tagNames是数组
$record = $apiResponse->getData(); //$record - ZCRMRecord实例 示例响应
{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "2445013000000402006",
"tags": [
"From Webforms",
"Negotiation"
]
},
"message": "tags updated successfully",
"status": "success"
}
]
} 示例响应
ZCRMRecord recordIns = ZCRMRecord.GetInstance("Leads", 3372164000001600009);//模块API名称 , 3372164000001254034 record id
List<string> tagNames = new List<string> { "Name5", "Name6" };
APIResponse response = recordIns.RemoveTags(tagNames); //tagNames是数组
ZCRMRecord record = (ZCRMRecord)response.Data; 示例响应
{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "2445013000000402006",
"tags": [
"From Webforms",
"Negotiation"
]
},
"message": "tags updated successfully",
"status": "success"
}
]
}