Remove Tags from Multiple Records

Purpose

To delete the tags associated with multiple records.

Request URL

https://www.zohoapis.com/crm/v2/{module_api_name}/actions/remove_tags?ids={entity_id}&tag_names={tag1},{tag2}

module_api_name - The api name of the module

Request Method

POST

Scope

scope=ZohoCRM.modules.all
(or)
scope=ZohoCRM.modules.{module_name}.{operation_type}

Possible module namesPossible operation types
leads, accounts, contacts, deals, campaigns, tasks, cases, events, calls, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, and customALL - Full data access
WRITE - Edit tag data
DELETE - Delete tag data

Parameters

Parameter NameData TypeDescription
ids (mandatory)IntegerSpecify the unique ID of the records
tag_names
(mandatory)
StringSpecify the names of the tags you want to remove from the record

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v2/Contacts/actions/remove_tags?ids=1234567890,123456789&tag_names=From Email,In progress"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
CopiedZCRMModule recordIns = ZCRMModule.getInstance("Leads");//Module Api Name
List<String> tagNames = new ArrayList<String>();
List<Long> recordIds = new ArrayList<Long>();
recordIds.add(3719520000000329001L);
recordIds.add(3719520000000326007L);
tagNames.add("From Email");
tagNames.add("In Progress");
BulkAPIResponse response = ((ZCRMModule) recordIns).removeTagsFromRecords(recordIds,tagNames); //tagNames is array
List<ZCRMRecord> record = (List<ZCRMRecord>)response.getData();
List<EntityResponse> entityResponses = response.getEntityResponses(); // entityResponses - list of EntityResponse instance
Copied    def remove_tag_multiple_records(self):
        try:
            tag_names = ["4", "5"]
            record_ids = ["3719520000000320001", "3719520000000318001"]
            resp = ZCRMModule.get_instance("Leads").remove_tags_from_multiple_records(tag_names, record_ids)
            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)
                print(entity_response.data.entity_id)
                for tag in entity_response.data.tag_list:
                    print(tag.name)
        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/** Remove Tags from Multiple records */
$zcrmModuleIns = ZCRMModule::getInstance("Leads");
$tagNames = array("Name7","Name8");
$recordids = array("3372164000001494008","3372164000001295433");
$bulkAPIResponse = $zcrmModuleIns->removeTagsFromRecords($recordids, $tagNames); //$recordids array of record id, $tagName array of tag names
$records = $bulkAPIResponse->getData(); //$records - array of ZCRMRecord instances
CopiedZCRMModule moduleIns = ZCRMModule.GetInstance("Leads"); // module api name
List<string> tagNames = new List<string> { "Name7", "Name8" };
List<long> recordIds = new List<long> { 3372164000001494008, 3372164000001295433 };
BulkAPIResponse<ZCRMRecord> response = moduleIns.RemoveTagsFromRecords(recordIds, tagNames); //recordIds list of record id, tagNames list of tag names
List<ZCRMRecord> records = response.BulkData; //records - list of ZCRMRecord instances
List<EntityResponse> entityResponses = response.BulkEntitiesResponse; // entityResponses - list of EntityResponse instance

Sample Response

Copied{
    "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"
        }
    ]
}
Copied{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "id": "3719520000000326007",
                "tags": [
                    "From Email",
                    "In Progress"
                ]
            },
            "message": "tags updated successfully",
            "status": "success"
        },
       {
            "code": "SUCCESS",
            "details": {
                "id": "3719520000000329001",
                "tags": [
                    "From Webforms",
                    "Negotiation"
                ]
            },
            "message": "tags updated successfully",
            "status": "success"
        }
    ]
}
Copied{
    "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"
        }
    ]
}
Copied{
    "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"
        }
    ]
}
Copied{
    "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"
        }
    ]
}

Sample Response

Copied{
    "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"
        }
    ]
}
Copied{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "id": "3719520000000326007",
                "tags": [
                    "From Email",
                    "In Progress"
                ]
            },
            "message": "tags updated successfully",
            "status": "success"
        },
       {
            "code": "SUCCESS",
            "details": {
                "id": "3719520000000329001",
                "tags": [
                    "From Webforms",
                    "Negotiation"
                ]
            },
            "message": "tags updated successfully",
            "status": "success"
        }
    ]
}
Copied{
    "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"
        }
    ]
}
Copied{
    "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"
        }
    ]
}
Copied{
    "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"
        }
    ]
}

Sample Response

Copied{
    "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"
        }
    ]
}
Copied{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "id": "3719520000000326007",
                "tags": [
                    "From Email",
                    "In Progress"
                ]
            },
            "message": "tags updated successfully",
            "status": "success"
        },
       {
            "code": "SUCCESS",
            "details": {
                "id": "3719520000000329001",
                "tags": [
                    "From Webforms",
                    "Negotiation"
                ]
            },
            "message": "tags updated successfully",
            "status": "success"
        }
    ]
}
Copied{
    "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"
        }
    ]
}
Copied{
    "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"
        }
    ]
}
Copied{
    "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"
        }
    ]
}

Sample Response

Copied{
    "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"
        }
    ]
}
Copied{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "id": "3719520000000326007",
                "tags": [
                    "From Email",
                    "In Progress"
                ]
            },
            "message": "tags updated successfully",
            "status": "success"
        },
       {
            "code": "SUCCESS",
            "details": {
                "id": "3719520000000329001",
                "tags": [
                    "From Webforms",
                    "Negotiation"
                ]
            },
            "message": "tags updated successfully",
            "status": "success"
        }
    ]
}
Copied{
    "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"
        }
    ]
}
Copied{
    "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"
        }
    ]
}
Copied{
    "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"
        }
    ]
}