Create Catalog Rule
Creates a catalog rule — the Create Rule action on the admin Marketing → Promotions → Catalog Rules screen. Saving recomputes affected product prices in the background, so a new rule may take a moment to show on the storefront.
TIP
New here? Read the Catalog Rules overview for what a catalog rule does and how its fields behave.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/marketing/catalog-rules | POST |
Details
- Requires an admin Bearer token and the
marketing.promotions.catalog_rules.createpermission. - Returns the full rule payload, including the resolved
conditions,channels, andcustomerGroups. - In the response,
channelsandcustomerGroupsare arrays of objects (each{ id, code, name }) — even though the request sends them as plain id arrays.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | Rule name |
description | string | no | Free-text description |
starts_from | string | no | Start date (YYYY-MM-DD) or null |
ends_till | string | no | End date (YYYY-MM-DD) or null; must be >= starts_from |
status | int | no | 0 inactive / 1 active |
sort_order | int | no | Priority — lower runs first |
condition_type | int | no | 1 match all conditions / 0 match any |
conditions | array | no | Product-attribute filters |
end_other_rules | int | no | 1 stops lower-priority rules from also applying |
action_type | string | yes | by_percent, by_fixed, to_percent, to_fixed |
discount_amount | number | yes | Discount value; capped at 100 when action_type is by_percent |
channels | int[] | yes | Non-empty list of channel ids |
customer_groups | int[] | yes | Non-empty list of customer-group ids |

