MageSmith
MutationQuote · Magento 2.4.9

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

[AvailableShippingMethod]

Resolver class

Magento\QuoteGraphQl\Model\Resolver\EstimateShippingMethods

Arguments

input EstimateTotalsInput! Required

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

Content-Type
application/json
Store
default store view code; use 'default' for the single-store baseline
Authorization
Bearer <CUSTOMER_TOKEN> obtain from generateCustomerToken mutation

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": ""
  }
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.