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
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
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...