API Problem - GET Contacts Adding filter_by = Status.Active Negates Other Parameters

API Problem - GET Contacts Adding filter_by = Status.Active Negates Other Parameters

When the parameter filter_by is set to Status.Active in an API request, the returned results do not conform to the other parameters given.

For example, the following request:
  1. {
  2. params = Map();
  3. params.put("organization_id","#########");
  4. params.put("contact_type","vendor");
  5. params.put("filter_by","Status.Active");
  6. params.put("company_name_contains","Rush Printers");
  7. params.put("page",1);
  8. params.put("per_page",5);
  9. response = invokeurl
  10. [
  11. url :"https://www.zohoapis.com/books/v3/contacts"
  12. type :GET
  13. parameters:params
  14. connection:"books"
  15. ];
  16. info response;
  17. }
This request returned a response that include all of my Contacts (vendors and customers) in ascending alphabetical order.

However, making one small tweak in the code to comment out the Status.Active parameter yielded different results:
  1. {
  2. params = Map();
  3. params.put("organization_id","#########");
  4. params.put("contact_type","vendor");
  5. //params.put("filter_by","Status.Active");
  6. params.put("company_name_contains","Rush Printers");
  7. params.put("page",1);
  8. params.put("per_page",5);
  9. response = invokeurl
  10. [
  11. url :"https://www.zohoapis.com/books/v3/contacts"
  12. type :GET
  13. parameters:params
  14. connection:"books"
  15. ];
  16. info response;
  17. }

Just commenting out line 5 and re-running delivered exactly the results one would expect; it returned just the vendor Rush Printers.

Beyond testing this in a Deluge runner (I used the runner in Zoho Flow), this behavior has also been observed in a Zia Agent using the Zoho Books listVendor tool on that platform.

When the parameter for filter_by is set to Status.Active, I get all vendors returned without screening for company_name or any other set parameter. When I remove that value, the correct results are returned.

This seems to be a similar issue reported in Zoho Invoice 8+ years ago:
https://help.zoho.com/portal/en/community/topic/using-multiple-filters-when-getting-contacts-from-contacts-api