Typescript SDK Type Docs
    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

    Properties

    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.

    If the referenced Shipping Method is inactive, or has a predicate that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.