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.

Operation

OperationTypePurpose
updateAdminMarketingCatalogRuleMutationUpdate a catalog rule

Details

  • Requires an admin Bearer token and the marketing.promotions.catalog_rules.edit permission.
  • Pass the rule's IRI as id. The update is a partial merge — send only the fields you want to change; omitted fields keep their existing values.
  • When channels or customerGroups 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 (e.g. [1]).
  • The mutation returns the rule's scalar fields plus conditions.
  • channels and customerGroups are connections and do not resolve on a mutation payload — query the detail query (adminMarketingCatalogRule) afterwards to read them back.

Input fields

FieldTypeRequiredNotes
idIDYesThe rule's IRI
nameStringNoRule name
descriptionStringNoFree-text description
startsFromStringNoStart date (YYYY-MM-DD) or null
endsTillStringNoEnd date (YYYY-MM-DD) or null; must be >= startsFrom
statusIntNo0 inactive / 1 active
sortOrderIntNoPriority — lower runs first
conditionTypeIntNo1 match all conditions / 0 match any
conditionsArrayNoProduct-attribute filters
endOtherRulesIntNo1 stops lower-priority rules from also applying
actionTypeStringNoby_percent, by_fixed, to_percent, to_fixed
discountAmountFloatNoDiscount value; capped at 100 when actionType is by_percent
channelsArrayNoReplaces the rule's channels when supplied
customerGroupsArrayNoReplaces the rule's customer groups when supplied

Released under the MIT License.