ZOHO

How To Delete Record in Zoho CRM Modules

Here We Learn How to delete Record in zoho modules using api in Curl Request.

How to Delete Data In Zoho Module

Before making the api call to Insert records with the rest apis we need to follow some Steps.

1: To generate the Auth Token, you need to follow Below URL.   

http://staging.thecodehubs.com/generate-access-code-using-postman-for-zoho

2: Create zoho-delete.php file to delete record in module and put below code in this file.

Request URL :

https://www.zohoapis.com/crm/v2/{Module_name}?ids={EntityID}

Where,
       Module_name: The API name of the module
       EntityID : The unique ID of the record
      Possible_Module_name: leads, accounts, contacts, deals, campaigns, tasks, cases, events, calls, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, custom, and notes.

<?php 
 
$header = array(
    'Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf" 
);

$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, "https://www.zohoapis.com/crm/v2/Leads?ids=420305000003465040,420405000006262021");
curl_setopt( $curl, CURLOPT_HTTPHEADER, $header );
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, "DELETE" );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$response = curl_exec($ch);
curl_close($ch);
?>

How to Delete Specific Record Data In Zoho Module

If We need to delete specific Record from module follow below code,

<?php
$header = array(
    'Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf" 
);

$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, "https://www.zohoapis.com/crm/v2/Leads/410684010002628013");
curl_setopt( $curl, CURLOPT_HTTPHEADER, $header );
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, "DELETE" );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$response = curl_exec($ch);
curl_close($ch);
?>

 

Jigna Mavani

I am a Senior WordPress developer at vision Infotech. I'm specialized in WordPress, WooCommerce, PHP, HTML, and jQuery.

Share
Published by
Jigna Mavani

Recent Posts

Testing hk

Testing

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

Operation

Testing

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

Create and Used PIPE in angular

In this article, we have to show Create and Used PIPE in angular

2 years ago

TETS NEW

test

2 years ago