Skip to content

Cart GraphQL

Served by CartModule on commercetools, CartModule on medusa and CartModule on sfcc.

Each operation has its own page with its arguments, an example and the engines that serve it. The types link to their fields on the cart types page.

Operations

OperationDescriptionServed by
addressValidateQueryValidate a shipping or billing address for correctness and formattingcommercetoolsmedusasfcc
cartQueryGet the current user's shopping cart with all line items and totalscommercetoolsmedusasfcc
cartBundleAddMutationAdd a main product and the extras chosen with it as a bundle, in one call.commercetoolsmedusasfcc
cartChangesAcknowledgeMutationThe buyer has seen the cart's changes; they are not listed againcommercetoolsmedusasfcc
cartCreateMutationCreate an empty cart.commercetoolsmedusasfcc
cartDiscountCodeAddMutationApply a discount code to the cartcommercetoolsmedusasfcc
cartDiscountCodeRemoveMutationRemove a discount code from the cartcommercetoolsmedusasfcc
cartLineItemsAddMutationAdd line items to cart or create a new cartcommercetoolsmedusasfcc
cartLineItemsRemoveMutationRemove line items from the cartcommercetoolsmedusasfcc
cartLineItemsUpdateMutationUpdate quantities of existing line itemscommercetoolsmedusasfcc
cartPaymentRemoveMutationRemove a payment that has only reserved money from the cart, such as a gift card, and give the reservation back.commercetoolsmedusasfcc
cartSetDeliveryRemarksMutationRecord a note for whoever delivers the goods.commercetoolsmedusasfcc
cartSetPurchaseOrderNumberMutationRecord the buyer's own reference for this purchase, usually a purchase order number.commercetoolsmedusasfcc
cartSetVatNumberMutationRecord the VAT number of the company the buyer orders for, with its country prefix, such as DE123456789.commercetoolsmedusasfcc
cartUpdateMutationUpdate cart with various actionscommercetoolsmedusasfcc

Types

TypeDescription
AddressSuggestionObject
AddressValidationResultObject
AppliedDiscountObjectA discount applied to a cart or one of its lines, by the name it is known by.
CartObjectShopping cart containing line items and checkout information
CartAddOnInputInput objectAn add-on to add with a line.
CartChangesAcknowledgeErrorUnion
CartChangesAcknowledgeResponseObjectResponse for acknowledging a cart's changes
CartCreateErrorUnionError union for cart create
CartCreateResponseObjectResponse for creating a cart
CartDiscountCodeObjectA CartDiscountCode represents a discount that is applied to the cart
CartDiscountCodeAddErrorUnionError union for cart discount code add
CartDiscountCodeAddResponseObjectResponse for adding discount code to cart
CartDiscountCodeRemoveErrorUnionError union for cart discount code remove
CartDiscountCodeRemoveResponseObjectResponse for removing discount code from cart
CartFreeDeliveryObjectHow far a cart is from free delivery
CartLineChangeObjectOne change to a line since the buyer last acknowledged the cart
CartLineChangeTypeEnumWhat happened to a line since the buyer last acknowledged the cart
CartLineItemInterfaceInterface for cart line items
CartLineItemAddFailureTypeEnumWhy a requested line was not added.
CartLineItemAddInputInput objectInput for creating a new line item
CartLineItemAddResultObjectThe outcome for one requested line.
CartLineItemBackorderObjectThe part of a cart line that cannot ship now.
CartLineItemRoleTypeEnumWhat a line is to another line in the cart.
CartLineItemsAddErrorUnionError union for cart line items add
CartLineItemsAddResponseObjectResponse for adding line items to cart
CartLineItemsRemoveErrorUnionError union for cart line items remove
CartLineItemsRemoveResponseObjectResponse for removing line items from cart
CartLineItemsUpdateErrorUnionError union for cart line items update
CartLineItemsUpdateResponseObjectResponse for updating line items in cart
CartLineItemUpdateFailureTypeEnumWhy a line's quantity was not changed.
CartLineItemUpdateInputInput objectInput for updating an existing line item
CartLineItemUpdateResultObjectThe outcome for one requested quantity change.
CartLineQuantityLimitTypeEnumWhat limits the quantity of a line.
CartLineQuantityRuleObjectHow many of a line can be ordered.
CartMinimumOrderObjectHow far a business unit's cart is from the unit's minimum order value
CartPaymentObjectA payment on a cart, as far as a buyer needs to see it.
CartPaymentRemoveErrorUnion
CartPaymentRemoveResponseObjectResponse for removing a payment from the cart
CartPaymentStatusTypeEnumHow far a payment on a cart has got.
CartSetBillingAddressInputInput objectInput for setting billing address on cart
CartSetCustomerEmailInputInput objectInput for setting customer email on cart
CartSetDeliveryRemarksErrorUnionError union for recording a delivery note
CartSetDeliveryRemarksResponseObjectResponse for recording a delivery note on a cart
CartSetPaymentMethodInputInput objectInput for setting payment method on cart
CartSetPurchaseOrderNumberErrorUnionError union for recording a purchase reference
CartSetPurchaseOrderNumberResponseObjectResponse for recording the buyer's purchase reference on a cart
CartSetShippingAddressInputInput objectInput for setting shipping address on cart
CartSetShippingMethodInputInput objectInput for setting shipping method on cart
CartSetVatNumberErrorUnionError union for recording a VAT number
CartSetVatNumberResponseObjectResponse for recording a VAT number on a cart
CartSingleLineItemObjectIndividual line item in a cart
CartUpdateActionInput objectUnion of all cart update actions
CartUpdateErrorUnionError union for cart update
CartUpdateResponseObjectResponse for cart update operations
ShippingMethodObjectA way the cart can be shipped, at the price it would be charged.
ShippingMethodInputInput objectInput for selecting a shipping method