cartDiscountCodeRemove
Remove a discount code from the cart
Arguments
| Argument | Type | Description |
|---|---|---|
id | ID! | |
version | String | |
discountCodeId | ID! |
Returns
CartDiscountCodeRemoveResponse!
| Field | Type | Description |
|---|---|---|
cart | Cart | Cart 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 } } } }{ "data": { "cartDiscountCodeRemove": { "cart": { "id": "id-1", "discountCodes": [ { "id": "id-1", "code": "Example" } ], "total": { "gross": { "centAmount": 1, "currency": "EUR" } } }, "cartErrors": [ { "code": "CART_NOT_FOUND", "message": "Example" } ] } }}The query is the example the schema documents. The response shows its shape with placeholder values.
Served by
| @evolve-framework/commercetools | Resolved |
| @evolve-framework/medusa | Resolved |
| @evolve-framework/sfcc | Stub: answers Not implemented |
Used by
The storefront packages that send it, in these GraphQL documents:
- @evolve-storefront/feature-cart:
CartDiscountCodeRemove

