合并标签

目的

合并标签,并将两个标签下的所有记录放到一个标签中。

请求URL

https://www.zohoapis.com.cn/crm/v2/settings/tags/{tag_id}/actions/merge

tag_id - 标签的唯一ID

请求方法

POST

范围

scope=ZohoCRM.settings.all
(或)
scope=ZohoCRM.settings.tags.{operation_type}

可能的操作类型
ALL - 完全数据访问
WRITE - 编辑标签数据
CREATE - 创建标签数据

示例请求

在这个输入中,@mergetag.json 包含了示例输入数据


				curl "https://www.zohoapis.com.cn/crm/v2/settings/tags/2000000035058/actions/merge"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@mergetag.json"			

示例输入


				{
    "tags": [
       {
            "conflict_id": "2000000039012"
        }
    ]
}			

示例响应


				{
    "tags": [
       {
            "code": "SUCCESS",
            "message": "tags merged successfully",
            "status": "success",
            "details": {
                "created_by": {
                    "id": "2000000030874",
                    "name": "Medical"
                },
                "created_time": "2017-03-24T11:08:23+05:30",
                "id": "2000000088041",
                "modified_by": {
                    "id": "2000000030444",
                    "name": "Chems"
                },
                "modified_time": "2017-03-24T11:08:23+05:30"
            }
        }
    ]
}			

示例请求


				/** 合并标签 */
$mergeTagIns = ZCRMTag::getInstance("3372164000001521001"); //3372164000001521001 冲突的标签ID
$zcrmTagIns = ZCRMTag::getInstance("3372164000001597014"); //3372164000001597014 标签ID
$apiResponse = $zcrmTagIns->merge($mergeTagIns); //$mergeTagIns 冲突的标签实例
$tag = $apiResponse->getData(); // $tag ZCRMTag实例
	

示例输入


				{
    "tags": [
       {
            "conflict_id": "2000000039012"
        }
    ]
}			

示例响应


				{
    "tags": [
       {
            "code": "SUCCESS",
            "message": "tags merged successfully",
            "status": "success",
            "details": {
                "created_by": {
                    "id": "2000000030874",
                    "name": "Medical"
                },
                "created_time": "2017-03-24T11:08:23+05:30",
                "id": "2000000088041",
                "modified_by": {
                    "id": "2000000030444",
                    "name": "Chems"
                },
                "modified_time": "2017-03-24T11:08:23+05:30"
            }
        }
    ]
}			

示例请求


				ZCRMTag tagIns = ZCRMTag.GetInstance(3372164000001557003); //3372164000001557003 标签ID
ZCRMTag tagmergeIns = ZCRMTag.GetInstance(3372164000001521002); //3372164000001521002 冲突的标签ID
APIResponse response = tagIns.Merge(tagmergeIns);
ZCRMTag merge = (ZCRMTag)response.Data;			

示例输入


				{
    "tags": [
       {
            "conflict_id": "2000000039012"
        }
    ]
}			

示例响应


				{
    "tags": [
       {
            "code": "SUCCESS",
            "message": "tags merged successfully",
            "status": "success",
            "details": {
                "created_by": {
                    "id": "2000000030874",
                    "name": "Medical"
                },
                "created_time": "2017-03-24T11:08:23+05:30",
                "id": "2000000088041",
                "modified_by": {
                    "id": "2000000030444",
                    "name": "Chems"
                },
                "modified_time": "2017-03-24T11:08:23+05:30"
            }
        }
    ]
}