1

Github issue: https://github.com/magento/magento2/issues/1578

It works for processing status, however I get an error for completed or closed

curl -X GET -H "Authorization: Bearer ufkm720fkvqix2v0dhhs8xvpp3g4lmcc" -H "Cache-Control: no-cache" -H "Postman-Token: 366814d0-e058-7b89-c896-5670fb4fadb9" 'http://magento2.app/index.php/rest/V1/orders?criteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bfield%5D=status&criteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bvalue%5D=processing'

result: {"items":[]}

curl -X GET -H "Authorization: Bearer ufkm720fkvqix2v0dhhs8xvpp3g4lmcc" -H "Cache-Control: no-cache" -H "Postman-Token: 366814d0-e058-7b89-c896-5670fb4fadb9" 'http://magento2.app/index.php/rest/V1/orders?criteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bfield%5D=status&criteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bvalue%5D=closed'
{"message":"Internal Error. Details are available in Magento log file. Report ID: webapi-55b7959277fcb"}

The log is as following:

[2015-07-28 14:45:38] main.CRITICAL: exception 'Exception' with message 'Report ID: webapi-55b7959277fcb; 
Message: Notice: Array to string conversion in /home/vagrant/laravel-root/magento2/lib/internal/Magento/Framework/Reflection/TypeCaster.php on line 34' in /home/vagrant/laravel-root/magento2/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php:194
Stack trace:
#0 /home/vagrant/laravel-root/magento2/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Exception))
#1 /home/vagrant/laravel-root/magento2/app/code/Magento/Webapi/Controller/Rest.php(191): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Exception))
#2 /home/vagrant/laravel-root/magento2/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /home/vagrant/laravel-root/magento2/lib/internal/Magento/Framework/App/Http.php(115): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /home/vagrant/laravel-root/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(257): Magento\Framework\App\Http->launch()
#5 /home/vagrant/laravel-root/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#6 {main} [] []

Can you point me in a right direction? Do you think it's a magento 2 bug?

Thank you

Magento 2 Rest API: http://devdocs.magento.com/guides/v2.0/rest/restApi/restCollection/Magento/Sales/Service/V1/OrderList/orderList.html

Token-based authentication: http://devdocs.magento.com/guides/v2.0/get-started/authentication/gs-authentication-token.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.