Anchor to cartDiscountCodesUpdatecart
mutationcart Discount Codes Update
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 in the cart's field to see whether the code is applicable to the cart's current contents.
Anchor to Arguments
Arguments
- cartId (ID!)
- discountCodes ([String!]!)
- Anchor to cartIdcart•ID!
Id required The ID of the cart.
- Anchor to discountCodesdiscount•[String!]!
Codes required The case-insensitive discount codes that the customer added at checkout.
The input must not contain more than
250values.
Was this section helpful?
- cart (Cart)
- userErrors ([CartUserError!]!)
- warnings ([CartWarning!]!)
- Anchor to cartcart•Cart
The updated cart.
- Anchor to userErrorsuser•[Cart
Errors User Error!]! non-null The list of errors that occurred from executing the mutation.
- Anchor to warningswarnings•[Cart
Warning!]! non-null A list of warnings that occurred during the mutation.
Was this section helpful?