In my local environment, when I go to checkout, it throws me an error, and reviewing the console, I detected it is caused because the call to this endpoint returns me a 404:

carts/mine/estimate-shipping-methods-by-address-id returns

As I saw, it is because the request URL is adding the "checkout" parameter to the URL. I mean, the normal request should be:

http://[base URL]/rest/default/V1/carts/mine/estimate-shipping-methods-by-address-id

But in this environment is constructed like this:

http://[base URL]/checkout/rest/default/V1/carts/mine/estimate-shipping-methods-by-address-id

Adding the "checkout" word after the base URL. I think it is because is adding the full URL of the site as the base URL:

http://[base URL]/checkout/

But I don't understand why. It only happens in my local environment, not in production or staging. Did you know why this could happen?

1 Answer 1


Do you have any customization involving the javascript that makes that api request?

What should happen is that getUrlForEstimationShippingMethodsByAddressId is called in Magento_Checkout::js/model/resource-url-manager.js which calls to createUrl in Magento_Checkout::js/model/url-builder.js to build the rest api request url. One place you'll see this request being built is in Magento_Checkout::js/model/shipping-rate-processor/new-address.js.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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