When I try to add to card any item via REST API I get this error:
"{"message":"\"%fieldName\" is required. Enter and try again.","parameters":{"fieldName":"quoteId"}}"
First time I get the cart id calling this
"rest/V1/carts/mine"
than I call
"rest/V1/carts/mine/items"
with this data:
{
"cartItem": {
"sku": "24-WG080",
"qty": 1,
"quote_id": cartID
}
}
Tried with cart-item, quoteId, quote_id and more...
I'm stuck, I have no ideea what is wrong, the documentation is wrong? https://devdocs.magento.com/guides/v2.4/rest/tutorials/orders/order-add-items.html
Enabed developer mode, and now I got this error in response:
"#0 [internal function]: Magento\Quote\Model\Quote\Item\Repository->save(Object(Magento\Quote\Model\Quote\Item))
#1 /home2/xxx/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#2 /home2/xxx/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))
#3 /home2/xxx/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /home2/xxx/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)
#5 /home2/xxx/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#6 /home2/xxx/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#7 /home2/xxx/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#8 /home2/xxx/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#9 /home2/xxx/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#10 /home2/xxx/pub/index.php(29): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#11 {main}"