Anchor to CartDiscountCodesUpdatePayloadCart
payloadCart Discount Codes Update Payload
Return type for mutation.
Anchor to FieldsFields
- 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?
Anchor to Mutations with this payloadMutations with this payload
- cartDiscountCodesUpdate (CartDiscountCodesUpdatePayload)
- •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
in the cart'sfield to see whether the code is applicable to the cart's current contents.- 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.
Arguments
Was this section helpful?