Adds a Shipping Method for a specified shipping address to a Cart with Multiple ShippingMode.

interface CartAddShippingMethodAction {
    action: "addShippingMethod";
    custom?: CustomFieldsDraft;
    deliveries?: DeliveryDraft[];
    externalTaxRate?: ExternalTaxRateDraft;
    shippingAddress: _BaseAddress;
    shippingKey: string;
    shippingMethod: ShippingMethodResourceIdentifier;
    shippingRateInput?: ShippingRateInputDraft;
}

Properties

action: "addShippingMethod"

Custom Fields for the Shipping Method.

deliveries?: DeliveryDraft[]

Deliveries to be shipped with the referenced Shipping Method.

externalTaxRate?: ExternalTaxRateDraft

Tax Rate used to tax a shipping expense if the Cart has the External TaxMode.

shippingAddress: _BaseAddress

Determines the shipping rate and Tax Rate of the Line Items.

shippingKey: string

User-defined identifier for the Shipping that must be unique across the Cart with Multiple ShippingMode.

RecourceIdentifier to a ShippingMethod to add to the Cart with Multiple ShippingMode. If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned.

shippingRateInput?: ShippingRateInputDraft

Input used to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

- If `CartClassification`, it must be [ClassificationShippingRateInputDraft](ctp:api:type:ClassificationShippingRateInputDraft).
- If `CartScore`, it must be [ScoreShippingRateInputDraft](ctp:api:type:ScoreShippingRateInputDraft).
- If `CartValue`, it cannot be set.

Generated using TypeDoc