Skip to main content
POST
Create 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.

Headers

Idempotency-Key
string

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

Maximum string length: 255

Body

application/json

Fields accepted when creating a revenue account. name and code are required, and the code must be free within the organization. Unknown fields are rejected. The billing entity an account belongs to is not settable here - it is inherited, and re-pointing one rewrites who is selling.

name
string
required
Maximum string length: 255
code
string
required

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

Revenue account created

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.