更新特定标签

目的

更新与单个或多个记录关联的标签。

请求URL

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

tag_id - 标签的唯一ID

module_api_name - 模块的API名称

请求方法

PUT

范围

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

 
可能的操作类型
ALL - 完全数据访问
WRITE - 编辑标签数据
UPDATE - 更新标签数据

参数

参数名称数据类型描述
module (必填)字符串指定模块的API名称,如lead、Contacts、Accounts、Deals等,

示例请求

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


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

示例输入


				{
    "tags": [
       {
            "name": "Chems"
        }
    ]
}			

示例响应


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

示例请求


				/** 单个标签更新 */
$zcrmTagIns= ZCRMTag::getInstance("3372164000001597013","Leads");//3372164000001597013 标签ID,模块API名称
$zcrmTagIns->setName("Sup1");
$apiResponse = $zcrmTagIns->update();
$tag = $apiResponse->getData(); //$tag - ZCRMTag实例			

示例输入


				{
    "tags": [
       {
            "name": "Chems"
        }
    ]
}			

示例响应


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

示例请求


				"Leads");//3372164000001597013标签ID,模块API名称
tagIns.Name = "updateName";
APIResponse response = tagIns.Update();
ZCRMTag tag = (ZCRMTag)response.Data;			

示例输入


				{
    "tags": [
       {
            "name": "Chems"
        }
    ]
}			

示例响应


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