Skip to content

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

EndpointMethod
/api/admin/marketing/catalog-rulesPOST

Details

  • Requires an admin Bearer token and the marketing.promotions.catalog_rules.create permission.
  • Returns the full rule payload, including the resolved conditions, channels, and customerGroups.
  • In the response, channels and customerGroups are arrays of objects (each { id, code, name }) — even though the request sends them as plain id arrays.

Request body

FieldTypeRequiredNotes
namestringyesRule name
descriptionstringnoFree-text description
starts_fromstringnoStart date (YYYY-MM-DD) or null
ends_tillstringnoEnd date (YYYY-MM-DD) or null; must be >= starts_from
statusintno0 inactive / 1 active
sort_orderintnoPriority — lower runs first
condition_typeintno1 match all conditions / 0 match any
conditionsarraynoProduct-attribute filters
end_other_rulesintno1 stops lower-priority rules from also applying
action_typestringyesby_percent, by_fixed, to_percent, to_fixed
discount_amountnumberyesDiscount value; capped at 100 when action_type is by_percent
channelsint[]yesNon-empty list of channel ids
customer_groupsint[]yesNon-empty list of customer-group ids

Released under the MIT License.