Skip to main content
PATCH
/
api
/
v3
/
admin
/
promotions
/
{promotion_id}
/
promotion_rules
/
{id}
Update a rule's preferences
const options = {
  method: 'PATCH',
  headers: {
    'x-spree-api-key': '<api-key>',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({preferences: {}})
};

fetch('http://{defaultHost}/api/v3/admin/promotions/{promotion_id}/promotion_rules/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "prorule_UkLWZg9DAJ",
  "created_at": "2026-05-24T17:37:41.423Z",
  "updated_at": "2026-05-24T17:37:41.701Z",
  "type": "currency",
  "promotion_id": "promo_UkLWZg9DAJ",
  "preferences": {
    "currency": "GBP"
  },
  "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
id
string
required

Body

application/json
preferences
object

Response

200 - application/json

rule updated