PUT /V1/salesRules/{ruleId}

Save sales rule.

Path parameters

  • ruleId string Required

Body

  • rule object Required

    Interface RuleInterface

    Hide rule attributes Show rule attributes object
    • rule_id integer

      Rule id

    • name string

      Rule name

    • store_labels array[object]

      Display label

      Hide store_labels attributes Show store_labels attributes object

      Interface RuleLabelInterface

      • store_id integer Required

        StoreId

      • store_label string Required

        The label for the store

      • extension_attributes object

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

    • description string

      Description

    • website_ids array[integer] Required

      A list of websites the rule applies to

    • customer_group_ids array[integer] Required

      Ids of customer groups that the rule applies to

    • from_date string

      The start date when the coupon is active

    • to_date string

      The end date when the coupon is active

    • uses_per_customer integer Required

      Number of uses per customer

    • is_active boolean Required

      The coupon is active

    • condition object

      Interface ConditionInterface

      Hide condition attributes Show condition attributes object
      • condition_type string Required

        Condition type

      • conditions array[object]

        List of conditions

        Interface ConditionInterface

        Interface ConditionInterface

      • aggregator_type string

        The aggregator type

      • operator string Required

        The operator of the condition

      • attribute_name string

        The attribute name of the condition

      • value string Required

        The value of the condition

      • extension_attributes object

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

    • action_condition object

      Interface ConditionInterface

      Hide action_condition attributes Show action_condition attributes object
      • condition_type string Required

        Condition type

      • conditions array[object]

        List of conditions

        Interface ConditionInterface

        Interface ConditionInterface

      • aggregator_type string

        The aggregator type

      • operator string Required

        The operator of the condition

      • attribute_name string

        The attribute name of the condition

      • value string Required

        The value of the condition

      • extension_attributes object

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

    • stop_rules_processing boolean Required

      To stop rule processing

    • is_advanced boolean Required

      Is this field needed

    • product_ids array[integer]

      Product ids

    • sort_order integer Required

      Sort order

    • simple_action string

      Simple action of the rule

    • discount_amount number Required

      Discount amount

    • discount_qty number

      Maximum qty discount is applied

    • discount_step integer Required

      Discount step

    • apply_to_shipping boolean Required

      The rule applies to shipping

    • times_used integer Required

      How many times the rule has been used

    • is_rss boolean Required

      Whether the rule is in RSS

    • coupon_type string Required

      Coupon type

    • use_auto_generation boolean Required

      To auto generate coupon

    • uses_per_coupon integer Required

      Limit of uses per coupon

    • simple_free_shipping string

      To grant free shipping

    • extension_attributes object

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

      Hide extension_attributes attributes Show extension_attributes attributes object
      • reward_points_delta integer
      • product_groups array[string]

Body

  • rule object Required

    Interface RuleInterface

    Hide rule attributes Show rule attributes object
    • rule_id integer

      Rule id

    • name string

      Rule name

    • store_labels array[object]

      Display label

      Hide store_labels attributes Show store_labels attributes object

      Interface RuleLabelInterface

      • store_id integer Required

        StoreId

      • store_label string Required

        The label for the store

      • extension_attributes object

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

    • description string

      Description

    • website_ids array[integer] Required

      A list of websites the rule applies to

    • customer_group_ids array[integer] Required

      Ids of customer groups that the rule applies to

    • from_date string

      The start date when the coupon is active

    • to_date string

      The end date when the coupon is active

    • uses_per_customer integer Required

      Number of uses per customer

    • is_active boolean Required

      The coupon is active

    • condition object

      Interface ConditionInterface

      Hide condition attributes Show condition attributes object
      • condition_type string Required

        Condition type

      • conditions array[object]

        List of conditions

        Interface ConditionInterface

        Interface ConditionInterface

      • aggregator_type string

        The aggregator type

      • operator string Required

        The operator of the condition

      • attribute_name string

        The attribute name of the condition

      • value string Required

        The value of the condition

      • extension_attributes object

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

    • action_condition object

      Interface ConditionInterface

      Hide action_condition attributes Show action_condition attributes object
      • condition_type string Required

        Condition type

      • conditions array[object]

        List of conditions

        Interface ConditionInterface

        Interface ConditionInterface

      • aggregator_type string

        The aggregator type

      • operator string Required

        The operator of the condition

      • attribute_name string

        The attribute name of the condition

      • value string Required

        The value of the condition

      • extension_attributes object

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

    • stop_rules_processing boolean Required

      To stop rule processing

    • is_advanced boolean Required

      Is this field needed

    • product_ids array[integer]

      Product ids

    • sort_order integer Required

      Sort order

    • simple_action string

      Simple action of the rule

    • discount_amount number Required

      Discount amount

    • discount_qty number

      Maximum qty discount is applied

    • discount_step integer Required

      Discount step

    • apply_to_shipping boolean Required

      The rule applies to shipping

    • times_used integer Required

      How many times the rule has been used

    • is_rss boolean Required

      Whether the rule is in RSS

    • coupon_type string Required

      Coupon type

    • use_auto_generation boolean Required

      To auto generate coupon

    • uses_per_coupon integer Required

      Limit of uses per coupon

    • simple_free_shipping string

      To grant free shipping

    • extension_attributes object

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

      Hide extension_attributes attributes Show extension_attributes attributes object
      • reward_points_delta integer
      • product_groups array[string]

Responses

  • 200 Success.

    Hide response attributes Show response attributes object
    • rule_id integer

      Rule id

    • name string

      Rule name

    • store_labels array[object]

      Display label

      Hide store_labels attributes Show store_labels attributes object

      Interface RuleLabelInterface

      • store_id integer Required

        StoreId

      • store_label string Required

        The label for the store

      • extension_attributes object

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

    • description string

      Description

    • website_ids array[integer] Required

      A list of websites the rule applies to

    • customer_group_ids array[integer] Required

      Ids of customer groups that the rule applies to

    • from_date string

      The start date when the coupon is active

    • to_date string

      The end date when the coupon is active

    • uses_per_customer integer Required

      Number of uses per customer

    • is_active boolean Required

      The coupon is active

    • condition object

      Interface ConditionInterface

      Hide condition attributes Show condition attributes object
      • condition_type string Required

        Condition type

      • conditions array[object]

        List of conditions

        Interface ConditionInterface

        Interface ConditionInterface

      • aggregator_type string

        The aggregator type

      • operator string Required

        The operator of the condition

      • attribute_name string

        The attribute name of the condition

      • value string Required

        The value of the condition

      • extension_attributes object

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

    • action_condition object

      Interface ConditionInterface

      Hide action_condition attributes Show action_condition attributes object
      • condition_type string Required

        Condition type

      • conditions array[object]

        List of conditions

        Interface ConditionInterface

        Interface ConditionInterface

      • aggregator_type string

        The aggregator type

      • operator string Required

        The operator of the condition

      • attribute_name string

        The attribute name of the condition

      • value string Required

        The value of the condition

      • extension_attributes object

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

    • stop_rules_processing boolean Required

      To stop rule processing

    • is_advanced boolean Required

      Is this field needed

    • product_ids array[integer]

      Product ids

    • sort_order integer Required

      Sort order

    • simple_action string

      Simple action of the rule

    • discount_amount number Required

      Discount amount

    • discount_qty number

      Maximum qty discount is applied

    • discount_step integer Required

      Discount step

    • apply_to_shipping boolean Required

      The rule applies to shipping

    • times_used integer Required

      How many times the rule has been used

    • is_rss boolean Required

      Whether the rule is in RSS

    • coupon_type string Required

      Coupon type

    • use_auto_generation boolean Required

      To auto generate coupon

    • uses_per_coupon integer Required

      Limit of uses per coupon

    • simple_free_shipping string

      To grant free shipping

    • extension_attributes object

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

      Hide extension_attributes attributes Show extension_attributes attributes object
      • reward_points_delta integer
      • product_groups array[string]
    Hide response attributes Show response attributes object
    • rule_id integer

      Rule id

    • name string

      Rule name

    • store_labels array[object]

      Display label

      Hide store_labels attributes Show store_labels attributes object

      Interface RuleLabelInterface

      • store_id integer Required

        StoreId

      • store_label string Required

        The label for the store

      • extension_attributes object

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

    • description string

      Description

    • website_ids array[integer] Required

      A list of websites the rule applies to

    • customer_group_ids array[integer] Required

      Ids of customer groups that the rule applies to

    • from_date string

      The start date when the coupon is active

    • to_date string

      The end date when the coupon is active

    • uses_per_customer integer Required

      Number of uses per customer

    • is_active boolean Required

      The coupon is active

    • condition object

      Interface ConditionInterface

      Hide condition attributes Show condition attributes object
      • condition_type string Required

        Condition type

      • conditions array[object]

        List of conditions

        Interface ConditionInterface

        Interface ConditionInterface

      • aggregator_type string

        The aggregator type

      • operator string Required

        The operator of the condition

      • attribute_name string

        The attribute name of the condition

      • value string Required

        The value of the condition

      • extension_attributes object

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

    • action_condition object

      Interface ConditionInterface

      Hide action_condition attributes Show action_condition attributes object
      • condition_type string Required

        Condition type

      • conditions array[object]

        List of conditions

        Interface ConditionInterface

        Interface ConditionInterface

      • aggregator_type string

        The aggregator type

      • operator string Required

        The operator of the condition

      • attribute_name string

        The attribute name of the condition

      • value string Required

        The value of the condition

      • extension_attributes object

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

    • stop_rules_processing boolean Required

      To stop rule processing

    • is_advanced boolean Required

      Is this field needed

    • product_ids array[integer]

      Product ids

    • sort_order integer Required

      Sort order

    • simple_action string

      Simple action of the rule

    • discount_amount number Required

      Discount amount

    • discount_qty number

      Maximum qty discount is applied

    • discount_step integer Required

      Discount step

    • apply_to_shipping boolean Required

      The rule applies to shipping

    • times_used integer Required

      How many times the rule has been used

    • is_rss boolean Required

      Whether the rule is in RSS

    • coupon_type string Required

      Coupon type

    • use_auto_generation boolean Required

      To auto generate coupon

    • uses_per_coupon integer Required

      Limit of uses per coupon

    • simple_free_shipping string

      To grant free shipping

    • extension_attributes object

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

      Hide extension_attributes attributes Show extension_attributes attributes object
      • reward_points_delta integer
      • product_groups array[string]
  • 401 Unauthorized

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • 400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • Internal Server error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

PUT /V1/salesRules/{ruleId}
curl \
 --request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/salesRules/{ruleId}' \
 --header "Content-Type: application/json" \
 --data '{"rule":{"rule_id":42,"name":"string","store_labels":[{"store_id":42,"store_label":"string","extension_attributes":{}}],"description":"string","website_ids":[42],"customer_group_ids":[42],"from_date":"string","to_date":"string","uses_per_customer":42,"is_active":true,"condition":{"condition_type":"string","conditions":[{}],"aggregator_type":"string","operator":"string","attribute_name":"string","value":"string","extension_attributes":{}},"action_condition":{"condition_type":"string","conditions":[{}],"aggregator_type":"string","operator":"string","attribute_name":"string","value":"string","extension_attributes":{}},"stop_rules_processing":true,"is_advanced":true,"product_ids":[42],"sort_order":42,"simple_action":"string","discount_amount":42.0,"discount_qty":42.0,"discount_step":42,"apply_to_shipping":true,"times_used":42,"is_rss":true,"coupon_type":"string","use_auto_generation":true,"uses_per_coupon":42,"simple_free_shipping":"string","extension_attributes":{"reward_points_delta":42,"product_groups":["string"]}}}'
curl \
 --request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/salesRules/{ruleId}' \
 --header "Content-Type: application/xml"
Request examples
{
  "rule": {
    "rule_id": 42,
    "name": "string",
    "store_labels": [
      {
        "store_id": 42,
        "store_label": "string",
        "extension_attributes": {}
      }
    ],
    "description": "string",
    "website_ids": [
      42
    ],
    "customer_group_ids": [
      42
    ],
    "from_date": "string",
    "to_date": "string",
    "uses_per_customer": 42,
    "is_active": true,
    "condition": {
      "condition_type": "string",
      "conditions": [
        {}
      ],
      "aggregator_type": "string",
      "operator": "string",
      "attribute_name": "string",
      "value": "string",
      "extension_attributes": {}
    },
    "action_condition": {
      "condition_type": "string",
      "conditions": [
        {}
      ],
      "aggregator_type": "string",
      "operator": "string",
      "attribute_name": "string",
      "value": "string",
      "extension_attributes": {}
    },
    "stop_rules_processing": true,
    "is_advanced": true,
    "product_ids": [
      42
    ],
    "sort_order": 42,
    "simple_action": "string",
    "discount_amount": 42.0,
    "discount_qty": 42.0,
    "discount_step": 42,
    "apply_to_shipping": true,
    "times_used": 42,
    "is_rss": true,
    "coupon_type": "string",
    "use_auto_generation": true,
    "uses_per_coupon": 42,
    "simple_free_shipping": "string",
    "extension_attributes": {
      "reward_points_delta": 42,
      "product_groups": [
        "string"
      ]
    }
  }
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <rule>
    <rule-id type="integer">42</rule-id>
    <name>string</name>
    <store-labels type="array">
      <store-label>
        <store-id type="integer">42</store-id>
        <store-label>string</store-label>
        <extension-attributes>
        </extension-attributes>
      </store-label>
    </store-labels>
    <description>string</description>
    <website-ids type="array">
      <website-id type="integer">42</website-id>
    </website-ids>
    <customer-group-ids type="array">
      <customer-group-id type="integer">42</customer-group-id>
    </customer-group-ids>
    <from-date>string</from-date>
    <to-date>string</to-date>
    <uses-per-customer type="integer">42</uses-per-customer>
    <is-active type="boolean">true</is-active>
    <condition>
      <condition-type>string</condition-type>
      <conditions type="array">
        <condition>
        </condition>
      </conditions>
      <aggregator-type>string</aggregator-type>
      <operator>string</operator>
      <attribute-name>string</attribute-name>
      <value>string</value>
      <extension-attributes>
      </extension-attributes>
    </condition>
    <action-condition>
      <condition-type>string</condition-type>
      <conditions type="array">
        <condition>
        </condition>
      </conditions>
      <aggregator-type>string</aggregator-type>
      <operator>string</operator>
      <attribute-name>string</attribute-name>
      <value>string</value>
      <extension-attributes>
      </extension-attributes>
    </action-condition>
    <stop-rules-processing type="boolean">true</stop-rules-processing>
    <is-advanced type="boolean">true</is-advanced>
    <product-ids type="array">
      <product-id type="integer">42</product-id>
    </product-ids>
    <sort-order type="integer">42</sort-order>
    <simple-action>string</simple-action>
    <discount-amount type="float">42.0</discount-amount>
    <discount-qty type="float">42.0</discount-qty>
    <discount-step type="integer">42</discount-step>
    <apply-to-shipping type="boolean">true</apply-to-shipping>
    <times-used type="integer">42</times-used>
    <is-rss type="boolean">true</is-rss>
    <coupon-type>string</coupon-type>
    <use-auto-generation type="boolean">true</use-auto-generation>
    <uses-per-coupon type="integer">42</uses-per-coupon>
    <simple-free-shipping>string</simple-free-shipping>
    <extension-attributes>
      <reward-points-delta type="integer">42</reward-points-delta>
      <product-groups type="array">
        <product-group>string</product-group>
      </product-groups>
    </extension-attributes>
  </rule>
</root>
Response examples (200)
{
  "rule_id": 42,
  "name": "string",
  "store_labels": [
    {
      "store_id": 42,
      "store_label": "string",
      "extension_attributes": {}
    }
  ],
  "description": "string",
  "website_ids": [
    42
  ],
  "customer_group_ids": [
    42
  ],
  "from_date": "string",
  "to_date": "string",
  "uses_per_customer": 42,
  "is_active": true,
  "condition": {
    "condition_type": "string",
    "conditions": [
      {}
    ],
    "aggregator_type": "string",
    "operator": "string",
    "attribute_name": "string",
    "value": "string",
    "extension_attributes": {}
  },
  "action_condition": {
    "condition_type": "string",
    "conditions": [
      {}
    ],
    "aggregator_type": "string",
    "operator": "string",
    "attribute_name": "string",
    "value": "string",
    "extension_attributes": {}
  },
  "stop_rules_processing": true,
  "is_advanced": true,
  "product_ids": [
    42
  ],
  "sort_order": 42,
  "simple_action": "string",
  "discount_amount": 42.0,
  "discount_qty": 42.0,
  "discount_step": 42,
  "apply_to_shipping": true,
  "times_used": 42,
  "is_rss": true,
  "coupon_type": "string",
  "use_auto_generation": true,
  "uses_per_coupon": 42,
  "simple_free_shipping": "string",
  "extension_attributes": {
    "reward_points_delta": 42,
    "product_groups": [
      "string"
    ]
  }
}
Response examples (200)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <rule-id type="integer">42</rule-id>
  <name>string</name>
  <store-labels type="array">
    <store-label>
      <store-id type="integer">42</store-id>
      <store-label>string</store-label>
      <extension-attributes>
      </extension-attributes>
    </store-label>
  </store-labels>
  <description>string</description>
  <website-ids type="array">
    <website-id type="integer">42</website-id>
  </website-ids>
  <customer-group-ids type="array">
    <customer-group-id type="integer">42</customer-group-id>
  </customer-group-ids>
  <from-date>string</from-date>
  <to-date>string</to-date>
  <uses-per-customer type="integer">42</uses-per-customer>
  <is-active type="boolean">true</is-active>
  <condition>
    <condition-type>string</condition-type>
    <conditions type="array">
      <condition>
      </condition>
    </conditions>
    <aggregator-type>string</aggregator-type>
    <operator>string</operator>
    <attribute-name>string</attribute-name>
    <value>string</value>
    <extension-attributes>
    </extension-attributes>
  </condition>
  <action-condition>
    <condition-type>string</condition-type>
    <conditions type="array">
      <condition>
      </condition>
    </conditions>
    <aggregator-type>string</aggregator-type>
    <operator>string</operator>
    <attribute-name>string</attribute-name>
    <value>string</value>
    <extension-attributes>
    </extension-attributes>
  </action-condition>
  <stop-rules-processing type="boolean">true</stop-rules-processing>
  <is-advanced type="boolean">true</is-advanced>
  <product-ids type="array">
    <product-id type="integer">42</product-id>
  </product-ids>
  <sort-order type="integer">42</sort-order>
  <simple-action>string</simple-action>
  <discount-amount type="float">42.0</discount-amount>
  <discount-qty type="float">42.0</discount-qty>
  <discount-step type="integer">42</discount-step>
  <apply-to-shipping type="boolean">true</apply-to-shipping>
  <times-used type="integer">42</times-used>
  <is-rss type="boolean">true</is-rss>
  <coupon-type>string</coupon-type>
  <use-auto-generation type="boolean">true</use-auto-generation>
  <uses-per-coupon type="integer">42</uses-per-coupon>
  <simple-free-shipping>string</simple-free-shipping>
  <extension-attributes>
    <reward-points-delta type="integer">42</reward-points-delta>
    <product-groups type="array">
      <product-group>string</product-group>
    </product-groups>
  </extension-attributes>
</root>
Response examples (401)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>
Response examples (400)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (400)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>
Response examples (500)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (500)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>
Response examples (default)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>