0

Endpoint

POST http://<host>/rest/default/V1/order/3/ship

where 3 is the order id.

Headers

Content-Type application/json

Authorization Bearer <administrator token>

Request Body:

{
"items": [
{
"extensionAttributes": {},
"orderItemId": 96,

"qty": 1
}
],
"notify": true,
"appendComment": true,
"comment": {
"comment": "Tracking URl : www.tackingurl.com/id?123456789",
"isVisibleOnFront": 0
},
"tracks": [
{
"trackNumber": "1234567890",
"title": "SHIPPING",
"carrier_code": "shipping"
}
]
}

Response:

[2018-03-09 08:29:06] report.CRITICAL: ReflectionException: Class array does not exist in C:\xampp\htdocs\Local\vendor\magento\framework\Webapi\ServiceInputProcessor.php:149
Stack trace:
#0 C:\xampp\htdocs\Local\vendor\magento\framework\Webapi\ServiceInputProcessor.php(149): ReflectionClass->__construct('array')
#1 C:\xampp\htdocs\Local\vendor\magento\framework\Webapi\ServiceInputProcessor.php(319): Magento\Framework\Webapi\ServiceInputProcessor->_createFromArray('array', Array)
#2 C:\xampp\htdocs\Local\vendor\magento\framework\Webapi\ServiceInputProcessor.php(119): Magento\Framework\Webapi\ServiceInputProcessor->convertValue(Array, 'array[]')
#3 C:\xampp\htdocs\Local\app\code\Local\AuthAclOverride\Controller\Rest\InputParamsResolver.php(121): Magento\Framework\Webapi\ServiceInputProcessor->process('Magento\\Sales\\A...', 'execute', Array)
#4 C:\xampp\htdocs\Local\vendor\magento\module-webapi\Controller\Rest.php(299): Local\AuthAclOverride\Controller\Rest\InputParamsResolver->resolve()
#5 C:\xampp\htdocs\Local\vendor\magento\module-webapi\Controller\Rest.php(216): Magento\Webapi\Controller\Rest->processApiRequest()
#6 C:\xampp\htdocs\Local\vendor\magento\framework\Interception\Interceptor.php(146): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#7 C:\xampp\htdocs\Local\var\generation\Magento\Webapi\Controller\Rest\Interceptor.php(39): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#8 C:\xampp\htdocs\Local\vendor\magento\framework\App\Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#9 C:\xampp\htdocs\Local\vendor\magento\framework\App\Bootstrap.php(258): Magento\Framework\App\Http->launch()
#10 C:\xampp\htdocs\Local\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#11 {main}

Next Exception: Report ID: webapi-5aa245d25da78; Message: Class array does not exist in C:\xampp\htdocs\Local\vendor\magento\framework\Webapi\ErrorProcessor.php:195
Stack trace:
#0 C:\xampp\htdocs\Local\vendor\magento\framework\Webapi\ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(ReflectionException))
#1 C:\xampp\htdocs\Local\vendor\magento\module-webapi\Controller\Rest.php(219): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(ReflectionException))
#2 C:\xampp\htdocs\Local\vendor\magento\framework\Interception\Interceptor.php(146): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 C:\xampp\htdocs\Local\var\generation\Magento\Webapi\Controller\Rest\Interceptor.php(39): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#4 C:\xampp\htdocs\Local\vendor\magento\framework\App\Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#5 C:\xampp\htdocs\Local\vendor\magento\framework\App\Bootstrap.php(258): Magento\Framework\App\Http->launch()
#6 C:\xampp\htdocs\Local\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#7 {main} [] []
0

Change the return types to mixed[] and string[] instead of array. It may fix the issue .

Your Answer

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

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