-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GET /V1/carts/mine/items is returning "cartId is a required field" #1443
Comments
Just to demonstrate that the web API token authorisation is working, here is a request for the authenticated customer's cart: {
:method => :get,
:body => "{\"id\":1,\"created_at\":\"2015-07-05 17:30:40\",\"updated_at\":\"0000-00-00 00:00:00\",\"is_active\":true,\"is_virtual\":false,\"items_count\":0,\"items_qty\":0,\"customer\":{\"id\":1,\"group_id\":1,\"created_at\":\"2015-07-05 16:29:15\",\"created_in\":\"Default Store View\",\"email\":\"marc@marctauber.com\",\"firstname\":\"Marc\",\"lastname\":\"Tauber\",\"store_id\":1,\"website_id\":1,\"addresses\":[],\"disable_auto_group_change\":0},\"checkout_method\":\"login_in\",\"shipping_address\":{\"region\":null,\"region_id\":null,\"region_code\":null,\"country_id\":null,\"street\":[\"\"],\"telephone\":null,\"postcode\":null,\"city\":null,\"firstname\":null,\"lastname\":null,\"email\":\"marc@marctauber.com\"},\"billing_address\":{\"region\":null,\"region_id\":null,\"region_code\":null,\"country_id\":null,\"street\":[\"\"],\"telephone\":null,\"postcode\":null,\"city\":null,\"firstname\":null,\"lastname\":null,\"email\":\"marc@marctauber.com\"},\"orig_order_id\":0,\"currency\":{\"global_currency_code\":\"GBP\",\"base_currency_code\":\"GBP\",\"store_currency_code\":\"GBP\",\"quote_currency_code\":\"GBP\",\"store_to_base_rate\":0,\"store_to_quote_rate\":0,\"base_to_global_rate\":1,\"base_to_quote_rate\":1},\"customer_is_guest\":false,\"customer_note_notify\":true,\"customer_tax_class_id\":3,\"store_id\":1}",
:url => #<URI::HTTP http://localhost/magento2/rest/V1/carts/mine>,
:request => {
:params_encoder => nil,
:proxy => nil,
:bind => nil,
:timeout => nil,
:open_timeout => nil,
:boundary => nil,
:oauth => nil
},
:request_headers => {
"User-Agent" => "Faraday v0.9.1",
"Authorization" => "Bearer e9txps1sw6mrv1qf48ihrrx9rtku3uj2",
"Content-Type" => "application/json"
},
:ssl => {
:verify => nil,
:ca_file => nil,
:ca_path => nil,
:verify_mode => nil,
:cert_store => nil,
:client_cert => nil,
:client_key => nil,
:certificate => nil,
:private_key => nil,
:verify_depth => nil,
:version => nil
},
:response_headers => {
"date" => "Sun, 05 Jul 2015 16:52:24 GMT",
"server" => "Apache/2.2.26 (Unix) DAV/2 PHP/5.6.10 mod_ssl/2.2.26 OpenSSL/0.9.8za",
"x-powered-by" => "PHP/5.6.10",
"set-cookie" => "PHPSESSID=a0mbekqfjqnbpd89o0vq6k0hm4; expires=Sun, 05-Jul-2015 17:52:24 GMT; Max-Age=3600; path=/magento2; domain=localhost; HttpOnly",
"expires" => "Thu, 19 Nov 1981 08:52:00 GMT",
"cache-control" => "no-store, no-cache, must-revalidate, post-check=0, pre-check=0",
"pragma" => "no-cache",
"content-length" => "1168",
"connection" => "close",
"content-type" => "application/json; charset=utf-8"
},
:status => 200
} |
Internal ticket: MAGETWO-39766 |
@sauberia, issue is fixed and available in develop branch. Please, check the fix and let us know if it doesn't work for you. |
I just encountered this issue in Magento 2.1.5 when checking out as a registered user with a saved address. It is preventing the user from selecting a shipping method. I have traced the error to a 400 Bad Request... Request URL =
|
I also encounter this issue eventually on Magento 2.1.3 |
I have the same error and debugged it. In the end there is something else wrong which I described here: #9744 |
I'm also getting this error, probably from #9744, any ideas how to resolve this? |
The webapi.xml for Quote specifies the getList method but I believe this should be getListForCustomer instead.
Likewise, PUT /V1/carts/mine/items/:itemId should use saveForCustomer and DELETE /V1/carts/mine/items/:itemId should use deleteByIdForCustomer.
Here is a ruby hash of the the request and response:
The text was updated successfully, but these errors were encountered: