salesRules

salesRules

post/V1/salesRules

Save sales rule.

Request
Request Body schema:
required
object (sales-rule-data-rule-interface)

Interface RuleInterface

Responses
200

200 Success.

400

400 Bad Request

401

401 Unauthorized

500

Internal Server error

default

Unexpected error

Request samples
{
  • "rule": {
    }
}
Response samples
{
  • "rule_id": 0,
  • "name": "string",
  • "store_labels": [
    ],
  • "description": "string",
  • "website_ids": [
    ],
  • "customer_group_ids": [
    ],
  • "from_date": "string",
  • "to_date": "string",
  • "uses_per_customer": 0,
  • "is_active": true,
  • "condition": {
    },
  • "action_condition": {
    },
  • "stop_rules_processing": true,
  • "is_advanced": true,
  • "product_ids": [
    ],
  • "sort_order": 0,
  • "simple_action": "string",
  • "discount_amount": 0,
  • "discount_qty": 0,
  • "discount_step": 0,
  • "apply_to_shipping": true,
  • "times_used": 0,
  • "is_rss": true,
  • "coupon_type": "string",
  • "use_auto_generation": true,
  • "uses_per_coupon": 0,
  • "simple_free_shipping": "string",
  • "extension_attributes": {
    }
}