30 August 2022
CartsOrdersExtensibilityGraphQL
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, andshippingfields to Cart and Order. - [API] Added
shippingMode,shipping, andcustomShippingfields to CartDraft. - [API] Added
taxedPricePortionsandperMethodTaxRatefields to LineItem. - [API] Added
shippingMethodKeyfield 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
shippingKeyto AddDelivery update action on Orders API. - [API] Added
taxedPricePortionsto OrderLineItemDiscountSetMessage - [API] Added
shippingKeyto DeliveryAddedMessage, DeliveryAddressSetMessage, DeliveryItemsUpdatedMessage, DeliveryRemovedMessage, ParcelAddedToDeliveryMessage, ParcelItemsUpdatedMessage, ParcelMeasurementsUpdatedMessage, ParcelRemovedFromDeliveryMessage, and ParcelTrackingDataUpdatedMessage. - [API] Added
shippingKeyto 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
AddOrderDeliverytype:- Input field
shippingKeywas added toAddOrderDeliverytype
- Input field
- [GraphQL API] Changed the
SetStagedOrderLineItemTaxAmountOutputtype:- Added the
shippingKeyfield to theSetStagedOrderLineItemTaxAmountOutputtype.
- Added the
- [GraphQL API] Changed the
SetCartLineItemTaxAmounttype:- Input field
shippingKeywas added toSetCartLineItemTaxAmounttype
- Input field
- [GraphQL API] Changed the
MyCartUpdateActiontype:- Input field
setShippingCustomFieldwas added toMyCartUpdateActiontype - Input field
setShippingCustomTypewas added toMyCartUpdateActiontype
- Input field
- [GraphQL API] Changed the
ParcelRemovedFromDeliverytype:- Added the
shippingKeyfield to theParcelRemovedFromDeliverytype.
- Added the
- [GraphQL API] Changed the
ParcelMeasurementsUpdatedtype:- Added the
shippingKeyfield to theParcelMeasurementsUpdatedtype.
- Added the
- [GraphQL API] Changed the
SetCartLineItemTaxRatetype:- Input field
shippingKeywas added toSetCartLineItemTaxRatetype
- Input field
- [GraphQL API] Changed the
SetStagedOrderLineItemTaxRatetype:- Input field
shippingKeywas added toSetStagedOrderLineItemTaxRatetype
- Input field
- [GraphQL API] Changed the
DeliveryAddedtype:- Added the
shippingKeyfield to theDeliveryAddedtype.
- Added the
- [GraphQL API] Changed the
ShippingTargetDraftTypetype:- Input field
shippingMethodKeywas added toShippingTargetDraftTypetype
- Input field
- [GraphQL API] Changed the
ItemShippingTargettype:- Added the
shippingMethodKeyfield to theItemShippingTargettype.
- Added the
- [GraphQL API] Changed the
SetStagedOrderLineItemTaxAmounttype:- Input field
shippingKeywas added toSetStagedOrderLineItemTaxAmounttype
- Input field
- [GraphQL API] Changed the
AddStagedOrderDeliveryOutputtype:- Added the
shippingKeyfield to theAddStagedOrderDeliveryOutputtype.
- Added the
- [GraphQL API] Changed the
SetStagedOrderLineItemTaxRateOutputtype:- Added the
shippingKeyfield to theSetStagedOrderLineItemTaxRateOutputtype.
- Added the
- [GraphQL API] Changed the
OrderLineItemDiscountSettype:- Added the
taxedPricePortionsfield to theOrderLineItemDiscountSettype.
- Added the
- [GraphQL API] Changed the
CartUpdateActiontype:- Input field
setShippingCustomTypewas added toCartUpdateActiontype - Input field
setShippingCustomFieldwas added toCartUpdateActiontype
- Input field
- [GraphQL API] Changed the
ParcelTrackingDataUpdatedtype:- Added the
shippingKeyfield to theParcelTrackingDataUpdatedtype.
- Added the
- [GraphQL API] Changed the
AddStagedOrderDeliverytype:- Input field
shippingKeywas added toAddStagedOrderDeliverytype
- Input field
- [GraphQL API] Changed the
DeliveryRemovedtype:- Added the
shippingKeyfield to theDeliveryRemovedtype.
- Added the
- [GraphQL API] Changed the
StagedOrderUpdateActiontype:- Input field
setShippingCustomFieldwas added toStagedOrderUpdateActiontype - Input field
setShippingCustomTypewas added toStagedOrderUpdateActiontype
- Input field
- [GraphQL API] Changed the
ParcelItemsUpdatedtype:- Added the
shippingKeyfield to theParcelItemsUpdatedtype.
- Added the
- [GraphQL API] Changed the
DeliveryItemsUpdatedtype:- Added the
shippingKeyfield to theDeliveryItemsUpdatedtype.
- Added the
- [GraphQL API] Changed the
OrderUpdateActiontype:- Input field
setShippingCustomFieldwas added toOrderUpdateActiontype - Input field
setShippingCustomTypewas added toOrderUpdateActiontype
- Input field
- [GraphQL API] Changed the
ParcelAddedToDeliverytype:- Added the
shippingKeyfield to theParcelAddedToDeliverytype.
- Added the
- [GraphQL API] Changed the
DeliveryAddressSettype:- Added the
shippingKeyfield to theDeliveryAddressSettype.
- 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: SetCartShippingCustomField
setShippingCustomType: SetCartShippingCustomType
}
extend input AddStagedOrderDelivery {
shippingKey: String
}
extend input MyCartUpdateAction {
setShippingCustomField: SetCartShippingCustomField
setShippingCustomType: SetCartShippingCustomType
}
extend input SetCartLineItemTaxRate {
shippingKey: String
}
extend input OrderUpdateAction {
setShippingCustomField: SetOrderShippingCustomField
setShippingCustomType: SetOrderShippingCustomType
}
extend input SetStagedOrderLineItemTaxRate {
shippingKey: String
}
extend input StagedOrderUpdateAction {
setShippingCustomField: SetStagedOrderShippingCustomField
setShippingCustomType: SetStagedOrderShippingCustomType
}
type MethodTaxedPrice {
shippingMethodKey: String!
taxedPrice: TaxedItemPrice
}
input SetCartShippingCustomField {
shippingKey: String
name: String!
value: String
}
input SetCartShippingCustomType {
shippingKey: String
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
}
input SetOrderShippingCustomField {
shippingKey: String
name: String!
value: String
}
input SetOrderShippingCustomType {
shippingKey: String
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
}
input SetStagedOrderShippingCustomField {
shippingKey: String
name: String!
value: String
}
type SetStagedOrderShippingCustomFieldOutput implements StagedOrderUpdateActionOutput {
type: String!
shippingKey: String
name: String!
value: Json
}
input SetStagedOrderShippingCustomType {
shippingKey: String
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
}
type SetStagedOrderShippingCustomTypeOutput implements StagedOrderUpdateActionOutput {
type: String!
shippingKey: String
custom: CustomFieldsCommand!
}