AnsweredAssumed Answered

Searching with v10 API returns inconsistent results with filter

Question asked by rstoeber rstoeber on Mar 9, 2014
Latest reply on Feb 11, 2015 by meveridge
Using Sugar Professional On-Demand, I've been experimenting with the API to create some very, very simple dashboards for a few users.  Most things work as expected, but I just tripped over something that seems odd.

Using a filter like below with the endpoint:  /Quotes/filter

    "filter" => array(
                array(
                    "id" => array(
                        '$contains'=>"fc6e",
                    )
                )
                ),
    "order_by" => "name:DESC"

The above returns the expected result, that is a single Quote where the ID contains fc6e.  I can do the same to search for other fields like account_name or quote_stage, and I get the expected result every time.

The problem is that I really want to search using the account_id field and that doesn't work.  I've been trying exact matches as well as $contains like the above example, but it just doesn't work.  When I try to search on specific account_id it seems to ignore the filter and return all Quotes.

Am I doing something wrong, or is this a bug in the API?


Outcomes