Delete Cart Rule Coupon
Deletes a coupon code — the Delete row action on the admin Marketing → Promotions → Cart Rules → Coupons screen.
TIP
New here? Read the Cart Rule Coupons overview for what a coupon does and how its fields behave.
Operation
| Operation | Type | Purpose |
|---|---|---|
deleteAdminMarketingCartRuleCoupon | Mutation | Delete a coupon code |
Details
- Requires an admin Bearer token and the
marketing.promotions.cart_rules.deletepermission. - Pass the coupon's IRI as
id. Use the list query to discover valid ids. - A coupon that belongs to a different cart rule returns a
404error.
Confirm success via the absence of errors
The delete mutation returns a success acknowledgement, not the deleted coupon's data — adminMarketingCartRuleCoupon resolves to null on the payload. Treat a response with no errors[] as a successful delete. If you need a confirmation message in the body, use the REST endpoint (DELETE /api/admin/marketing/cart-rules/{cartRuleId}/coupons/{id}), which returns { "message": "Cart rule coupon deleted." }.
Input fields
| Field | Type | Required | Notes |
|---|---|---|---|
id | ID | Yes | The coupon's IRI |

