I have 12 sales orders which have "store_id" = 1. Out of which 3 orders have "status" = "pending"
I get all the 12 orders when I make a GET request to http://mystore/index.php/rest/V1/orders?searchCriteria[filter_groups][0][filters][1][field]=store_id&searchCriteria[filter_groups][0][filters][1][value]=1
I want to make a OR search, I want all the orders for which "store_id" = 1 OR "status" = "pending" Ideally I should get all the 12 orders, but my following request gets back only 3 orders in response: http://mystore/index.php/rest/V1/orders?searchCriteria[filter_groups][0][filters][1][field]=store_id&searchCriteria[filter_groups][0][filters][1][value]=1&searchCriteria[filter_groups][0][filters][1][field]=status&searchCriteria[filter_groups][0][filters][1][value]=pending
I had the knowledge that different filters inside a filter group are merged the OR way. And the filter groups are merged the AND way.
But this is not working.
Even the following request gets 3 orders: searchCriteria[filter_groups][0][filters][0][field]=store_id&searchCriteria[filter_groups][0][filters][0][value]=1&searchCriteria[filter_groups][1][filters][0][field]=status&searchCriteria[filter_groups][1][filters][0][value]=pending
Both filter_groups and filters are being merged the AND way.
Please help.
Assumptions: There are no syntax mistakes in making the request.