How to search/filter tickets for ticket status is not closed and resolved in freshdesk?

Hi all,

 I am try to one day filter tickets for  ticket status not 4  and 5  in freshdesk .Using this api 

https://domin.freshdesk.com/api/v2/search/tickets?query=“created_at:‘2022-03-12’%20AND%20(status:!4%20AND%20status:!5)”&page=1

how to use query to fix the requirement

Hi Annalakshmi

Good day!

As far as I have understood your use case, you want to get all tickets created X days ago ( In your case 1 day ) and also the status should not be 4 or 5.

If that is the case, instead of using a not condition for the status you can rather give all the accepted status values apart from 4 and 5

So now your url should look like this
https://{{domain}}.freshdesk.com/api/v2/search/tickets?query="(status:2 OR status:3 OR status:6 OR status:7 OR status:8) AND created_at:'2022-03-13'"

Hope this helps you out, if not please let us know :slightly_smiling_face:

hi banupriya,

yes, this is fine but my freshdesk domain tickert status is 20 above ,so all the status is list in the api is not good.

so any another apporach is there.