salesRules/{ruleId}

salesRules/{ruleId}

get/V1/salesRules/{ruleId}

Get rule by ID.

Request
path Parameters
ruleId
required
integer
Responses
200

200 Success.

400

400 Bad Request

401

401 Unauthorized

500

Internal Server error

default

Unexpected error

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": {
    }
}

salesRules/{ruleId}

put/V1/salesRules/{ruleId}

Save sales rule.

Request
path Parameters
ruleId
required
string
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": {
    }
}

salesRules/{ruleId}

delete/V1/salesRules/{ruleId}

Delete rule by ID.

Request
path Parameters
ruleId
required
integer
Responses
200

200 Success.

400

400 Bad Request

401

401 Unauthorized

500

Internal Server error

default

Unexpected error

Response samples
true