List Cart Rules
Lists every cart rule in the store — the data behind the admin Marketing → Promotions → Cart Rules datagrid.
TIP
New here? Read the Cart Rules overview for what a cart rule does and how its fields behave.
Operation
| Operation | Type | Purpose |
|---|---|---|
adminMarketingCartRules | Query | Cursor-paginated list of all cart rules |
Details
- Requires an admin Bearer token in the
Authorizationheader. - Cursor pagination — pass
firstfor the page size andafter(theendCursorfrom the previous page) to advance.totalCountis the grand total. - Each
nodecarries the flat rule fields shown in the example, includingcouponCode(the rule's primary coupon code). The heavierconditions,channels, andcustomerGroupsresolve only on the detail query — they arenullon list rows.
Filtering
Pass any of these arguments alongside first / after (they mirror the admin datagrid filters, combined with logical AND):
| Argument | Description |
|---|---|
id | Single id or comma-separated list (e.g. 1,4,9) |
name | Name — partial match |
coupon_code | Primary coupon code — partial match |
status | 0 (inactive) / 1 (active) |
coupon_type | 0 (no coupon) / 1 (specific coupon) |
sort_order | Priority — exact match |
starts_from_from, starts_from_to | Start-date range (ISO 8601) |
ends_till_from, ends_till_to | End-date range (ISO 8601) |
sort, order | Sort field (id, name, sort_order) + asc / desc (default id desc) |

