Request Details

Request URL

https://www.zohoapis.com/bigin/v1/settings/tags?module={module_api_name}

To update a specific tag: https://www.zohoapis.com/bigin/v1/settings/tags/{tag_id}?module={module_api_name}

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope=ZohoBigin.settings.ALL
(or)
scope=ZohoBigin.settings.tags.{operation_type}

Possible operation types

ALL - Full data access
WRITE - Edit tag data
UPDATE - Update tag data

Parameters

  • modulestring, mandatory

    Specify the API name of the module such as Contacts, Accounts, Deals, etc,.

Sample Request

Copiedcurl "https://www.zohoapis.com/bigin/v1/settings/tags?module=Contacts"
-X PUT
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@multipletagupdate.json"
CopiedZCRMModule modulesIns = ZCRMModule.getInstance("Leads");
List<ZCRMTag> tags = new ArrayList<ZCRMTag>();
ZCRMTag tag1 = ZCRMTag.getInstance(3719520000000459011L);
tag1.setName("Name3");
ZCRMTag tag2 = ZCRMTag.getInstance(3719520000000470002L);
tag2.setName("Name4");
tags.add(tag1);
tags.add(tag2);
BulkAPIResponse response = modulesIns.updateTags(tags); //tags - list of ZCRMTag instances filled with required data for update.
List<ZCRMTag> updatedtags = (List<ZCRMTag>) response.getData(); //tags - list of ZCRMTag instances
List<EntityResponse> entityResponses = response.getEntityResponses(); //entityResponses - list of EntityResponse instance
Copieddef update_tags(self):
        try:
            tag_ins_array = []
            tag1 = ZCRMTag.get_instance("3719520000000531002", "Sample4")
            tag2 = ZCRMTag.get_instance("3719520000000533002", "Sample5")
            tag_ins_array.append(tag1)
            tag_ins_array.append(tag2)
            resp = ZCRMModule.get_instance("Leads").update_tags(tag_ins_array)
            print(resp.status_code)
            tag_created = resp.data
            for tag_ins in tag_created:
                print(tag_ins.id)
                print(tag_ins.name)
                print(tag_ins.created_by.id)
                print(tag_ins.created_by.name)
                print(tag_ins.modified_by.id)
                print(tag_ins.created_by.id)
                print(tag_ins.created_time)
                print(tag_ins.modified_time)
            entity_responses = resp.bulk_entity_response
            for entity_response in entity_responses:
                print(entity_response.details)
                print(entity_response.status)
                print(entity_response.message)
                print(entity_response.code)
        except ZCRMException as ex:
            print(ex.status_code)
            print(ex.error_message)
            print(ex.error_code)
            print(ex.error_details)
            print(ex.error_content)
Copied/** Multiple Tag updates */
$zcrmModuleIns=ZCRMModule::getInstance("Leads");
$tagsArray= array();
$tag = ZCRMTag::getInstance("3372164000001597013");
$tag->setName("Name3");
array_push($tagsArray, $tag);
$tag = ZCRMTag::getInstance("3372164000001585002");
$tag->setName("Name4");
array_push($tagsArray, $tag);
$bulkAPIResponse = $zcrmModuleIns->updateTags($tagsArray); //$tagsArray - array of ZCRMTag instances
$tags = $bulkAPIResponse->getData(); //$tags - array of ZCRMTag instances
CopiedZCRMModule modulesIns = ZCRMModule.GetInstance("Leads");
List<ZCRMTag> tags = new List<ZCRMTag>();
ZCRMTag tag1 = ZCRMTag.GetInstance(3372164000001536001);
tag1.Name = "Name3";
ZCRMTag tag2 = ZCRMTag.GetInstance(3372164000001536002);
tag2.Name = "Name4";
tags.Add(tag1);
tags.Add(tag2);
BulkAPIResponse<ZCRMTag> response = modulesIns.UpdateTags(tags); //tags - list of ZCRMTag instances filled with required data for update.
List<ZCRMTag> updatedtags = response.BulkData; //tags - list of ZCRMTag instances
List<EntityResponse> entityResponses = response.BulkEntitiesResponse; //entityResponses - list of EntityResponse instance
Copiedtag1 = Map();
tag1.put("name", "chem");
tag1.put("id", "692969000000995008");

tag2 = Map();
tag2.put("name", "Agriculture");
tag2.put("id", "692969000000995002");

tags_list = List();
tags_list.add(tag1);
tags_list.add(tag2);

param = Map();
param.put("tags", tags_list);

res = invokeurl
[
	url :"https://www.zohoapis.com/crm/v2/settings/tags?module=Leads"
	type :PUT
	parameters: param.toString()
	connection:"crm_oauth_connection"
];
info res;

In the input, @multipletagupdate.json contains the sample input data.

Input JSON Keys

  • idstring, mandatory for updating multiple tags

    Specify the unique ID of the tag that you want to update.

Sample Input

Copied{
    "tags": [
       {
            "id": "410888000000482039",
            "name": "Chems"
        },
       {
            "id": "410888000000482040",
            "name": "Agricultural"
        }
    ]
}

Possible Errors

  • INVALID_MODULEHTTP 400

    The module name given seems to be invalid
    Resolution: You have specified an invalid module name or there is no tab permission, or the module could have been removed from the available modules. Specify a valid module API name.

  • INVALID_URL_PATTERNHTTP 404

    Please check if the URL trying to access is a correct one
    Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to request URL section above.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: Client does not have ZohoBigin.settings.tags.UPDATE scope. Create a new client with valid scope. Refer to scope section above.

  • NO_PERMISSIONHTTP 403

    Permission denied to update tag details
    Resolution: The user does not have permission to update tags. Contact your system administrator.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in Server. Contact support team.

  • INVALID_REQUEST_METHODHTTP 400

    The http request method type is not a valid one
    Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above.

  • AUTHORIZATION_FAILEDHTTP 400

    User does not have sufficient privilege to update tags
    Resolution: The user does not have the permission to update tags. Contact your system administrator.

  • INVALID_DATAHTTP 200

    invalid data
    Resolution: The input specified is incorrect. Specify a valid input.

  • DUPLICATE_DATAHTTP 200

    duplicate data
    Resolution: You have specified a duplicate value for one or more unique fields. Refer to Fields Metadata API to know the unique fields.

  • MANDATORY_NOT_FOUNDHTTP 200

    required field not found
    Resolution: You have not specified one or more mandatory fields in the input. Refer to Fields Metadata API to know the mandatory fields.

  • REQUIRED_PARAM_MISSINGHTTP 400

    One of the expected parameter is missing
    Resolution: 'module' parameter is missing in the request. Please specify the API name of the module. Refer to Modules API to get valid module API names.

Sample Response

Copied{
    "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"
            }
        },
       {
            "code": "SUCCESS",
            "message": "tags updated successfully",
            "status": "success",
            "details": {
                "created_by": {
                    "id": "2000000030344",
                    "name": "Agricultural"
                },
                "created_time": "2017-03-24T11:08:23+05:30",
                "id": "2000000088041",
                "modified_by": {
                    "id": "2000000038764",
                    "name": "Rural"
                },
                "modified_time": "2017-03-24T11:08:23+05:30"
            }
        }
    ]
}