Skip to content

cartDiscountCodeRemove

Mutationin Cart

Remove a discount code from the cart

Arguments

ArgumentTypeDescription
idID!
versionString
discountCodeIdID!

Returns

CartDiscountCodeRemoveResponse!

FieldTypeDescription
cartCartCart information after discount code is removed
cartErrors[CartDiscountCodeRemoveError!]Error details if discount code removal failed

Example

mutation {
cartDiscountCodeRemove(
id: "cart-123",
discountCodeId: "discount-456"
) {
cart {
id
discountCodes {
id
code
}
total {
gross {
centAmount
currency
}
}
}
cartErrors {
... on CartError {
code
message
}
}
}
}

The query is the example the schema documents. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved
@evolve-framework/medusaResolved
@evolve-framework/sfccStub: answers Not implemented

Used by

The storefront packages that send it, in these GraphQL documents: