Skip to content

Update Catalog Rule

Updates an existing catalog rule — the Edit Rule action on the admin Marketing → Promotions → Catalog Rules screen. Saving recomputes affected product prices in the background.

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-rules/{id}PUT

Details

  • Requires an admin Bearer token and the marketing.promotions.catalog_rules.edit permission.
  • The update is a partial merge — send only the fields you want to change; omitted fields keep their existing values.
  • When channels or customer_groups is supplied, that list replaces the rule's current channels / customer groups. Omit them to leave the existing sets untouched. They are sent as plain id arrays.
  • Returns the full updated rule payload. In the response, channels and customerGroups are arrays of objects (each { id, code, name }).

Request body

FieldTypeRequiredNotes
namestringnoRule 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_typestringnoby_percent, by_fixed, to_percent, to_fixed
discount_amountnumbernoDiscount value; capped at 100 when action_type is by_percent
channelsint[]noReplaces the rule's channels when supplied
customer_groupsint[]noReplaces the rule's customer groups when supplied

Released under the MIT License.