Update Cart Rule
Updates an existing cart rule — the Edit action on the admin Marketing → Promotions → Cart Rules screen.
TIP
New here? Read the Cart Rules overview for what a cart rule does and how its fields behave.
Operation
| Operation | Type | Purpose |
|---|---|---|
updateAdminMarketingCartRule | Mutation | Update a cart rule |
Details
- Requires an admin Bearer token and the
marketing.promotions.cart_rules.editpermission. - Pass the rule's IRI as
id. The update is a partial merge — send only the fields you want to change; omitted fields keep their existing values. - When
channelsorcustomerGroupsis supplied, that list replaces the rule's current channels / customer groups. Omit them to leave the existing sets untouched. - The mutation returns the full updated rule payload.
Input fields
| Field | Type | Required | Notes |
|---|---|---|---|
id | ID | Yes | The rule's IRI |
name | String | No | Rule name |
description | String | No | Free-text description |
channels | Array | No | Replaces the rule's channels when supplied |
customerGroups | Array | No | Replaces the rule's customer groups when supplied |
couponType | Int | No | 0 no coupon (auto-applies) / 1 specific coupon |
useAutoGeneration | Int | No | 1 to auto-generate coupon codes |
couponCode | String | No | Required + unique when couponType is 1 and useAutoGeneration is 0 |
actionType | String | No | by_percent, by_fixed, cart_fixed, buy_x_get_y |
discountAmount | Float | No | Discount value; capped at 100 when actionType is by_percent |
discountQuantity | Int | No | Quantity for buy_x_get_y |
discountStep | String | No | Buy-step for buy_x_get_y |
applyToShipping | Int | No | 1 applies the discount to shipping too |
freeShipping | Int | No | 1 grants free shipping |
conditionType | Int | No | 1 match all conditions / 0 match any |
conditions | Array | No | Cart / product condition filters |
endOtherRules | Int | No | 1 stops lower-priority rules from also applying |
usesAttributeConditions | Int | No | 1 when conditions use product attributes |
usagePerCustomer | Int | No | Per-customer usage limit (0 = unlimited) |
usesPerCoupon | Int | No | Per-coupon usage limit (0 = unlimited) |
sortOrder | Int | No | Priority — lower runs first |
status | Int | No | 0 inactive / 1 active |
startsFrom | String | No | Start date (ISO 8601) or null |
endsTill | String | No | End date (ISO 8601) or null; must be >= startsFrom |

