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

channel_id
string
required

Body

application/json
type
string
required

Wire shorthand for the rule kind, from the order routing rule types endpoint.

Example:

"preferred_location"

active
boolean
position
integer

1-based priority in the channel's rule list. Omitted on create, the rule goes last; a new position reorders the rest of the list around it.

preferences
object

Values for the rule kind's preference schema.

Response

rule created