Adobe Commerce only. Learn more
allCartRules query
The allCartRules
query returns a list of all active cart rules in the store.
Cart price rules apply discounts to items in the shopping cart, based on a set of conditions.
Syntax
Copied to your clipboard{allCartRules {name}}
Reference
The allCartRules
reference provides detailed information about the types and fields defined in this query.
Example usage
The following call returns a list of all active cart rules in the store.
Request:
Copied to your clipboard{allCartRules {name}}
Response:
Copied to your clipboard{"allCartRules": [{"name": "Rule A"},{"name": "Rule B"}]}