How to search for NULL value in a freshsales api call

I’d like to create a search in the freshsales api and want to filter out records with no value NULL

This is what i tried already.

curl -H “Authorization: Token token=api key” -H “Content-Type: application/json” -X GET “https://companyname.freshsales.io/api/deals/view/123456789?include=owner&q=‘null’&f=closed_date&page=1&per_page=100

I hope someone can help me out.

Can you try building up your query for every field you want to search null value?
for example: group_id=null&agent_id=null

1 Like

The API that you have mentioned is used to fetch a list of deals based on the view id

GET -> /api/deals/view/[view_id]

But for search, there is another API

GET -> /api/search?q=[query param]&include=[entities]

For example, if you want to search the deals with a null value for the closed date

curl -H ‘Authorization: Token token=api key’ -H ‘Content-Type:application/json’ -X POST https://companyname.freshsales.io/api/filtered_search/deal -d ‘{ “filter_rule” [{ “attribute” : “closed_date”, “operator”:“is_in”, “value”:""}] }’

documentation for reference - Freshsales | Refreshingly new CRM & Deal Management Software

Since you have mixed both list of deals and search API, I am not able to get exactly what you are trying. I have given an example as per my understanding. It would be nice if you can clarify in case that’s wrong

3 Likes

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.