'Giving HTTP Status 400 – Bad Request | Zoho API | searchParams |

I am referring this documentation from Zoho https://www.zoho.com/people/api/forms-api/search-record.html

I am unable to get desired results

I even tried with example mentioned on website too using URL

https://people.zoho.com/people/api/forms/employee/getRecords?searchParams={searchField: Employeestatus, searchOperator: Is, searchText : Active}

and passing auth token

But it returns

HTTP Status 400 – Bad Request

Error while fetching using postman



Solution 1:[1]

The documentation does say GET here (at least at the time of writing) - but the request does actually work with a POST and sending the searchParams as form data.

curl example:

curl --location --request POST 'https://people.zoho.com/people/api/forms/employee/getRecords' \
--header 'Authorization: Zoho-oauthtoken [...]' \
--form 'searchParams="{searchField: Employeestatus, searchOperator: Is, searchText: Active}"'

Also, make sure to use the right dedicated domain for your Zoho CRM v2 API for all requests!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1