Skip to main content
PATCH
Update a revenue account

Authorizations

Authorization
string
header
required

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

Path Parameters

id
integer
required

Body

application/json

Fields accepted when updating a revenue account. Send only what changes; an omitted field is left alone, and at least one is required. isDefault: false is refused only when this is the last account holding the default, or when the only other one is retired: the organization must be left with an active default. An organization carrying more than one default - possible from before this rule, or from a clone - can have the extras cleared, which is how that state is repaired.

name
string
Maximum string length: 255
code
string

The bookkeeper's code for the account, e.g. "4000". Unique within the organization; a clash is a 409.

Maximum string length: 50
description
string | null
Maximum string length: 2000
isActive
boolean
default:true

False retires the account. Everything already pointing at it keeps pointing at it; there is no delete. Refused for any request that would leave the default inactive - including the first account in an empty chart, which is always made the default.

isDefault
boolean
default:false

Where a sale posts when the item names no account. Setting it true moves the default off whichever account currently holds it, in the same transaction and behind a per-organization lock. Ignored when the chart has no default yet - the first account always takes it, since creating one is the only way to give the organization a default. The default must be active, so anything landing an inactive one is refused.

Response

The updated revenue account

One account in the organization's chart of accounts. Reference the id as revenueAccountId on a membership plan, a product, a class type, an area type or an instructor type to decide where its sales post.

id
integer
name
string
code
string

The chart-of-accounts code, which is how the club's bookkeeper names the account. Unique within the organization.

description
string | null
isActive
boolean

False for an account retired from the chart. Still valid on existing rows; do not attach it to something new. Never false on the default.

isDefault
boolean

Where a sale posts when nothing on the item names an account. Exactly one account holds it, and it is always active.