All Release Notes

Added GraphQL support for Carts

14 August 2018
Enhancement
CartsCustomersGraphQL
  • [GraphQL API] The following types were added in the GraphQL schema: AddCartCustomLineItem, AddCartDiscountCode, AddCartItemShippingAddress, AddCartLineItem, AddCartPayment, AddCartShoppingList, AddMyCartLineItem, ApplyCartDeltaToCustomLineItemShippingDetailsTargets, ApplyCartDeltaToLineItemShippingDetailsTargets, BaseMoneyInput, Cart, CartDraft, CartOrigin, CartQueryResult, CartState, CartUpdateAction, ChangeCartCustomLineItemMoney, ChangeCartCustomLineItemQuantity, ChangeCartLineItemQuantity, ChangeCartTaxCalculationMode, ChangeCartTaxMode, ChangeCartTaxRoundingMode, ChangeMyCartTaxMode, ClassificationShippingRateInput, ClassificationShippingRateInputDraft, CustomLineItem, CustomLineItemDraft, Delivery, DeliveryItem, DiscountCodeInfo, DiscountCodeState, DiscountedLineItemPortion, DiscountedLineItemPrice, DiscountedLineItemPriceForQuantity, ExternalLineItemTotalPriceDraft, ExternalTaxAmountDraft, ExternalTaxRateDraft, HighPrecisionMoneyInput, InventoryMode, ItemShippingDetails, ItemShippingDetailsDraft, ItemShippingTarget, ItemState, LineItem, LineItemDraft, LineItemMode, LineItemPriceMode, MyCartDraft, MyCartUpdateAction, MyLineItemDraft, Parcel, ParcelMeasurements, PaymentInfo, RecalculateCart, RemoveCartCustomLineItem, RemoveCartDiscountCode, RemoveCartItemShippingAddress, RemoveCartLineItem, RemoveCartPayment, RoundingMode, ScoreShippingRateInput, ScoreShippingRateInputDraft, SetCartAnonymousId, SetCartBillingAddress, SetCartCountry, SetCartCustomField, SetCartCustomLineItemCustomField, SetCartCustomLineItemCustomType, SetCartCustomLineItemShippingDetails, SetCartCustomLineItemTaxAmount, SetCartCustomLineItemTaxRate, SetCartCustomShippingMethod, SetCartCustomType, SetCartCustomerEmail, SetCartCustomerGroup, SetCartCustomerId, SetCartDeleteDaysAfterLastModification, SetCartLineItemCustomField, SetCartLineItemCustomType, SetCartLineItemPrice, SetCartLineItemShippingDetails, SetCartLineItemTaxAmount, SetCartLineItemTaxRate, SetCartLineItemTotalPrice, SetCartLocale, SetCartShippingAddress, SetCartShippingAddressAndCustomShippingMethod, SetCartShippingAddressAndShippingMethod, SetCartShippingMethod, SetCartShippingMethodTaxAmount, SetCartShippingMethodTaxRate, SetCartShippingRateInput, SetCartTotalTax, SetCustomerGroup, SetCustomerNumber, SetMyCartShippingMethod, ShippingInfo, ShippingMethodState, ShippingRateInput, ShippingRateInputDraft, ShippingTargetDraft, TaxCalculationMode, TaxMode, TaxPortion, TaxPortionDraft, TaxedItemPrice, TaxedPrice, TrackingData, UpdateCartItemShippingAddress.
  • [GraphQL API] The following types were removed from the GraphQL schema: SetCustomerCustomerGroup, SetCustomerCustomerNumber.
  • [GraphQL API] Type Me was changed:
    • Field carts was added to Me type
    • Field activeCart was added to Me type
    • Field cart was added to Me type
  • [GraphQL API] Type Query was changed:
    • Field carts was added to Query type
    • Field cart was added to Query type
    • Field customerActiveCart was added to Query type
  • [GraphQL API] Type CustomerSignInResult was changed:
    • Field cart was added to CustomerSignInResult type
  • [GraphQL API] Type CustomerUpdateAction was changed:
    • CustomerUpdateAction.setCustomerGroup input field type changed from SetCustomerCustomerGroup to SetCustomerGroup
    • CustomerUpdateAction.setCustomerNumber input field type changed from SetCustomerCustomerNumber to SetCustomerNumber
  • [GraphQL API] Type Mutation was changed:
    • Field deleteCart was added to Mutation type
    • Field deleteMyCart was added to Mutation type
    • Field createMyCart was added to Mutation type
    • Field updateMyCart was added to Mutation type
    • Field updateCart was added to Mutation type
    • Field replicateCart was added to Mutation type
    • Field createCart was added to Mutation type

The following changes were introduced in the GraphQL schema (in SDL format):

extend type Me {
activeCart: Cart
cart(id: String!): Cart
carts(where: String, sort: [String!], limit: Int, offset: Int): CartQueryResult!
}
extend type CustomerSignInResult {
cart: Cart
}
extend type Query {
cart(id: String!): Cart
carts(where: String, sort: [String!], limit: Int, offset: Int): CartQueryResult!
customerActiveCart(customerId: String!): Cart
}
extend type Mutation {
createCart(draft: CartDraft!): Cart
createMyCart(draft: MyCartDraft!): Cart
deleteCart(id: String!, version: Long!, personalDataErasure: Boolean = false): Cart
deleteMyCart(id: String!, version: Long!): Cart
replicateCart(reference: ReferenceInput!): Cart
updateCart(id: String!, version: Long!, actions: [CartUpdateAction!]!): Cart
updateMyCart(id: String!, version: Long!, actions: [MyCartUpdateAction!]!): Cart
}
input AddCartCustomLineItem {
shippingDetails: ItemShippingDetailsDraft
custom: CustomFieldsDraft
quantity: Long
externalTaxRate: ExternalTaxRateDraft
taxCategory: ReferenceInput
slug: String!
money: BaseMoneyInput!
name: [LocalizedStringInput!]!
}
input AddCartDiscountCode {
code: String!
validateDuplicates: Boolean = false
}
input AddCartItemShippingAddress {
address: AddressInput!
}
input AddCartLineItem {
shippingDetails: ItemShippingDetailsDraft
externalTotalPrice: ExternalLineItemTotalPriceDraft
externalPrice: BaseMoneyInput
externalTaxRate: ExternalTaxRateDraft
custom: CustomFieldsDraft
catalog: ReferenceInput
distributionChannel: ResourceIdentifierInput
supplyChannel: ResourceIdentifierInput
variantId: Int
quantity: Long
sku: String
productId: String
}
input AddCartPayment {
payment: ResourceIdentifierInput!
}
input AddCartShoppingList {
shoppingList: ResourceIdentifierInput!
supplyChannel: ResourceIdentifierInput
distributionChannel: ResourceIdentifierInput
}
input AddMyCartLineItem {
shippingDetails: ItemShippingDetailsDraft
custom: CustomFieldsDraft
catalog: ReferenceInput
distributionChannel: ResourceIdentifierInput
supplyChannel: ResourceIdentifierInput
variantId: Int
quantity: Long
sku: String
productId: String
}
input ApplyCartDeltaToCustomLineItemShippingDetailsTargets {
customLineItemId: String!
targetsDelta: [ShippingTargetDraft!]!
}
input ApplyCartDeltaToLineItemShippingDetailsTargets {
lineItemId: String!
targetsDelta: [ShippingTargetDraft!]!
}
input BaseMoneyInput {
centPrecision: MoneyInput
highPrecision: HighPrecisionMoneyInput
}
"A shopping cart holds product variants and can be ordered. Each cart either belongs to a registered customer or is an anonymous cart."
type Cart {
id: String!
version: Long!
customerId: String
customer: Customer
customerEmail: String
anonymousId: String
lineItems: [LineItem!]!
customLineItems: [CustomLineItem!]!
totalPrice: Money!
taxedPrice: TaxedPrice
cartState: CartState!
shippingAddress: Address
billingAddress: Address
inventoryMode: InventoryMode!
taxMode: TaxMode!
taxRoundingMode: RoundingMode!
taxCalculationMode: TaxCalculationMode!
customerGroup: CustomerGroup
customerGroupRef: Reference
country: Country
shippingInfo: ShippingInfo
discountCodes: [DiscountCodeInfo!]!
refusedGifts: [CartDiscount!]!
refusedGiftsRefs: [Reference!]!
"This field contains non-typed data. Consider using `customFields` as a typed alternative."
customFieldsRaw(
"""
The names of the custom fields to include.
If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned.
"""
includeNames: [String!],
"""
The names of the custom fields to exclude.
If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned.
"""
excludeNames: [String!]): [RawCustomField!]
paymentInfo: PaymentInfo
locale: Locale
deleteDaysAfterLastModification: Int
shippingRateInput: ShippingRateInput
origin: CartOrigin!
createdAt: DateTime!
lastModifiedAt: DateTime!
itemShippingAddresses: [Address!]!
}
input CartDraft {
currency: Currency!
country: Country
inventoryMode: InventoryMode = None
inventoryReservationsExpireInMinutes: Int
custom: CustomFieldsDraft
customerEmail: String
shippingAddress: AddressInput
billingAddress: AddressInput
shippingMethod: ReferenceInput
taxMode: TaxMode = Platform
locale: Locale
deleteDaysAfterLastModification: Int
itemShippingAddresses: [AddressInput!] = []
discountCodes: [String!] = []
lineItems: [LineItemDraft!] = []
customLineItems: [CustomLineItemDraft!] = []
customerId: String
externalTaxRateForShippingMethod: ExternalTaxRateDraft
anonymousId: String
taxRoundingMode: RoundingMode = HalfEven
taxCalculationMode: TaxCalculationMode = LineItemLevel
customerGroup: ResourceIdentifierInput
shippingRateInput: ShippingRateInputDraft
origin: CartOrigin = Customer
}
enum CartOrigin {
"The cart was created by the merchant on behalf of the customer"
Merchant
"The cart was created by the customer. This is the default value"
Customer
}
type CartQueryResult {
offset: Int!
count: Int!
total: Long!
results: [Cart!]!
}
enum CartState {
"The cart was ordered. No further operations on the cart are allowed."
Ordered
"Anonymous cart whose content was merged into a customers cart on signin. No further operations on the cart are allowed."
Merged
"The cart can be updated and ordered. It is the default state."
Active
}
input CartUpdateAction {
addCustomLineItem: AddCartCustomLineItem
addDiscountCode: AddCartDiscountCode
addItemShippingAddress: AddCartItemShippingAddress
addLineItem: AddCartLineItem
addPayment: AddCartPayment
addShoppingList: AddCartShoppingList
applyDeltaToCustomLineItemShippingDetailsTargets: ApplyCartDeltaToCustomLineItemShippingDetailsTargets
applyDeltaToLineItemShippingDetailsTargets: ApplyCartDeltaToLineItemShippingDetailsTargets
changeCustomLineItemMoney: ChangeCartCustomLineItemMoney
changeCustomLineItemQuantity: ChangeCartCustomLineItemQuantity
changeLineItemQuantity: ChangeCartLineItemQuantity
changeTaxCalculationMode: ChangeCartTaxCalculationMode
changeTaxMode: ChangeCartTaxMode
changeTaxRoundingMode: ChangeCartTaxRoundingMode
recalculate: RecalculateCart
removeCustomLineItem: RemoveCartCustomLineItem
removeDiscountCode: RemoveCartDiscountCode
removeItemShippingAddress: RemoveCartItemShippingAddress
removeLineItem: RemoveCartLineItem
removePayment: RemoveCartPayment
setAnonymousId: SetCartAnonymousId
setBillingAddress: SetCartBillingAddress
setCartTotalTax: SetCartTotalTax
setCountry: SetCartCountry
setCustomField: SetCartCustomField
setCustomLineItemCustomField: SetCartCustomLineItemCustomField
setCustomLineItemCustomType: SetCartCustomLineItemCustomType
setCustomLineItemShippingDetails: SetCartCustomLineItemShippingDetails
setCustomLineItemTaxAmount: SetCartCustomLineItemTaxAmount
setCustomLineItemTaxRate: SetCartCustomLineItemTaxRate
setCustomShippingMethod: SetCartCustomShippingMethod
setCustomType: SetCartCustomType
setCustomerEmail: SetCartCustomerEmail
setCustomerGroup: SetCartCustomerGroup
setCustomerId: SetCartCustomerId
setDeleteDaysAfterLastModification: SetCartDeleteDaysAfterLastModification
setLineItemCustomField: SetCartLineItemCustomField
setLineItemCustomType: SetCartLineItemCustomType
setLineItemPrice: SetCartLineItemPrice
setLineItemShippingDetails: SetCartLineItemShippingDetails
setLineItemTaxAmount: SetCartLineItemTaxAmount
setLineItemTaxRate: SetCartLineItemTaxRate
setLineItemTotalPrice: SetCartLineItemTotalPrice
setLocale: SetCartLocale
setShippingAddress: SetCartShippingAddress
setShippingAddressAndCustomShippingMethod: SetCartShippingAddressAndCustomShippingMethod
setShippingAddressAndShippingMethod: SetCartShippingAddressAndShippingMethod
setShippingMethod: SetCartShippingMethod
setShippingMethodTaxAmount: SetCartShippingMethodTaxAmount
setShippingMethodTaxRate: SetCartShippingMethodTaxRate
setShippingRateInput: SetCartShippingRateInput
updateItemShippingAddress: UpdateCartItemShippingAddress
}
input ChangeCartCustomLineItemMoney {
customLineItemId: String!
money: BaseMoneyInput!
}
input ChangeCartCustomLineItemQuantity {
customLineItemId: String!
quantity: Long!
}
input ChangeCartLineItemQuantity {
lineItemId: String!
quantity: Long!
externalPrice: BaseMoneyInput
externalTotalPrice: ExternalLineItemTotalPriceDraft
}
input ChangeCartTaxCalculationMode {
taxCalculationMode: TaxCalculationMode!
}
input ChangeCartTaxMode {
taxMode: TaxMode!
}
input ChangeCartTaxRoundingMode {
taxRoundingMode: RoundingMode!
}
input ChangeMyCartTaxMode {
taxMode: TaxMode!
}
type ClassificationShippingRateInput implements ShippingRateInput {
key: String!
type: String!
labelAllLocales: [LocalizedString!]!
label(
"String is define for different locales. This argument specifies the desired locale."
locale: Locale,
"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
}
input ClassificationShippingRateInputDraft {
key: String!
}
"A custom line item is a generic item that can be added to the cart but is not bound to a product. You can use it for discounts (negative money), vouchers, complex cart rules, additional services or fees. You control the lifecycle of this item."
type CustomLineItem {
id: String!
name(
"String is define for different locales. This argument specifies the desired locale."
locale: Locale,
"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
money: BaseMoney!
totalPrice: Money!
slug: String!
quantity: Long!
state: [ItemState!]!
taxCategory: TaxCategory
taxCategoryRef: Reference
taxRate: TaxRate
discountedPricePerQuantity: [DiscountedLineItemPriceForQuantity!]!
"This field contains non-typed data. Consider using `customFields` as a typed alternative."
customFieldsRaw(
"""
The names of the custom fields to include.
If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned.
"""
includeNames: [String!],
"""
The names of the custom fields to exclude.
If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned.
"""
excludeNames: [String!]): [RawCustomField!]
shippingDetails: ItemShippingDetails
}
input CustomLineItemDraft {
name: [LocalizedStringInput!]!
money: BaseMoneyInput!
slug: String!
taxCategory: ReferenceInput
externalTaxRate: ExternalTaxRateDraft
quantity: Long
custom: CustomFieldsDraft
shippingDetails: ItemShippingDetailsDraft
}
type Delivery {
id: String!
createdAt: DateTime!
items: [DeliveryItem!]!
parcels: [Parcel!]!
address: Address
}
type DeliveryItem {
id: String!
quantity: Long!
}
type DiscountCodeInfo {
discountCode: Reference!
state: DiscountCodeState
}
enum DiscountCodeState {
"The discount code is active and none of the discounts were applied because the discount application was stopped by one discount that has the StackingMode of StopAfterThisDiscount defined"
ApplicationStoppedByPreviousDiscount
"The discount code is not valid or it does not contain any valid cart discounts. Validity is determined based on the validFrom and validUntil dates"
NotValid
"maxApplications or maxApplicationsPerCustomer for discountCode has been reached."
MaxApplicationReached
"The discount code is active and it contains at least one active and valid CartDiscount. The discount code cartPredicate matches the cart and at least one of the contained active discount\u2019s cart predicates matches the cart."
MatchesCart
"The discount code is active and it contains at least one active and valid CartDiscount. But its cart predicate does not match the cart or none of the contained active discount\u2019s cart predicates match the cart"
DoesNotMatchCart
"The discount code is not active or it does not contain any active cart discounts."
NotActive
}
type DiscountedLineItemPortion {
discount: CartDiscount!
discountRef: Reference!
discountedAmount: BaseMoney!
}
type DiscountedLineItemPrice {
value: BaseMoney!
includedDiscounts: [DiscountedLineItemPortion!]!
}
type DiscountedLineItemPriceForQuantity {
quantity: Long!
discountedPrice: DiscountedLineItemPrice!
}
input ExternalLineItemTotalPriceDraft {
price: BaseMoneyInput!
totalPrice: MoneyInput!
}
input ExternalTaxAmountDraft {
totalGross: MoneyInput!
taxRate: ExternalTaxRateDraft!
}
input ExternalTaxRateDraft {
name: String!
amount: Float!
country: Country!
state: String
subRates: [SubRateDraft!] = []
}
input HighPrecisionMoneyInput {
currencyCode: Currency!
preciseAmount: Long!
fractionDigits: Int!
centAmount: Long
}
enum InventoryMode {
"""
Adding items to cart and ordering is independent of inventory. No inventory checks or modifications.
This is the default mode for a new cart.
"""
None
"""
Creating an order will fail with an OutOfStock error if an unavailable line item exists. Line items in the cart
are only reserved for the duration of the ordering transaction.
"""
ReserveOnOrder
"""
Orders are tracked on inventory. That means, ordering a LineItem will decrement the available quantity on the
respective InventoryEntry. Creating an order will succeed even if the line item’s available quantity is zero or
negative. But creating an order will fail with an OutOfStock error if no matching inventory entry exists for a
line item.
"""
TrackOnly
}
type ItemShippingDetails {
targets: [ItemShippingTarget!]!
valid: Boolean!
}
input ItemShippingDetailsDraft {
targets: [ShippingTargetDraft!]!
}
type ItemShippingTarget {
addressKey: String!
quantity: Long!
}
type ItemState {
quantity: Long!
stateRef: Reference!
state: State!
}
"""
A line item is a snapshot of a product variant at the time it was added to the cart.
Since a product variant may change at any time, the ProductVariant data is copied into the field variant.
The relation to the Product is kept but the line item will not automatically update if the product variant changes.
On the cart, the line item can be updated manually. The productSlug refers to the current version of the product.
It can be used to link to the product. If the product has been deleted, the line item remains but refers to a
non-existent product and the productSlug is left empty.
Please also note that creating an order is impossible if the product or product variant a line item relates to has been deleted.
"""
type LineItem {
id: String!
productId: String!
name(
"String is define for different locales. This argument specifies the desired locale."
locale: Locale,
"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
productSlug(
"String is define for different locales. This argument specifies the desired locale."
locale: Locale,
"List of languages the client is able to understand, and which locale variant is preferred."
acceptLanguage: [Locale!]): String
productType: Product
productTypeRef: Reference
variant: ProductVariant!
price: ProductPrice!
taxedPrice: TaxedItemPrice
totalPrice: Money
quantity: Long!
state: [ItemState!]!
taxRate: TaxRate
supplyChannel: Channel
supplyChannelRef: Reference
distributionChannel: Channel
distributionChannelRef: Reference
discountedPricePerQuantity: [DiscountedLineItemPriceForQuantity!]!
priceMode: LineItemPriceMode!
lineItemMode: LineItemMode!
"This field contains non-typed data. Consider using `customFields` as a typed alternative."
customFieldsRaw(
"""
The names of the custom fields to include.
If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned.
"""
includeNames: [String!],
"""
The names of the custom fields to exclude.
If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned.
"""
excludeNames: [String!]): [RawCustomField!]
shippingDetails: ItemShippingDetails
inventoryMode: ItemShippingDetails
}
input LineItemDraft {
productId: String
sku: String
quantity: Long
variantId: Int
supplyChannel: ResourceIdentifierInput
distributionChannel: ResourceIdentifierInput
custom: CustomFieldsDraft
shippingDetails: ItemShippingDetailsDraft
externalTaxRate: ExternalTaxRateDraft
externalPrice: BaseMoneyInput
externalTotalPrice: ExternalLineItemTotalPriceDraft
}
enum LineItemMode {
"The line item was added automatically, because a discount has added a free gift to the cart."
GiftLineItem
"The line item was added during cart creation or with the update action addLineItem. Its quantity can be changed without restrictions."
Standard
}
enum LineItemPriceMode {
"The price is selected form the product variant. This is the default mode."
Platform
"The line item price was set externally. Cart discounts can apply to line items with this price mode. All update actions that change the quantity of a line item with this price mode require the externalPrice field to be given."
ExternalPrice
"The line item price with the total was set externally."
ExternalTotal
}
input MyCartDraft {
currency: Currency!
country: Country
inventoryMode: InventoryMode = None
inventoryReservationsExpireInMinutes: Int
custom: CustomFieldsDraft
customerEmail: String
shippingAddress: AddressInput
billingAddress: AddressInput
shippingMethod: ReferenceInput
taxMode: TaxMode = Platform
locale: Locale
deleteDaysAfterLastModification: Int
itemShippingAddresses: [AddressInput!] = []
discountCodes: [String!] = []
lineItems: [MyLineItemDraft!] = []
}
input MyCartUpdateAction {
addDiscountCode: AddCartDiscountCode
addItemShippingAddress: AddCartItemShippingAddress
addLineItem: AddMyCartLineItem
addPayment: AddCartPayment
addShoppingList: AddCartShoppingList
applyDeltaToLineItemShippingDetailsTargets: ApplyCartDeltaToLineItemShippingDetailsTargets
changeLineItemQuantity: ChangeCartLineItemQuantity
changeTaxMode: ChangeMyCartTaxMode
recalculate: RecalculateCart
removeDiscountCode: RemoveCartDiscountCode
removeItemShippingAddress: RemoveCartItemShippingAddress
removeLineItem: RemoveCartLineItem
removePayment: RemoveCartPayment
setBillingAddress: SetCartBillingAddress
setCountry: SetCartCountry
setCustomField: SetCartCustomField
setCustomType: SetCartCustomType
setCustomerEmail: SetCartCustomerEmail
setDeleteDaysAfterLastModification: SetCartDeleteDaysAfterLastModification
setLineItemCustomField: SetCartLineItemCustomField
setLineItemCustomType: SetCartLineItemCustomType
setLineItemShippingDetails: SetCartLineItemShippingDetails
setLocale: SetCartLocale
setShippingMethod: SetMyCartShippingMethod
setShippingAddress: SetCartShippingAddress
updateItemShippingAddress: UpdateCartItemShippingAddress
}
input MyLineItemDraft {
productId: String
sku: String
quantity: Long
variantId: Int
supplyChannel: ResourceIdentifierInput
distributionChannel: ResourceIdentifierInput
custom: CustomFieldsDraft
shippingDetails: ItemShippingDetailsDraft
}
type Parcel {
id: String!
createdAt: DateTime!
measurements: ParcelMeasurements
trackingData: TrackingData
items: [DeliveryItem!]!
}
type ParcelMeasurements {
heightInMillimeter: Int
lengthInMillimeter: Int
widthInMillimeter: Int
weightInGram: Int
}
type PaymentInfo {
paymentRefs: [Reference!]!
}
input RecalculateCart {
updateProductData: Boolean = false
}
input RemoveCartCustomLineItem {
customLineItemId: String!
}
input RemoveCartDiscountCode {
discountCode: ReferenceInput!
}
input RemoveCartItemShippingAddress {
addressKey: String!
}
input RemoveCartLineItem {
lineItemId: String!
quantity: Long
externalPrice: BaseMoneyInput
externalTotalPrice: ExternalLineItemTotalPriceDraft
shippingDetailsToRemove: ItemShippingDetailsDraft
}
input RemoveCartPayment {
payment: ResourceIdentifierInput!
}
enum RoundingMode {
"[Round half down](https://en.wikipedia.org/wiki/Rounding#Round_half_down)"
HalfDown
"[Round half up](https://en.wikipedia.org/wiki/Rounding#Round_half_up)"
HalfUp
"[Round half to even](https://en.wikipedia.org/wiki/Rounding#Round_half_to_even). Default rounding mode as used in IEEE 754 computing functions and operators."
HalfEven
}
type ScoreShippingRateInput implements ShippingRateInput {
score: Int!
type: String!
}
input ScoreShippingRateInputDraft {
score: Int!
}
input SetCartAnonymousId {
anonymousId: String
}
input SetCartBillingAddress {
address: AddressInput
}
input SetCartCountry {
country: Country
}
input SetCartCustomField {
name: String!
value: String
}
input SetCartCustomLineItemCustomField {
customLineItemId: String!
name: String!
value: String
}
input SetCartCustomLineItemCustomType {
customLineItemId: String!
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
}
input SetCartCustomLineItemShippingDetails {
customLineItemId: String!
shippingDetails: ItemShippingDetailsDraft
}
input SetCartCustomLineItemTaxAmount {
customLineItemId: String!
externalTaxAmount: ExternalTaxAmountDraft
}
input SetCartCustomLineItemTaxRate {
customLineItemId: String!
externalTaxRate: ExternalTaxRateDraft
}
input SetCartCustomShippingMethod {
shippingMethodName: String!
shippingRate: ShippingRateDraft!
taxCategory: ReferenceInput
externalTaxRate: ExternalTaxRateDraft
}
input SetCartCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
}
input SetCartCustomerEmail {
email: String
}
input SetCartCustomerGroup {
customerGroup: ResourceIdentifierInput
}
input SetCartCustomerId {
customerId: String
}
input SetCartDeleteDaysAfterLastModification {
deleteDaysAfterLastModification: Int
}
input SetCartLineItemCustomField {
lineItemId: String!
name: String!
value: String
}
input SetCartLineItemCustomType {
lineItemId: String!
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
}
input SetCartLineItemPrice {
lineItemId: String!
externalPrice: BaseMoneyInput
}
input SetCartLineItemShippingDetails {
lineItemId: String!
shippingDetails: ItemShippingDetailsDraft
}
input SetCartLineItemTaxAmount {
lineItemId: String!
externalTaxAmount: ExternalTaxAmountDraft
}
input SetCartLineItemTaxRate {
lineItemId: String!
externalTaxRate: ExternalTaxRateDraft
}
input SetCartLineItemTotalPrice {
lineItemId: String!
externalTotalPrice: ExternalLineItemTotalPriceDraft
}
input SetCartLocale {
locale: Locale
}
input SetCartShippingAddress {
address: AddressInput
}
input SetCartShippingAddressAndCustomShippingMethod {
address: AddressInput!
shippingMethodName: String!
shippingRate: ShippingRateDraft!
taxCategory: ReferenceInput
externalTaxRate: ExternalTaxRateDraft
}
input SetCartShippingAddressAndShippingMethod {
address: AddressInput!
shippingMethod: ReferenceInput
externalTaxRate: ExternalTaxRateDraft
}
input SetCartShippingMethod {
shippingMethod: ReferenceInput
externalTaxRate: ExternalTaxRateDraft
}
input SetCartShippingMethodTaxAmount {
externalTaxAmount: ExternalTaxAmountDraft
}
input SetCartShippingMethodTaxRate {
externalTaxRate: ExternalTaxRateDraft
}
input SetCartShippingRateInput {
shippingRateInput: ShippingRateInputDraft
}
input SetCartTotalTax {
externalTotalGross: MoneyInput
externalTaxPortions: [TaxPortionDraft!] = []
}
input SetCustomerGroup {
customerGroup: ResourceIdentifierInput
}
input SetCustomerNumber {
customerNumber: String
}
input SetMyCartShippingMethod {
shippingMethod: ReferenceInput
}
type ShippingInfo {
shippingMethodName: String!
price: Money!
shippingRate: ShippingRate!
taxRate: TaxRate
taxCategory: Reference
deliveries: [Delivery!]!
discountedPrice: DiscountedLineItemPrice
taxedPrice: TaxedItemPrice
shippingMethodState: ShippingMethodState!
shippingMethod: ShippingMethod
shippingMethodRef: Reference
}
enum ShippingMethodState {
"Either there is no predicate defined for the ShippingMethod or the given predicate matches the cart"
MatchesCart
"The ShippingMethod predicate does not match the cart. Ordering this cart will fail with error ShippingMethodDoesNotMatchCart"
DoesNotMatchCart
}
interface ShippingRateInput {
type: String!
}
input ShippingRateInputDraft {
Classification: ClassificationShippingRateInputDraft
Score: ScoreShippingRateInputDraft
}
input ShippingTargetDraft {
addressKey: String!
quantity: Long!
}
enum TaxCalculationMode {
"""
This calculation mode calculates the taxes on the unit price before multiplying with the quantity.
For example `($1.08 * 1.19 = $1.2852 -> $1.29 rounded) * 3 = $3.87`
"""
UnitPriceLevel
"""
Default. This calculation mode calculates the taxes after the unit price is multiplied with the quantity.
For example `($1.08 * 3 = $3.24) * 1.19 = $3.8556 -> $3.86 rounded`
"""
LineItemLevel
}
enum TaxMode {
"No taxes are added to the cart."
Disabled
"""
The tax amounts and the tax rates as well as the tax portions are set externally per ExternalTaxAmountDraft.
A cart with this tax mode can only be ordered if the cart itself and all line items, all custom line items and
the shipping method have an external tax amount and rate set
"""
ExternalAmount
"""
The tax rates are set externally per ExternalTaxRateDraft. A cart with this tax mode can only be ordered if all
line items, all custom line items and the shipping method have an external tax rate set. The totalNet and
totalGross as well as the taxPortions fields are calculated according to the taxRoundingMode.
"""
External
"""
The tax rates are selected from the TaxCategories based on the cart shipping address.
The totalNet and totalGross as well as the taxPortions fields are calculated according to the
taxRoundingMode.
"""
Platform
}
"""
Represents the portions that sum up to the totalGross field of a TaxedPrice. The portions are calculated
from the TaxRates. If a tax rate has SubRates, they are used and can be identified by name. Tax portions
from line items that have the same rate and name will be accumulated to the same tax portion.
"""
type TaxPortion {
rate: Float!
amount: Money!
name: String
}
input TaxPortionDraft {
name: String
rate: Float!
amount: MoneyInput!
}
type TaxedItemPrice {
totalNet: Money!
totalGross: Money!
}
type TaxedPrice {
totalNet: Money!
totalGross: Money!
taxPortions: [TaxPortion!]!
}
type TrackingData {
trackingId: String
carrier: String
provider: String
providerTransaction: String
isReturn: Boolean!
}
input UpdateCartItemShippingAddress {
address: AddressInput!
}