younifyd
Menu

Update salesRules/{ruleId}

Update salesRules/{ruleId}

PUT/V1/salesRules/{ruleId}

Use it in a workflow

  1. Add a step and choose the Adobe Commerce connector.
  2. Pick the Update salesRules/{ruleId} action (under Promotions).
  3. Fill in the fields below, then reference the result from later steps as {{updateSalesrulesRuleid.response.data}}.

Request

Path parameters

ruleIdstringrequired

Response

Returns 200 with an object. Read it in later steps with {{updateSalesrulesRuleid.response.data.<field>}}.

rule_idinteger

Rule id

namestring

Rule name

store_labelsarray<object>

Display label

store_idintegerrequired

StoreId

store_labelstringrequired

The label for the store

extension_attributesobject

ExtensionInterface class for @see \Magento\SalesRule\Api\Data\RuleLabelInterface

descriptionstring

Description

website_idsarray<integer>

A list of websites the rule applies to

customer_group_idsarray<integer>

Ids of customer groups that the rule applies to

from_datestring

The start date when the coupon is active

to_datestring

The end date when the coupon is active

uses_per_customerinteger

Number of uses per customer

is_activeboolean

The coupon is active

conditionobject

Interface ConditionInterface

condition_typestringrequired

Condition type

conditionsarray<object>

List of conditions

aggregator_typestring

The aggregator type

operatorstringrequired

The operator of the condition

attribute_namestring

The attribute name of the condition

valuestringrequired

The value of the condition

extension_attributesobject1 fields

ExtensionInterface class for @see \Magento\SalesRule\Api\Data\ConditionInterface

action_conditionobject

Interface ConditionInterface

condition_typestringrequired

Condition type

conditionsarray<object>

List of conditions

aggregator_typestring

The aggregator type

operatorstringrequired

The operator of the condition

attribute_namestring

The attribute name of the condition

valuestringrequired

The value of the condition

extension_attributesobject1 fields

ExtensionInterface class for @see \Magento\SalesRule\Api\Data\ConditionInterface

stop_rules_processingboolean

To stop rule processing

is_advancedboolean

Is this field needed

product_idsarray<integer>

Product ids

sort_orderinteger

Sort order

simple_actionstring

Simple action of the rule

discount_amountnumber

Discount amount

discount_qtynumber

Maximum qty discount is applied

discount_stepinteger

Discount step

apply_to_shippingboolean

The rule applies to shipping

times_usedinteger

How many times the rule has been used

is_rssboolean

Whether the rule is in RSS

coupon_typestring

Coupon type

use_auto_generationboolean

To auto generate coupon

uses_per_couponinteger

Limit of uses per coupon

simple_free_shippingstring

To grant free shipping

extension_attributesobject

ExtensionInterface class for @see \Magento\SalesRule\Api\Data\RuleInterface

reward_points_deltainteger
json
{
  "website_ids": [
    0
  ],
  "customer_group_ids": [
    0
  ],
  "uses_per_customer": 0,
  "is_active": false,
  "stop_rules_processing": false,
  "is_advanced": false,
  "sort_order": 0,
  "discount_amount": 0,
  "discount_step": 0,
  "apply_to_shipping": false,
  "times_used": 0,
  "is_rss": false
}

Need more? See the Adobe Commerce guide for connection setup and behaviour shared by every action.

Update salesRules/{ruleId} — Adobe Commerce — Documentation