cancel
Showing results for 
Search instead for 
Did you mean: 

No shipping method for guest carts

No shipping method for guest carts

Hi,

 

In the Magento Back-Office, I have enabled the Flat Rate method (Stores > Configuration > Sales > Shipping Methods).

 

Indeed, this shipping method is retrieved through the following enpoint:

 

GET V1/carts/:cartId/shipping-methods

...However this only hapens for regular carts!

 

When attempting to retrive shipping methods for a guest cart this time, I'm getting an empty array:

 

GET V1/guest-carts/:cartId/shipping-methods

Does anyone have an idea on what's going wrong here?

 

Cheers,

Dave

2 REPLIES 2

Re: No shipping method for guest carts

Hello @david_iux 

 

You can try with below shared API:

rest/default/V1/guest-carts/:quoteId/estimate-shipping-methods

Or did you already added billing and shipping address for that cart? if not please add first both address and then try 

GET V1/guest-carts/:cartId/shipping-methods
Manish Mittal
https://www.manishmittal.com/

Re: No shipping method for guest carts

Hi @Manish Mittal,

 

I tried the first enpoint you gave to me: it returns an empty array.

 

About what you write after, did you already added billing and shipping address for that cart? if not please add first both address, I only found 1 endpoint to do so:

 

 

/V1/guest-carts/{cartId}/shipping-information

 

But according to the documentation (https://devdocs.magento.com/redoc/2.3/admin-rest-api.html#operation/checkoutGuestShippingInformation...), both shipping_carrier_code and shipping_method_code have to be part of the payload. And since I can't retrieve any shipping method, my question remains...