estimateShippingMethods
estimateShippingMethods is a Magento 2 GraphQL mutation in the Quote module. Estimate shipping method(s) for cart based on address. It returns [AvailableShippingMethod] and requires an Authorization header (Bearer customer token).
Last verified: against Magento 2.4.9.
Returns
Resolver class
Magento\QuoteGraphQl\Model\Resolver\EstimateShippingMethods
Arguments
An input object that specifies details for estimation of available shipping methods
Example request
Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.
Headers
Query
mutation ($input: EstimateTotalsInput!) {
estimateShippingMethods(input: $input) {
carrier_code
carrier_title
method_code
method_title
error_message
amount {
value
currency
}
base_amount {
value
currency
}
price_excl_tax {
value
currency
}
price_incl_tax {
value
currency
}
available
}
}Variables
{
"input": {
"address": {
"country_code": "AF"
},
"cart_id": ""
}
}Related in QuoteGraphQl
Other fields shipped by the same module.
addProductsToCart
Add any type of product to the cart.
Quote · returns AddProductsToCartOutput
addSimpleProductsToCart
Add one or more simple products to the specified cart. We recommend using `addProductsToCart` instead.
Quote · returns AddSimpleProductsToCartOutput
addVirtualProductsToCart
Add one or more virtual products to the specified cart. We recommend using `addProductsToCart` instead.
Quote · returns AddVirtualProductsToCartOutput
applyCouponToCart
Apply a pre-defined coupon code to the specified cart.
Quote · returns ApplyCouponToCartOutput
assignCustomerToGuestCart
phpcs:ignore Magento2.GraphQL.ValidArgumentName
Quote · returns Cart!
cart
phpcs:ignore Magento2.GraphQL.ValidArgumentName
Quote · returns Cart
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.