How To Searching Records In CRM Modules

Here We learn How to Search Record in ZOHO modules using APIs in Curl Request.

How to Search Record In Zoho Modules

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 the Below URL.

https://www.thecodehubs.com/generate-access-code-using-postman-for-zoho

2: Create a zoho-search.php file to Search records in the module and put below code in this file

Request URL :

https://www.zohoapis.com/crm/v2/{Module_name}/search

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

Here We need some parameter to pass to search record in zoho Module.

1) criteria :
=> Below criteria are use for searching record.
(({api_name}:{starts_with|equals}:{value})and/or({api_name}:{starts_with|equals}:{value}))

example:
((Last_Name:equals:Burlie,B)and(First_Name:starts_with:L));

2) email: search records by email parameter
3) phone : search record by phone parameter
4) page: To get the list of records from the respective pages.
=> Default value for page is 1.
5) per_page : To get the list of records available per page.
=> Default value for page is 200.

<?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, "GET" );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$response = curl_exec($ch);
curl_close($ch);
?>

 

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe

Select Categories