Skip to main content
Anchor to CartDiscountCodesUpdatePayload

CartDiscountCodesUpdatePayload

payload

Return type for cartDiscountCodesUpdate mutation.

•Cart

The updated cart.

Show fields
•[CartUserError!]!
non-null

The list of errors that occurred from executing the mutation.

Show fields
•[CartWarning!]!
non-null

A list of warnings that occurred during the mutation.

Show fields

Was this section helpful?

Anchor to Mutations with this payloadMutations with this payload

•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.

Show payload

Arguments

•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?