Skip to main content
POST
Spree Admin SDK

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Path Parameters

promotion_id
string
required

Body

application/json
type
string
required

The rule kind, from GET /promotion_rules/types.

Example:

"currency"

preferences
object

Values for the rule kind's settings schema, from GET /promotion_rules/types.

product_ids
string[]

For the product rule.

category_ids
string[]

For the category rule.

customer_ids
string[]

For the user rule: the customers who qualify.

Response

rule created with preferences