2

This question already has an answer here:

I am trying to pull a list of sales orders updated between 2/27/2016 12:00 AM to 10/29/2016 11:59 PM. What should my URL look like? Here is what I have:

http://magentohost.com/index.php/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=created_at&searchCriteria[filter_groups][0][filters][0][value]=2/26/2016&searchCriteria[filter_groups][0][filters][0][condition_type]=gt&searchCriteria[filter_groups][1][filters][1][field]=created_at&searchCriteria[filter_groups][1][filters][1][value]=10/29/2016&searchCriteria[filter_groups][1][filters][1][condition_type]=lt

marked as duplicate by Siarhey Uchukhlebau, liyakat, mbalparda, Amit Bera, Manthan Dave Aug 22 '17 at 11:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

I think you will need to use from and to as the condition type values. So your search will look like

searchCriteria[filter_groups][0][filters][0][field]=created_at&searchCriteria[filter_groups][0][filters][0][value]=2016-02-29%2017:12:00&searchCriteria[filter_groups][0][filters][0][condition_type]=from&searchCriteria[filter_groups][1][filters][1][field]=created_at&searchCriteria[filter_groups][1][filters][1][value]=2016-10-29%2023:59:00&searchCriteria[filter_groups][1][filters][1][condition_type]=to

  • This helped me, but I don't understand why they need to be in separate filter groups? Can't they be two filters in the same group? – peedee Sep 9 '16 at 6:14
  • never mind, just found the answer to my question here: magento.stackexchange.com/a/91024/24432 – peedee Sep 9 '16 at 6:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.