Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zoho V2 Rest API Search Criteria

As Zoho is going to deprecate the v1 support for rest API. I am changing the API's to support v2.

Earlier there was a field in Lead module saying lastModifiedTime which helped to get only those leads which are modified. And the query string contained lastModifiedTime={SOMEDATETIME}.

But in the new version of API, I am not able to apply that criteria. Below is my URL.

https://www.zohoapis.com/crm/v2/Leads/search?criteria=(Modified Time:equals:2018-07-19T17:39:46+05:30)

I tried different fields but all the date fields are giving me the below error.

{ "code": "INVALID_QUERY", "details": { "reason": "the field is not available for search", "api_name": "Modified Time" }, "message": "invalid query formed", "status": "error" }

like image 932
Furquan Khan Avatar asked Sep 06 '25 03:09

Furquan Khan


1 Answers

It returns this error when you enter a non-existent API field name (or a hidden or inactive field). I was having the same problem, then I discovered that the API field name was spelled wrong (I was spelling it right, but it was spelled wrong in the database). Anyway, in your case it's probably just that you're missing the underscore; your API field name should probably be Modified_Time, as spaces are not allowed in API field names.

like image 102
Clark Avatar answered Sep 08 '25 00:09

Clark