Multiple Shipping Methods for Carts and Orders
You can now add multiple Shipping Methods to a Cart and Order. This is useful for cases where you want to have individual Shipping Methods for each Line Item ordered from a Cart.
A newly introduced shippingMode
on Cart and Order controls whether Carts and Orders can have single or multiple Shipping Methods. The default ShippingMode is Single
for backwards compatibility. For Carts and Orders with multiple Shipping Methods, all shipping-related information (such as address, rate, deliveries) are wrapped in a newly introduced Shipping object per Shipping Method. The Shipping object can also be extended with Custom Fields.
Additionally, you can add deliveries to Carts during Cart creation, which was previously only possible on Orders.
Changes:
- [API] Added Shipping, ShippingDraft, CustomShippingDraft, ShippingMode, MethodTaxRate, and MethodTaxedPrice to Carts API.
- [API] Added
taxedShippingPrice
,shippingMode
, andshipping
fields to Cart and Order. - [API] Added
shippingMode
,shipping
, andcustomShipping
fields to CartDraft. - [API] Added
taxedPricePortions
andperMethodTaxRate
fields to LineItem. - [API] Added
shippingMethodKey
field to ItemShippingTarget. - [API] Added Add Custom ShippingMethod, Add ShippingMethod, Remove ShippingMethod, Set Shipping CustomField, and Set Shipping Custom Type update actions to Carts API.
- [API] Added
shippingKey
to AddDelivery update action on Orders API. - [API] Added
taxedPricePortions
to OrderLineItemDiscountSetMessage - [API] Added
shippingKey
to DeliveryAddedMessage, DeliveryAddressSetMessage, DeliveryItemsUpdatedMessage, DeliveryRemovedMessage, ParcelAddedToDeliveryMessage, ParcelItemsUpdatedMessage, ParcelMeasurementsUpdatedMessage, ParcelRemovedFromDeliveryMessage, and ParcelTrackingDataUpdatedMessage. - [API] Added
shippingKey
to Set LineItem TaxRate and Set LineItem TaxAmount update actions to Carts API and Order Edits API. - [GraphQL API] Added the following types to the GraphQL schema:
MethodTaxedPrice
,SetCartShippingCustomField
,SetCartShippingCustomType
,SetOrderShippingCustomField
,SetOrderShippingCustomType
,SetStagedOrderShippingCustomField
,SetStagedOrderShippingCustomFieldOutput
,SetStagedOrderShippingCustomType
,SetStagedOrderShippingCustomTypeOutput
. - [GraphQL API] Changed the
AddOrderDelivery
type:- Input field
shippingKey
was added toAddOrderDelivery
type
- Input field
- [GraphQL API] Changed the
SetStagedOrderLineItemTaxAmountOutput
type:- Added the
shippingKey
field to theSetStagedOrderLineItemTaxAmountOutput
type.
- Added the
- [GraphQL API] Changed the
SetCartLineItemTaxAmount
type:- Input field
shippingKey
was added toSetCartLineItemTaxAmount
type
- Input field
- [GraphQL API] Changed the
MyCartUpdateAction
type:- Input field
setShippingCustomField
was added toMyCartUpdateAction
type - Input field
setShippingCustomType
was added toMyCartUpdateAction
type
- Input field
- [GraphQL API] Changed the
ParcelRemovedFromDelivery
type:- Added the
shippingKey
field to theParcelRemovedFromDelivery
type.
- Added the
- [GraphQL API] Changed the
ParcelMeasurementsUpdated
type:- Added the
shippingKey
field to theParcelMeasurementsUpdated
type.
- Added the
- [GraphQL API] Changed the
SetCartLineItemTaxRate
type:- Input field
shippingKey
was added toSetCartLineItemTaxRate
type
- Input field
- [GraphQL API] Changed the
SetStagedOrderLineItemTaxRate
type:- Input field
shippingKey
was added toSetStagedOrderLineItemTaxRate
type
- Input field
- [GraphQL API] Changed the
DeliveryAdded
type:- Added the
shippingKey
field to theDeliveryAdded
type.
- Added the
- [GraphQL API] Changed the
ShippingTargetDraftType
type:- Input field
shippingMethodKey
was added toShippingTargetDraftType
type
- Input field
- [GraphQL API] Changed the
ItemShippingTarget
type:- Added the
shippingMethodKey
field to theItemShippingTarget
type.
- Added the
- [GraphQL API] Changed the
SetStagedOrderLineItemTaxAmount
type:- Input field
shippingKey
was added toSetStagedOrderLineItemTaxAmount
type
- Input field
- [GraphQL API] Changed the
AddStagedOrderDeliveryOutput
type:- Added the
shippingKey
field to theAddStagedOrderDeliveryOutput
type.
- Added the
- [GraphQL API] Changed the
SetStagedOrderLineItemTaxRateOutput
type:- Added the
shippingKey
field to theSetStagedOrderLineItemTaxRateOutput
type.
- Added the
- [GraphQL API] Changed the
OrderLineItemDiscountSet
type:- Added the
taxedPricePortions
field to theOrderLineItemDiscountSet
type.
- Added the
- [GraphQL API] Changed the
CartUpdateAction
type:- Input field
setShippingCustomType
was added toCartUpdateAction
type - Input field
setShippingCustomField
was added toCartUpdateAction
type
- Input field
- [GraphQL API] Changed the
ParcelTrackingDataUpdated
type:- Added the
shippingKey
field to theParcelTrackingDataUpdated
type.
- Added the
- [GraphQL API] Changed the
AddStagedOrderDelivery
type:- Input field
shippingKey
was added toAddStagedOrderDelivery
type
- Input field
- [GraphQL API] Changed the
DeliveryRemoved
type:- Added the
shippingKey
field to theDeliveryRemoved
type.
- Added the
- [GraphQL API] Changed the
StagedOrderUpdateAction
type:- Input field
setShippingCustomField
was added toStagedOrderUpdateAction
type - Input field
setShippingCustomType
was added toStagedOrderUpdateAction
type
- Input field
- [GraphQL API] Changed the
ParcelItemsUpdated
type:- Added the
shippingKey
field to theParcelItemsUpdated
type.
- Added the
- [GraphQL API] Changed the
DeliveryItemsUpdated
type:- Added the
shippingKey
field to theDeliveryItemsUpdated
type.
- Added the
- [GraphQL API] Changed the
OrderUpdateAction
type:- Input field
setShippingCustomField
was added toOrderUpdateAction
type - Input field
setShippingCustomType
was added toOrderUpdateAction
type
- Input field
- [GraphQL API] Changed the
ParcelAddedToDelivery
type:- Added the
shippingKey
field to theParcelAddedToDelivery
type.
- Added the
- [GraphQL API] Changed the
DeliveryAddressSet
type:- Added the
shippingKey
field to theDeliveryAddressSet
type.
- Added the
The following changes were introduced in terms of GraphQL SDL:
extend type AddStagedOrderDeliveryOutput {shippingKey: String}extend type SetStagedOrderLineItemTaxRateOutput {shippingKey: String}extend type OrderLineItemDiscountSet {taxedPricePortions: [MethodTaxedPrice!]!}extend type SetStagedOrderLineItemTaxAmountOutput {shippingKey: String}extend type ParcelRemovedFromDelivery {shippingKey: String}extend type ParcelItemsUpdated {shippingKey: String}extend type ParcelMeasurementsUpdated {shippingKey: String}extend type DeliveryAdded {shippingKey: String}extend type ItemShippingTarget {shippingMethodKey: String}extend type ParcelTrackingDataUpdated {shippingKey: String}extend type DeliveryRemoved {shippingKey: String}extend type DeliveryItemsUpdated {shippingKey: String}extend type ParcelAddedToDelivery {shippingKey: String}extend type DeliveryAddressSet {shippingKey: String}extend input ShippingTargetDraftType {shippingMethodKey: String}extend input SetStagedOrderLineItemTaxAmount {shippingKey: String}extend input AddOrderDelivery {shippingKey: String}extend input SetCartLineItemTaxAmount {shippingKey: String}extend input CartUpdateAction {setShippingCustomField: SetCartShippingCustomFieldsetShippingCustomType: SetCartShippingCustomType}extend input AddStagedOrderDelivery {shippingKey: String}extend input MyCartUpdateAction {setShippingCustomField: SetCartShippingCustomFieldsetShippingCustomType: SetCartShippingCustomType}extend input SetCartLineItemTaxRate {shippingKey: String}extend input OrderUpdateAction {setShippingCustomField: SetOrderShippingCustomFieldsetShippingCustomType: SetOrderShippingCustomType}extend input SetStagedOrderLineItemTaxRate {shippingKey: String}extend input StagedOrderUpdateAction {setShippingCustomField: SetStagedOrderShippingCustomFieldsetShippingCustomType: SetStagedOrderShippingCustomType}type MethodTaxedPrice {shippingMethodKey: String!taxedPrice: TaxedItemPrice}input SetCartShippingCustomField {shippingKey: Stringname: String!value: String}input SetCartShippingCustomType {shippingKey: Stringfields: [CustomFieldInput!]type: ResourceIdentifierInputtypeKey: StringtypeId: String}input SetOrderShippingCustomField {shippingKey: Stringname: String!value: String}input SetOrderShippingCustomType {shippingKey: Stringfields: [CustomFieldInput!]type: ResourceIdentifierInputtypeKey: StringtypeId: String}input SetStagedOrderShippingCustomField {shippingKey: Stringname: String!value: String}type SetStagedOrderShippingCustomFieldOutput implements StagedOrderUpdateActionOutput {type: String!shippingKey: Stringname: String!value: Json}input SetStagedOrderShippingCustomType {shippingKey: Stringfields: [CustomFieldInput!]type: ResourceIdentifierInputtypeKey: StringtypeId: String}type SetStagedOrderShippingCustomTypeOutput implements StagedOrderUpdateActionOutput {type: String!shippingKey: Stringcustom: CustomFieldsCommand!}