@gradientedge/commercetools-utils
    Preparing search index...

    Interface CartSetShippingMethodAction

    To set the Cart's Shipping Method the Cart must have the Single ShippingMode and a shippingAddress.

    This update is not allowed when the Cart is [frozen](/api/carts-orders-overview#freeze-a-cart) with the `HardFreeze` [FreezeStrategy](ctp:api:type:FreezeStrategy).
    
    interface CartSetShippingMethodAction {
        action: "setShippingMethod";
        externalTaxRate?: ExternalTaxRateDraft;
        shippingMethod?: ShippingMethodResourceIdentifier;
    }

    Hierarchy (View Summary)

    Index
    action: "setShippingMethod"
    externalTaxRate?: ExternalTaxRateDraft

    An external Tax Rate can be set if the Cart has the External TaxMode.

    Value to set. If empty, any existing value is removed.

    [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned in one of the following cases:
      1. If the referenced Shipping Method has a predicate that does not match the Cart.
      2. If the referenced Shipping Method is not active.
      3. If the referenced Shipping Method is associated with a Store that is different from the Cart's Store.
      4. If the referenced Shipping Method is associated with a Store and the Cart is not associated with any Store.