3

I am trying to get the pending orders for a specific customer using :

https://{domain.com}/index.php/rest/V1/orders?searchCriteria[filter_g‌​roups][0][filters][0‌​][field]=status&searchCriteria[filter_groups][0][filters][0][value]=pending& searchCriteria[filter_groups][0][filters][0][condition_type]‌​=eq&searchCriteria[filter_groups][0][filters][0][field]=customer_email&searchCriteria[filter_groups][0][filters][0][value][email protected]

But I got this error :

Report ID: webapi-58e37396d92a8; Message: Property "FilterG‌​roups" does not have corresponding setter in class "Magento\Framework\Api\SearchCriteria". in /var/www/html/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php:195

How can I fix it?

-Another question, This API forces me to use an Admin token. I see it is not security wise. How can I use a customer token ?

7
  • I want to return the orders for a specific customer. at all I did it. but Is there is a solution for the second question?
    – Jsparo30
    Apr 4, 2017 at 12:04
  • I want to know: This part is working or not: https://domain.com/index.php/rest/V1/orders? searchCriteria[filter_g‌​roups][0][filters][0‌​][field]=stat‌​us& searchCriteria[filter_groups][0][filters][0][value]=pending& searchCriteria[filter_groups][0][filters][0][condition_type]‌​‌​=eq? Apr 4, 2017 at 12:07
  • No it is not working, I meaning for a specific customer. https://domain.com/index.php/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=customer_email&searchCriteria[filter_groups][0][filters][0][value][email protected]&searchCriteria[filter_groups][0][filters][0][condition_type]=eq&searchCriteria[filter_groups][1][filters][0][field]=status&searchCriteria[filter_groups][1][filters][0][value]=pending&searchCriteria[filter_groups][1][filters][0][condition_type]=eq
    – Jsparo30
    Apr 4, 2017 at 12:14
  • Yes, already i tried this before and is working. do you have any idea about the second part of the question?
    – Jsparo30
    Apr 4, 2017 at 12:17
  • Try to get: https://domain.com/index.php/rest/V1/orders? searchCriteria[filter_g‌​roups][0][filters][0‌​][field]=stat‌​us& searchCriteria[filter_groups][0][filters][0][value]=pending& searchCriteria[filter_groups][0][filters][0][condition_type]‌​‌​=eq& searchCriteria[filter_groups][0][filters][1][field]=customer‌​_email& searchCriteria[filter_groups][0][filters][1][value]=aaa@gmai‌​l.com& searchCriteria[filter_groups][0][filters][1][condition_type]‌​‌​=eq Apr 4, 2017 at 12:18

2 Answers 2

0

https://domain.com/index.php/rest/V1/orders?searchCriteria[f‌​ilter_groups][0][fil‌​ters][0][field]=cust‌​omer_email&searchCri‌​teria[filter_groups]‌​[0][filters][0][valu‌​e][email protected]&se‌​archCriteria[filter_‌​groups][0][filters][‌​0][condition_type]=e‌​q&searchCriteria[fil‌​ter_groups][1][filte‌​rs][0][field]=status‌​&searchCriteria[filt‌​er_groups][1][filter‌​s][0][value]=pending‌​&searchCriteria[filt‌​er_groups][1][filter‌​s][0][condition_type‌​]=eq

0

None of Above works for me unless below one.

http://domain.com/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=status& searchCriteria[filter_groups][0][filters][0][value]=pending& searchCriteria[filter_groups][0][filters][0][condition_type]=eq

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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