Hello,
I want to integrate the API of last seven days orders in magento2.For Integrate the API of all orders which parameters I set.
Any suggestion regarding this is very helpful.
Thank You
Solved! Go to Solution.
Maybe with something like this?
/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=created_at&searchCriteria[filter_groups][0][filters][0][value]=2018-05-04T00:00:00.0000000Z&searchCriteria[filter_groups][0][filters][0][condition_type]=from&searchCriteria[filter_groups][1][filters][0][field]=created_at&searchCriteria[filter_groups][1][filters][0][value]=2018-05-11T00:00:00.0000000Z&searchCriteria[filter_groups][1][filters][0][condition_type]=to&searchCriteria[currentPage]=1&searchCriteria[pageSize]=100
You should calculate your dates dinamically but I guess this should work.
Maybe with something like this?
/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=created_at&searchCriteria[filter_groups][0][filters][0][value]=2018-05-04T00:00:00.0000000Z&searchCriteria[filter_groups][0][filters][0][condition_type]=from&searchCriteria[filter_groups][1][filters][0][field]=created_at&searchCriteria[filter_groups][1][filters][0][value]=2018-05-11T00:00:00.0000000Z&searchCriteria[filter_groups][1][filters][0][condition_type]=to&searchCriteria[currentPage]=1&searchCriteria[pageSize]=100
You should calculate your dates dinamically but I guess this should work.
Hello @Damian Culotta,
Thanks For your response. It really helps me. I can change it like :
/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=created_at&searchCriteria[filter_groups][0][filters][0][value]=2018-05-11T00:00:00.0000000Z&searchCriteria[filter_groups][0][filters][0][condition_type]=from&searchCriteria[currentPage]=1&searchCriteria[pageSize]=10
Thanks again.