Anchor to section titled 'undefined'

cartGiftCardCodesRemove
mutation

Removes the gift card codes applied to the cart.


Anchor to appliedGiftCardIds
appliedGiftCardIds
required

The gift cards to remove.

The input must not contain more than 250 values.

Anchor to cartId
cartId
required

The ID of the cart.


Was this section helpful?

The updated cart.

The list of errors that occurred from executing the mutation.

A list of warnings that occurred during the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation cartGiftCardCodesRemove($appliedGiftCardIds: [ID!]!, $cartId: ID!) {
  cartGiftCardCodesRemove(appliedGiftCardIds: $appliedGiftCardIds, cartId: $cartId) {
    cart {
      # Cart fields
    }
    userErrors {
      field
      message
    }
    warnings {
      # CartWarning fields
    }
  }
}
Hide code
Input
Copy
{
  "appliedGiftCardIds": [
    "gid://shopify/<objectName>/10079785100"
  ],
  "cartId": "gid://shopify/<objectName>/10079785100"
}