删除一个特定的记录

目的

删除特定的实体或记录。

请求URL

https://www.zohoapis.com.cn/crm/v2/{module_api_name}/{record_id}

module_api_name - 模块的API名称

record_id - 记录的唯一ID

获取特定记录中支持的模块在这里也支持。

请求方法

DELETE

范围

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

可能的模块名称可能的操作类型
线索,客户,联系人,商机,市场活动,任务,服务支持,事件,通话,解决方案,产品,供货商,价格表,报价单,销售订单,采购订单,发货单,自定义模块和活动ALL - 完全访问记录
WRITE - 编辑模块中的记录
DELETE - 删除模块中的记录

备注:

  • 默认情况下,将执行与此API相关的所有工作流。

  • 所有与此API相关的子表单都将被删除。

示例请求

在上面的示例中,将删除ID为"410888000000698006"的线索记录。


				curl "https://www.zohoapis.com.cn/crm/v2/Leads/410888000000698006"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"			

示例响应


				{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "id": "410888000000698006"
            },
            "message": "record deleted",
            "status": "success"
        }
    ]
}			

示例请求


				ZCRMRecord record = ZCRMRecord.getInstance("Products",12347986875l);//模块API名称和记录ID
APIResponse response = record.delete();
String recStatus = response.getStatus();			

示例响应


				{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "id": "410888000000698006"
            },
            "message": "record deleted",
            "status": "success"
        }
    ]
}			

示例请求


				$zcrmRecordIns = ZCRMRecord::getInstance("Products", 410405000001042005); //记录ID
$apiResponse=$zcrmRecordIns->delete();			

示例响应


				{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "id": "410888000000698006"
            },
            "message": "record deleted",
            "status": "success"
        }
    ]
}			

示例请求


				def delete_record(self):
    try:
        record=ZCRMRecord.get_instance('Leads',1386586000001422011)#1386586000001422011 is leadid
        resp=record.delete()
        print resp.status_code
        print resp.code
        print resp.details
        print resp.message
        print resp.status
    except ZCRMException as ex:
        print ex.status_code
        print ex.error_message
        print ex.error_code
        print ex.error_details
        print ex.error_content			

示例响应


				{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "id": "410888000000698006"
            },
            "message": "record deleted",
            "status": "success"
        }
    ]
}			

示例请求


				ZCRMRecord record = ZCRMRecord.GetInstance("Products", 3372164000001633018);//模块API名称和记录ID
APIResponse response = record.Delete();			

示例响应


				{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "id": "410888000000698006"
            },
            "message": "record deleted",
            "status": "success"
        }
    ]
}