Skip to main content

cartAddActionCode

Apply a promotional action code to the cart.

Adds a discount code, promotional offer, or special action to the cart. The action code will be validated and applied if eligible, potentially affecting pricing and available options.

Possible errors:

  • CART_NOT_FOUND_ERROR: Cart with the specified ID does not exist
  • CART_ACTION_CODE_ADD_ERROR: Failed to apply the action code
cartAddActionCode(
id: String!
input: CartActionCodeInput!
): Cart!

Arguments

cartAddActionCode.id ● String! non-null scalar

Unique identifier of the cart to apply action code to.

Must be a valid UUID format representing an existing cart.

cartAddActionCode.input ● CartActionCodeInput! non-null input

Action code application data.

Contains the action code and any additional parameters needed for application.

Type

Cart object

Shopping cart entity for managing customer purchases.

Represents a shopping session containing products, customer information, addresses, payment preferences, and all data needed for order processing. Carts can be associated with different customer types and support various business models.