Filtered Search with OR operator

How could do a OR operator in the Filtered Search API (/api/filtered_search/contacts)? I’d like to achieve this feat “SELECT * FROM table where cf_account = ‘27000016548’ OR cf_account2 = ‘27000016548’”

with the json below but how about the OR operator?

{ 
    "filter_rule" : [
        {
            "attribute" : "cf_account", 
            "operator":"is_in", 
            "value":"27000016548"
        },
       {
            "attribute" : "cf_account2", 
            "operator":"is_in", 
            "value":"27000016548"
        }
    ] 
}

Hi John,

As far as I know Freshsales API documentation did not provide explicit support for the OR operator in the Filtered Search API (or others API).

What I recommend you do is make two separate requests: one for cf_account and another for cf_account2. Then, you can merge and deduplicate the results in your application. This is not the most efficient way, but it’s a workaround.

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