Skip to main content
Anchor to cartDiscountCodesUpdate

cartDiscountCodesUpdate

mutation

Updates the discount codes applied to a Cart. This mutation replaces all existing discount codes with the provided list, so pass an empty array to remove all codes. Discount codes are case-insensitive.

After updating, check each CartDiscountCode in the cart's discountCodes field to see whether the code is applicable to the cart's current contents.

•ID!
required

The ID of the cart.

•[String!]!
required

The case-insensitive discount codes that the customer added at checkout.

The input must not contain more than 250 values.


Was this section helpful?

Anchor to CartDiscountCodesUpdatePayload returnsCartDiscountCodesUpdatePayload returns

•Cart

The updated cart.

•[CartUserError!]!
non-null

The list of errors that occurred from executing the mutation.

•[CartWarning!]!
non-null

A list of warnings that occurred during the mutation.


Was this section helpful?