从多个记录中删除标记
目的
删除与多个记录关联的标记。
请求URL
https://www.zohoapis.com.cn/crm/v2/{module_api_name}/actions/remove_tags?ids={entity_id}&tag_names={tag1},{tag2}
module_api_name - 模块的API名称
请求方法
POST
范围
scope=ZohoCRM.modules.all
(或)
scope=ZohoCRM.modules.{module_name}.{operation_type}
可能的模块名称 | 可能的操作类型 |
---|---|
线索,客户,联系人,商机,市场活动,任务,服务支持,事件,通话,解决方案,产品,供货商,价格表,报价单,销售订单,采购订单,发货单和自定义模块 | ALL - 完全数据访问 WRITE - 编辑标记数据 DELETE - 删除标记数据 |
参数
参数名称 | 数据类型 | 描述 |
---|---|---|
ids (必填) | 整型 | 指定记录的唯一ID |
tag_names (必填) | 字符串 | 指定要从记录中删除的标记名称 |
示例请求
curl "https://www.zohoapis.com.cn/crm/v2/Contacts/actions/remove_tags?ids=1234567890,123456789&tag_names=From Email,In progress"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
示例响应
{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "2445013000000402006",
"tags": [
"From Email",
"In Progress"
]
},
"message": "tags updated successfully",
"status": "success"
},
{
"code": "SUCCESS",
"details": {
"id": "2445013000000141005",
"tags": [
"From Webforms",
"Negotiation"
]
},
"message": "tags updated successfully",
"status": "success"
}
]
}
示例请求
/** 从多个记录中删除标记 */
$zcrmModuleIns = ZCRMModule::getInstance("Leads");
$tagNames = array("Name7","Name8");
$recordids = array("3372164000001494008","3372164000001295433");
$bulkAPIResponse = $zcrmModuleIns->removeTagsFromRecords($recordids, $tagNames); //$recordids 记录ID数组, $tagName 标记名称数组
$records = $bulkAPIResponse->getData(); //$records - ZCRMRecord 实例数组
示例响应
{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "2445013000000402006",
"tags": [
"From Email",
"In Progress"
]
},
"message": "tags updated successfully",
"status": "success"
},
{
"code": "SUCCESS",
"details": {
"id": "2445013000000141005",
"tags": [
"From Webforms",
"Negotiation"
]
},
"message": "tags updated successfully",
"status": "success"
}
]
}
示例请求
ZCRMModule moduleIns = ZCRMModule.GetInstance("Leads"); // 模块API名称
List<string> tagNames = new List<string> { "Name7", "Name8" };
List<long> recordIds = new List<long> { 3372164000001494008, 3372164000001295433 };
BulkAPIResponse<ZCRMRecord> response = moduleIns.RemoveTagsFromRecords(recordIds, tagNames); //recordIds 记录ID列表, tagNames 标记名称列表
List<ZCRMRecord> records = response.BulkData; //records - ZCRMRecord 实例列表
List<EntityResponse> entityResponses = response.BulkEntitiesResponse; // entityResponses - EntityResponse实例列表
示例响应
{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "2445013000000402006",
"tags": [
"From Email",
"In Progress"
]
},
"message": "tags updated successfully",
"status": "success"
},
{
"code": "SUCCESS",
"details": {
"id": "2445013000000141005",
"tags": [
"From Webforms",
"Negotiation"
]
},
"message": "tags updated successfully",
"status": "success"
}
]
}