Skip to content

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

OperationTypePurpose
deleteAdminMarketingCartRuleCouponMutationDelete a coupon code

Details

  • Requires an admin Bearer token and the marketing.promotions.cart_rules.delete permission.
  • 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 404 error.

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

FieldTypeRequiredNotes
idIDYesThe coupon's IRI

Released under the MIT License.