Skip to main content
PATCH
Update a pricing rule

Authorizations

Authorization
string
header
required

Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.

Headers

Idempotency-Key
string

Retry-safe key; a repeat of the same request replays the first response

Maximum string length: 255

Path Parameters

id
integer
required

1club pricing rule id

Body

application/json

Fields accepted when updating a pricing rule. Send only what changes; an omitted field is left alone, and at least one is required. A changed adjustment is judged on the rule it produces. Unknown fields are rejected.

name
string

Internal name, shown to staff in the admin portal. Never shown to members.

Required string length: 1 - 255
description
string | null

Internal note. null clears it.

Maximum string length: 2000
isActive
boolean

A switched-off rule prices nothing but is kept. Defaults to true on create.

priority
integer

Precedence when several rules match one slot: LOWER wins. Give the most specific rule the smallest number. Defaults to 0 on create.

adjustmentType
enum<string>

absolute states the hourly price outright; fixed adds an amount per hour; percentage moves the price by a percentage.

Available options:
percentage,
fixed,
absolute
percentageAdjustment
number

Percentage rules only: -10 is 10% off, 20 is 20% more.

Required range: -100 <= x <= 100
fixedAmountAdjustment
number | null

Fixed rules: the amount added per hour, negative for a discount. Absolute rules: the hourly price, zero or more. Scaled by the booking length.

scopes
object[]

Which resources the rule prices. Empty means every area, coach and class. Replaces the whole list when sent on an update.

Maximum array length: 20
conditions
object[]

When the rule applies; every condition must hold. Empty or omitted means always. Replaces the whole list when sent on an update.

Maximum array length: 20

One condition a booking must meet for the rule to apply. Weekday names are lowercase English; times are 24-hour HH:mm in the club timezone (24:00 ends a window at midnight); dates are YYYY-MM-DD.

Response

The updated pricing rule

One rule of the organization's price list. It applies to the resources its scopes name (none means every area, coach and class) when every one of its conditions holds; when several rules match one slot, the lowest priority wins. Rules are silent: members see the resulting price, never the rule's name.

ruleId
integer
name
string
description
string | null
isActive
boolean
priority
integer

Lower wins.

adjustmentType
enum<string>
Available options:
percentage,
fixed,
absolute
percentageAdjustment
number | null

Set on percentage rules; null on the others.

fixedAmountAdjustment
number | null

The per-hour delta of a fixed rule or the hourly price of an absolute one; null on percentage rules.

scopes
object[]
conditions
object[]

One condition a booking must meet for the rule to apply. Weekday names are lowercase English; times are 24-hour HH:mm in the club timezone (24:00 ends a window at midnight); dates are YYYY-MM-DD.

createdAt
string<date-time>
updatedAt
string<date-time>