Skip to main content
PATCH
Update a class type

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 class type. Send only what changes; null clears a nullable field, an omitted field is left alone, and at least one is required. A rename does not move slug. Every field applies to classes already scheduled as this type, not only to new ones.

name
string
Maximum string length: 255
slug
string

Stable key. Derived from the name when omitted; send one only when something outside 1club already refers to it. An explicit slug that clashes is a 409, and a rename never moves it.

Maximum string length: 120
Pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
description
string | null
Maximum string length: 2000
revenueAccountId
integer | null

Where a sale on this kind of class posts, from GET /v1/platform/revenue-accounts. Leave it unset and the sale posts to whichever account the organization has marked default, resolved at the time of the sale.

maxPartySize
integer
default:1

How many people one booking may bring, including the booker.

Required range: 1 <= x <= 1000
showSpotsLeft
boolean
default:false

Whether member-facing class rows always show how many places are left. Off, a count appears only when the class is nearly full.

allowMultiDay
boolean
default:false

Whether a class of this kind may run across more than one calendar day.

cancelIfAttendanceZero
boolean
default:false

Whether a class with nobody booked cancels itself.

cancelIfAttendanceZeroHoursInAdvance
integer
default:0

Hours before the start that cancellation runs. Meaningless unless cancelIfAttendanceZero.

Required range: 0 <= x <= 720
bookingAudience
object | null

Who something applies to, as a set of predicates a contact must match. null means everybody. The same shape a promotion segment and an automation entry condition use. membershipPlanIds is which plan the contact must HOLD, not which plan a purchase discounts.

sport
string | null

The sport classes of this kind are for, a canonical sport id such as "jiu-jitsu". A default only: each class still carries its own sport. An unrecognised value is rejected.

ageGroups
enum<string>[]

Who a class of this kind is for: every age band it suits (baby 0–2, preschool 3–5, child 6–9, preteen 10–12, junior 13–17, adult 18–64, senior 65+), the same bands the age smart tags use. Stored youngest first, each once; a class for every age lists all of them, and an empty list means the club has not said. Search on the 1club network filters on it.

Available options:
baby,
preschool,
child,
preteen,
junior,
adult,
senior
ageGroup
enum<string> | null
deprecated

Deprecated - use ageGroups. The single age group from before a class type could name several bands, kept for one release. Read: the old value that names exactly ageGroups (infant is baby and preschool, child is child and preteen, all_ages is every band), else null. Write: read only when ageGroups is absent, mapped the same way, null clearing. Sending back the value a read reported changes nothing, and it never replaces bands no old value names - set those with ageGroups.

Available options:
infant,
child,
junior,
adult,
senior,
all_ages
difficulty
enum<string> | null

How hard a class of this kind is. Search on the 1club network filters on it. Not a rank: see programId.

Available options:
beginner,
intermediate,
advanced,
all_levels
programId
integer | null

The program this kind of class belongs to, from GET /v1/platform/programs. Its sessions count toward the program's progression track. Plans cover class types, not programs, so moving a class type between programs changes no plan.

progressionTrackId
integer | null
deprecated

Deprecated: set programId instead; the track a class type counts toward is its program's. Still accepted when programId is absent: a track puts the class type in the organization's one program counting toward that track (400 when none or several do), and null takes it out of its program.

Response

The updated class type

A kind of class the organization runs. Reference the id as classTypeId on a class, or in classTypeIds on a class pay rate policy. One shape for the list, get-by-id, create and update.

id
integer
name
string
slug
string

Stable key, derived from the name when a create does not send one. A rename never moves it.

sortOrder
integer

Position in the order staff set in Settings, 1 first. Lists come back in this order; change it with the type's PUT .../order.

description
string | null
revenueAccountId
integer | null

Where a sale on this kind of class posts. Null falls back to the organization's default account.

classCount
integer

Classes currently run as this type, past and future.

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

How many people one booking on a class of this kind may bring, including the booker.

showSpotsLeft
boolean

Whether member-facing class rows always show how many places are left. Off, a count appears only when the class is nearly full.

allowMultiDay
boolean

Whether a class of this kind may run across more than one calendar day.

cancelIfAttendanceZero
boolean

Whether a class with nobody booked cancels itself.

cancelIfAttendanceZeroHoursInAdvance
integer

Hours before the start that cancellation runs. Meaningless unless cancelIfAttendanceZero.

bookingAudience
object | null

Who something applies to, as a set of predicates a contact must match. null means everybody. The same shape a promotion segment and an automation entry condition use. membershipPlanIds is which plan the contact must HOLD, not which plan a purchase discounts.

sport
string | null

The sport classes of this kind are for, a canonical sport id such as "jiu-jitsu". A default only: each class still carries its own sport. An unrecognised value is rejected.

ageGroups
enum<string>[]

Who a class of this kind is for: every age band it suits (baby 0–2, preschool 3–5, child 6–9, preteen 10–12, junior 13–17, adult 18–64, senior 65+), the same bands the age smart tags use. Stored youngest first, each once; a class for every age lists all of them, and an empty list means the club has not said. Search on the 1club network filters on it.

Available options:
baby,
preschool,
child,
preteen,
junior,
adult,
senior
ageGroup
enum<string> | null
deprecated

Deprecated - use ageGroups. The single age group from before a class type could name several bands, kept for one release. Read: the old value that names exactly ageGroups (infant is baby and preschool, child is child and preteen, all_ages is every band), else null. Write: read only when ageGroups is absent, mapped the same way, null clearing. Sending back the value a read reported changes nothing, and it never replaces bands no old value names - set those with ageGroups.

Available options:
infant,
child,
junior,
adult,
senior,
all_ages
difficulty
enum<string> | null

How hard a class of this kind is. Search on the 1club network filters on it. Not a rank: see programId.

Available options:
beginner,
intermediate,
advanced,
all_levels
programId
integer | null

The program this kind of class belongs to, from GET /v1/platform/programs. Its sessions count toward the program's progression track. Plans cover class types, not programs, so moving a class type between programs changes no plan.

progressionTrackId
integer | null
read-only

The progression track sessions of this kind count toward: its program's. Null counts toward none. Set it on the program.