SalesRules

sales Rule Rule Repository V1Get By Id Get

get

Get rule by ID.

Path parameters
ruleIdstringRequired

(Required)

Example: <integer>
Responses
200

OK

application/json
Responseobject
get
GET /V1/salesRules/{ruleId} HTTP/1.1
Host: {{baseurl}}
Accept: */*
{
  "website_ids": [
    "<integer>",
    "<integer>"
  ],
  "customer_group_ids": [
    "<integer>",
    "<integer>"
  ],
  "uses_per_customer": "<integer>",
  "is_active": "<boolean>",
  "stop_rules_processing": "<boolean>",
  "is_advanced": "<boolean>",
  "sort_order": "<integer>",
  "discount_amount": "<number>",
  "discount_step": "<integer>",
  "apply_to_shipping": "<boolean>",
  "times_used": "<integer>",
  "is_rss": "<boolean>",
  "coupon_type": "<string>",
  "use_auto_generation": "<boolean>",
  "uses_per_coupon": "<integer>",
  "rule_id": "<integer>",
  "name": "<string>",
  "store_labels": [
    {
      "store_id": "<integer>",
      "store_label": "<string>",
      "extension_attributes": "<object>"
    },
    {
      "store_id": "<integer>",
      "store_label": "<string>",
      "extension_attributes": "<object>"
    }
  ],
  "description": "<string>",
  "from_date": "<string>",
  "to_date": "<string>",
  "condition": {
    "condition_type": "<string>",
    "operator": "<string>",
    "value": "<string>",
    "conditions": [
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      },
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      }
    ],
    "aggregator_type": "<string>",
    "attribute_name": "<string>",
    "extension_attributes": "<object>"
  },
  "action_condition": {
    "condition_type": "<string>",
    "operator": "<string>",
    "value": "<string>",
    "conditions": [
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      },
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      }
    ],
    "aggregator_type": "<string>",
    "attribute_name": "<string>",
    "extension_attributes": "<object>"
  },
  "product_ids": [
    "<integer>",
    "<integer>"
  ],
  "simple_action": "<string>",
  "discount_qty": "<number>",
  "simple_free_shipping": "<string>",
  "extension_attributes": "<object>"
}

sales Rule Rule Repository V1Save Put

put

Save sales rule.

Path parameters
ruleIdstringRequired

(Required)

Example: <string>
Header parameters
Content-TypestringOptionalExample: application/json
Body
objectOptionalExample: {"rule":{"website_ids":["<integer>","<integer>"],"customer_group_ids":["<integer>","<integer>"],"uses_per_customer":"<integer>","is_active":"<boolean>","stop_rules_processing":"<boolean>","is_advanced":"<boolean>","sort_order":"<integer>","discount_amount":"<number>","discount_step":"<integer>","apply_to_shipping":"<boolean>","times_used":"<integer>","is_rss":"<boolean>","coupon_type":"<string>","use_auto_generation":"<boolean>","uses_per_coupon":"<integer>","rule_id":"<integer>","name":"<string>","store_labels":[{"store_id":"<integer>","store_label":"<string>","extension_attributes":"<object>"},{"store_id":"<integer>","store_label":"<string>","extension_attributes":"<object>"}],"description":"<string>","from_date":"<string>","to_date":"<string>","condition":{"condition_type":"<string>","operator":"<string>","value":"<string>","conditions":[{"value":"<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"},{"value":"<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"}],"aggregator_type":"<string>","attribute_name":"<string>","extension_attributes":"<object>"},"action_condition":{"condition_type":"<string>","operator":"<string>","value":"<string>","conditions":[{"value":"<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"},{"value":"<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"}],"aggregator_type":"<string>","attribute_name":"<string>","extension_attributes":"<object>"},"product_ids":["<integer>","<integer>"],"simple_action":"<string>","discount_qty":"<number>","simple_free_shipping":"<string>","extension_attributes":"<object>"}}
Responses
200

OK

application/json
Responseobject
put
PUT /V1/salesRules/{ruleId} HTTP/1.1
Host: {{baseurl}}
Content-Type: application/json
Accept: */*
Content-Length: 1712

{
  "rule": {
    "website_ids": [
      "<integer>",
      "<integer>"
    ],
    "customer_group_ids": [
      "<integer>",
      "<integer>"
    ],
    "uses_per_customer": "<integer>",
    "is_active": "<boolean>",
    "stop_rules_processing": "<boolean>",
    "is_advanced": "<boolean>",
    "sort_order": "<integer>",
    "discount_amount": "<number>",
    "discount_step": "<integer>",
    "apply_to_shipping": "<boolean>",
    "times_used": "<integer>",
    "is_rss": "<boolean>",
    "coupon_type": "<string>",
    "use_auto_generation": "<boolean>",
    "uses_per_coupon": "<integer>",
    "rule_id": "<integer>",
    "name": "<string>",
    "store_labels": [
      {
        "store_id": "<integer>",
        "store_label": "<string>",
        "extension_attributes": "<object>"
      },
      {
        "store_id": "<integer>",
        "store_label": "<string>",
        "extension_attributes": "<object>"
      }
    ],
    "description": "<string>",
    "from_date": "<string>",
    "to_date": "<string>",
    "condition": {
      "condition_type": "<string>",
      "operator": "<string>",
      "value": "<string>",
      "conditions": [
        {
          "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
        },
        {
          "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
        }
      ],
      "aggregator_type": "<string>",
      "attribute_name": "<string>",
      "extension_attributes": "<object>"
    },
    "action_condition": {
      "condition_type": "<string>",
      "operator": "<string>",
      "value": "<string>",
      "conditions": [
        {
          "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
        },
        {
          "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
        }
      ],
      "aggregator_type": "<string>",
      "attribute_name": "<string>",
      "extension_attributes": "<object>"
    },
    "product_ids": [
      "<integer>",
      "<integer>"
    ],
    "simple_action": "<string>",
    "discount_qty": "<number>",
    "simple_free_shipping": "<string>",
    "extension_attributes": "<object>"
  }
}
{
  "website_ids": [
    "<integer>",
    "<integer>"
  ],
  "customer_group_ids": [
    "<integer>",
    "<integer>"
  ],
  "uses_per_customer": "<integer>",
  "is_active": "<boolean>",
  "stop_rules_processing": "<boolean>",
  "is_advanced": "<boolean>",
  "sort_order": "<integer>",
  "discount_amount": "<number>",
  "discount_step": "<integer>",
  "apply_to_shipping": "<boolean>",
  "times_used": "<integer>",
  "is_rss": "<boolean>",
  "coupon_type": "<string>",
  "use_auto_generation": "<boolean>",
  "uses_per_coupon": "<integer>",
  "rule_id": "<integer>",
  "name": "<string>",
  "store_labels": [
    {
      "store_id": "<integer>",
      "store_label": "<string>",
      "extension_attributes": "<object>"
    },
    {
      "store_id": "<integer>",
      "store_label": "<string>",
      "extension_attributes": "<object>"
    }
  ],
  "description": "<string>",
  "from_date": "<string>",
  "to_date": "<string>",
  "condition": {
    "condition_type": "<string>",
    "operator": "<string>",
    "value": "<string>",
    "conditions": [
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      },
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      }
    ],
    "aggregator_type": "<string>",
    "attribute_name": "<string>",
    "extension_attributes": "<object>"
  },
  "action_condition": {
    "condition_type": "<string>",
    "operator": "<string>",
    "value": "<string>",
    "conditions": [
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      },
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      }
    ],
    "aggregator_type": "<string>",
    "attribute_name": "<string>",
    "extension_attributes": "<object>"
  },
  "product_ids": [
    "<integer>",
    "<integer>"
  ],
  "simple_action": "<string>",
  "discount_qty": "<number>",
  "simple_free_shipping": "<string>",
  "extension_attributes": "<object>"
}

sales Rule Rule Repository V1Delete By Id Delete

delete

Delete rule by ID.

Path parameters
ruleIdstringRequired

(Required)

Example: <integer>
Responses
200

OK

application/json
Responseobject
delete
DELETE /V1/salesRules/{ruleId} HTTP/1.1
Host: {{baseurl}}
Accept: */*
true

sales Rule Rule Repository V1Save Post

post

Save sales rule.

Header parameters
Content-TypestringOptionalExample: application/json
Body
objectOptionalExample: {"rule":{"website_ids":["<integer>","<integer>"],"customer_group_ids":["<integer>","<integer>"],"uses_per_customer":"<integer>","is_active":"<boolean>","stop_rules_processing":"<boolean>","is_advanced":"<boolean>","sort_order":"<integer>","discount_amount":"<number>","discount_step":"<integer>","apply_to_shipping":"<boolean>","times_used":"<integer>","is_rss":"<boolean>","coupon_type":"<string>","use_auto_generation":"<boolean>","uses_per_coupon":"<integer>","rule_id":"<integer>","name":"<string>","store_labels":[{"store_id":"<integer>","store_label":"<string>","extension_attributes":"<object>"},{"store_id":"<integer>","store_label":"<string>","extension_attributes":"<object>"}],"description":"<string>","from_date":"<string>","to_date":"<string>","condition":{"condition_type":"<string>","operator":"<string>","value":"<string>","conditions":[{"value":"<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"},{"value":"<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"}],"aggregator_type":"<string>","attribute_name":"<string>","extension_attributes":"<object>"},"action_condition":{"condition_type":"<string>","operator":"<string>","value":"<string>","conditions":[{"value":"<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"},{"value":"<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"}],"aggregator_type":"<string>","attribute_name":"<string>","extension_attributes":"<object>"},"product_ids":["<integer>","<integer>"],"simple_action":"<string>","discount_qty":"<number>","simple_free_shipping":"<string>","extension_attributes":"<object>"}}
Responses
200

OK

application/json
Responseobject
post
POST /V1/salesRules HTTP/1.1
Host: {{baseurl}}
Content-Type: application/json
Accept: */*
Content-Length: 1712

{
  "rule": {
    "website_ids": [
      "<integer>",
      "<integer>"
    ],
    "customer_group_ids": [
      "<integer>",
      "<integer>"
    ],
    "uses_per_customer": "<integer>",
    "is_active": "<boolean>",
    "stop_rules_processing": "<boolean>",
    "is_advanced": "<boolean>",
    "sort_order": "<integer>",
    "discount_amount": "<number>",
    "discount_step": "<integer>",
    "apply_to_shipping": "<boolean>",
    "times_used": "<integer>",
    "is_rss": "<boolean>",
    "coupon_type": "<string>",
    "use_auto_generation": "<boolean>",
    "uses_per_coupon": "<integer>",
    "rule_id": "<integer>",
    "name": "<string>",
    "store_labels": [
      {
        "store_id": "<integer>",
        "store_label": "<string>",
        "extension_attributes": "<object>"
      },
      {
        "store_id": "<integer>",
        "store_label": "<string>",
        "extension_attributes": "<object>"
      }
    ],
    "description": "<string>",
    "from_date": "<string>",
    "to_date": "<string>",
    "condition": {
      "condition_type": "<string>",
      "operator": "<string>",
      "value": "<string>",
      "conditions": [
        {
          "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
        },
        {
          "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
        }
      ],
      "aggregator_type": "<string>",
      "attribute_name": "<string>",
      "extension_attributes": "<object>"
    },
    "action_condition": {
      "condition_type": "<string>",
      "operator": "<string>",
      "value": "<string>",
      "conditions": [
        {
          "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
        },
        {
          "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
        }
      ],
      "aggregator_type": "<string>",
      "attribute_name": "<string>",
      "extension_attributes": "<object>"
    },
    "product_ids": [
      "<integer>",
      "<integer>"
    ],
    "simple_action": "<string>",
    "discount_qty": "<number>",
    "simple_free_shipping": "<string>",
    "extension_attributes": "<object>"
  }
}
{
  "website_ids": [
    "<integer>",
    "<integer>"
  ],
  "customer_group_ids": [
    "<integer>",
    "<integer>"
  ],
  "uses_per_customer": "<integer>",
  "is_active": "<boolean>",
  "stop_rules_processing": "<boolean>",
  "is_advanced": "<boolean>",
  "sort_order": "<integer>",
  "discount_amount": "<number>",
  "discount_step": "<integer>",
  "apply_to_shipping": "<boolean>",
  "times_used": "<integer>",
  "is_rss": "<boolean>",
  "coupon_type": "<string>",
  "use_auto_generation": "<boolean>",
  "uses_per_coupon": "<integer>",
  "rule_id": "<integer>",
  "name": "<string>",
  "store_labels": [
    {
      "store_id": "<integer>",
      "store_label": "<string>",
      "extension_attributes": "<object>"
    },
    {
      "store_id": "<integer>",
      "store_label": "<string>",
      "extension_attributes": "<object>"
    }
  ],
  "description": "<string>",
  "from_date": "<string>",
  "to_date": "<string>",
  "condition": {
    "condition_type": "<string>",
    "operator": "<string>",
    "value": "<string>",
    "conditions": [
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      },
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      }
    ],
    "aggregator_type": "<string>",
    "attribute_name": "<string>",
    "extension_attributes": "<object>"
  },
  "action_condition": {
    "condition_type": "<string>",
    "operator": "<string>",
    "value": "<string>",
    "conditions": [
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      },
      {
        "value": "<Circular reference to #/components/schemas/sales-rule-data-condition-interface detected>"
      }
    ],
    "aggregator_type": "<string>",
    "attribute_name": "<string>",
    "extension_attributes": "<object>"
  },
  "product_ids": [
    "<integer>",
    "<integer>"
  ],
  "simple_action": "<string>",
  "discount_qty": "<number>",
  "simple_free_shipping": "<string>",
  "extension_attributes": "<object>"
}