Skip to main content
PATCH
Update an area 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 an area 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 area of the type inherits sports, defaultPricePerHour, defaultMaxPlayers and isBookable, so changing one of those reprices or re-sports every area at once and emits an availability change for each. sports replaces the whole list.

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 booking on this kind of area 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.

sports
string[]

Canonical sport ids an area of this type can be booked for, e.g. ["padel"]. This is what makes the areas bookable for a sport at all; an unrecognised value is rejected rather than stored.

Maximum array length: 20
isBookable
boolean
default:true

False for a kind of space that is not booked at all (a storeroom, a corridor).

defaultPricePerHour
number | null

Hourly price an area of this type starts from. An area may override it.

Required range: x >= 0
defaultMaxPlayers
integer | null

How many people a slot on this type normally takes.

Required range: 1 <= x <= 1000
maxConcurrentBookings
integer
default:1

How many bookings may hold an area of this type at once. 1 for an ordinary court.

Required range: 1 <= x <= 100

Response

The updated area type

A kind of area, and the defaults every area of that kind inherits. 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.

description
string | null
revenueAccountId
integer | null

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

areaCount
integer

Areas currently of this type, whatever their status.

createdAt
string<date-time>
updatedAt
string<date-time>
sports
string[]

Sports an area of this type can be booked for.

isBookable
boolean

False for a type that is not booked at all (a storeroom, a corridor). Do not build bookable inventory on one.

defaultPricePerHour
number | null

Hourly price an area of this type starts from; an area may override it.

defaultMaxPlayers
integer | null

How many people a slot on this type normally takes.

maxConcurrentBookings
integer

How many bookings may hold an area of this type at once. 1 for an ordinary court.