Skip to main content
POST
/
api
/
v3
/
admin
/
promotions
/
{promotion_id}
/
promotion_rules
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://your-store.com',
  secretKey: 'sk_xxx',
})

const rule = await client.promotions.rules.create('promo_UkLWZg9DAJ', {
  type: 'currency',
  preferences: { currency: 'EUR' },
})
{
  "id": "prorule_UkLWZg9DAJ",
  "created_at": "2026-05-24T17:37:41.133Z",
  "updated_at": "2026-05-24T17:37:41.133Z",
  "type": "currency",
  "promotion_id": "promo_UkLWZg9DAJ",
  "preferences": {
    "currency": "EUR"
  },
  "preference_schema": [
    {
      "key": "currency",
      "type": "string",
      "default": null
    }
  ],
  "label": "Currency",
  "product_ids": null,
  "category_ids": null,
  "customer_ids": null
}

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

Use this file to discover all available pages before exploring further.

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
Example:

"currency"

preferences
object

Response

rule created with preferences