What are the possible attributes of deals to use in Freshsales Filtered Search API

Hi everyone, hope you’re having a great day.

So, I need to use the Freshsales’ Filtered Search API, to filter deals based on the time range of the attribute closed_date and possibly others. However, the documentation isn’t very clear on which are these attributes and how can I use them properly.

Is there a list of all available attributes of deals to use in this API call? And if so, is it possible to use custom fields as well?

I’ve read the documentation, yet, the only example I could find, was for the attribute email of contact. I’ve also seen some topics here in the community, with this similar query, but I couldn’t find an answer regarding this question.


Hi @Matheus_Souza_Silva ,

Thanks for highlighting it. And apologies for the inconvenience caused and delayed response.

If I understand correctly you are trying to filter deals based on closed_date and wish to know what other filters can be applied.

  1. The allowed possible filters are available as part of List Deals endpoint. Under Section 1. Filtering deals you may notice Filters API, i.e., GET /api/deals/filters endpoint that gives the available list of filters. Using these filters one could view the response using View API, Eg, GET /crm/sales/api/deals/view/4.

  2. The List all Deal Fields API gives details of the deal fields and GET /api/settings/deals/fields?include=field_group includes the group they belong to.

  3. For specific deals you can include additional data by embedding include option.

  4. Additionally you can use parameters such as sort and sort_type as shown in section 2 of List API

I appreciate the candid feedback and will work with teams internally for these documents updated and to be made more clearer with additional examples.


1 Like

Hi @Thakur_Ganeshsingh.

Thanks for the examples you’ve brought up. I appreciate the effort to update the documentation! Unfortunately though, I was looking for a way to use the Search API, sadly, I wasn’t very clear on my question :confused: .

I wanted to know what attributes are available to use on the Search API. For example, in this curl request (from the documentation), we’ve got ‘attribute’ field.

curl -H 'Authorization: Token token=sfg999666t673t7t82' -H 'Content-Type:application/json' -X POST https://domain.myfreshworks.com/crm/sales/api/filtered_search/contact -d '{ "filter_rule" : [{"attribute" : "contact_email.email", "operator":"is_in", "value":"janesampleton@gmail.com"}] }'

The ‘attribute’ field accesses ‘email’ through ‘contact_email’, and I don’t believe ‘contact_email’ appears in other API requests, only email, as a field of contact. Because of that, I don’t know how can I properly include, for example, the ‘closed_date’ field of ‘deal’, or others, in the request body of this API.

Therefore, with the proper context given, what are the possible attributes that can be used for the Search API for ‘deals’? And also, which are the available operators?