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

interface MyCartSetShippingMethodAction {
    action: "setShippingMethod";
    externalTaxRate?: ExternalTaxRateDraft;
    shippingMethod?: ShippingMethodResourceIdentifier;
}

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 has a predicate that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.

Generated using TypeDoc