cartDiscountCodesUpdate mutation

Updates the discount codes applied to the cart.

Required access

unauthenticated_write_checkouts access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
cartId ( ID! ) required

The ID of the cart.

discountCodes ( [String!] )

The discount codes to apply to the cart.

Return fields

  • cart (Cart)

    The updated cart.

  • userErrors ([CartUserError!]!)

    List of errors that occurred from executing the mutation.