Spree Admin SDK
Create a rule on a promotion
Adds a new rule to a promotion. The type is the wire shorthand from GET /promotion_rules/types (e.g. currency, item_total, product).
Required scope: write_promotions (for API-key authentication).
POST
Spree Admin SDK
Authorizations
Secret API key for admin access
JWT token for admin user authentication
Path Parameters
Body
application/json
The rule kind, from GET /promotion_rules/types.
Example:
"currency"
Values for the rule kind's settings schema, from GET /promotion_rules/types.
For the product rule.
For the category rule.
For the user rule: the customers who qualify.
Response
rule created with preferences

