You can use this method to search records by expressions of the selected columns.
XML Format:
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi
JSON Format:
https://crm.zoho.com/crm/private/json/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi
Note:
| Parameter | Data Type | Description |
| authtoken* | String | Encrypted alphanumeric string to authenticate your Zoho credentials. |
| scope* | String | Specify crmapi as the scope |
| selectColumns* | String | Module(optional columns) i.e, Leads(Last Name,Website,Email) OR All |
| searchCondition* | String | (Created By|=|username) |
| newFormat | Integer | newFormat=1: To exclude fields with "null" values while inserting data from your CRM account. newFormat=2: To include fields with "null" values while inserting data from your CRM account. |
| fromIndex | Integer | Default value - 1 |
| toIndex | Integer | Default value - 20 Maximum value - 200 |
| version | Integer | version = 1: (Default value) This will fetch responses based on the earlier API implementation i.e prior to the enhancements made. version = 2: This will fetch responses based on the latest API implementation. |
* - Mandatory parameter
Note:
While using this method, ensure selectColumns and searchCondition parameters are set as mandatory. You can specify the following expressions in API request:
If you want to select Lead Name,Company,Email,Mobile,Website from Leads and Email should contain "@sample.com",Search API request should be as given below:
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi&newFormat=1&selectColumns=Leads(Lead Name,Company,Email,Mobile,Website)&searchCondition=(Email|contains|*@sample.com*)
If you want to select Company,Email,Website from Leads and No of Employees should be greater than 100, Search API request should be as given below:
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi&newFormat=1&selectColumns=Leads(Company,Email,Website)&searchCondition=(No of Employees|>|100)
If you want to select Lead Name,Email from Leads and Company should start with "Zoho", then the search API request should be as given below:
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi&newFormat=1&selectColumns=Leads(Lead Name,Email)&searchCondition=(Company|starts with|Zoho*)
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi
&selectColumns=Leads(First Name,Last Name,Email,Company)&searchCondition=(Email|=|test@test.com)
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi
&selectColumns=Leads(First Name,Last Name,Email,Company)
&searchCondition=(Annual Revenue|>|1000)
Note:
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi
&selectColumns=Leads(First Name,Last Name,Email,Company)
&searchCondition=(customfield1|<|1000)
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi
&selectColumns=Leads(First Name,Last Name,Email,Company)
&searchCondition=(Company|contains|*oho*)
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi
&selectColumns=Leads(First Name,Last Name,Email,Company)
&searchCondition=(Company|starts with|zoho*)
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi
&selectColumns=Leads(First Name,Last Name,Email,Company)
&searchCondition=(Company|ends with|*zoho)
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords?authtoken=Auth Token&scope=crmapi
&selectColumns=All
&searchCondition=(Email|=|test@test.com)
You can use the attached program to run and test the working of the getSearchRecords method in your Java Environment.
The Java Program contains the following:
Click here to download the program