SalesRules
Save sales rule.
Path parameters
ruleIdstringRequiredExample:
(Required)
<string>Header parameters
Content-TypestringOptionalExample:
application/jsonBody
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
400
Bad Request
application/json
401
Unauthorized
application/json
500
Internal Server Error
application/json
put
/V1/salesRules/{ruleId}Delete rule by ID.
Path parameters
ruleIdstringRequiredExample:
(Required)
<integer>Responses
200
OK
application/json
Responseobject
400
Bad Request
application/json
401
Unauthorized
application/json
500
Internal Server Error
application/json
delete
/V1/salesRules/{ruleId}Save sales rule.
Header parameters
Content-TypestringOptionalExample:
application/jsonBody
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
400
Bad Request
application/json
401
Unauthorized
application/json
500
Internal Server Error
application/json
post
/V1/salesRules