curl --request PATCH \
--url https://api.1club.ai/v1/platform/areas/{areaId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"areaTypeId": 123,
"description": "<string>",
"pricePerHour": 1,
"operatingHours": {},
"maxConcurrentBookings": 2
}
'import requests
url = "https://api.1club.ai/v1/platform/areas/{areaId}"
payload = {
"name": "<string>",
"areaTypeId": 123,
"description": "<string>",
"pricePerHour": 1,
"operatingHours": {},
"maxConcurrentBookings": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
areaTypeId: 123,
description: '<string>',
pricePerHour: 1,
operatingHours: {},
maxConcurrentBookings: 2
})
};
fetch('https://api.1club.ai/v1/platform/areas/{areaId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.1club.ai/v1/platform/areas/{areaId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'areaTypeId' => 123,
'description' => '<string>',
'pricePerHour' => 1,
'operatingHours' => [
],
'maxConcurrentBookings' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/areas/{areaId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"description\": \"<string>\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 2\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.1club.ai/v1/platform/areas/{areaId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"description\": \"<string>\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/areas/{areaId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"description\": \"<string>\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"description": "<string>",
"clubId": 123,
"areaTypeId": 123,
"status": "active",
"visibility": "Private",
"sports": [
"<string>"
],
"pricePerHour": 123,
"maxConcurrentBookings": 123,
"timezone": "<string>",
"operatingHours": {}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Update an area
Edits an area. Send only what changes; an omitted field is left alone. Setting status to maintenance or inactive, or narrowing visibility, takes the area out of availability - which is the durable way to close a court indefinitely, where an area block closes it for a stated window.
Any edit to hours, status, visibility, capacity or area type writes an availability_changes entry alongside the row, so partners see it on their next reconciliation.
clubId is not editable: moving a court to another club would strand its bookings, class holds and blocks at the old one. There is no delete either - an area carries booking history, so close it with status instead. Supports the Idempotency-Key header.
curl --request PATCH \
--url https://api.1club.ai/v1/platform/areas/{areaId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"areaTypeId": 123,
"description": "<string>",
"pricePerHour": 1,
"operatingHours": {},
"maxConcurrentBookings": 2
}
'import requests
url = "https://api.1club.ai/v1/platform/areas/{areaId}"
payload = {
"name": "<string>",
"areaTypeId": 123,
"description": "<string>",
"pricePerHour": 1,
"operatingHours": {},
"maxConcurrentBookings": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
areaTypeId: 123,
description: '<string>',
pricePerHour: 1,
operatingHours: {},
maxConcurrentBookings: 2
})
};
fetch('https://api.1club.ai/v1/platform/areas/{areaId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.1club.ai/v1/platform/areas/{areaId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'areaTypeId' => 123,
'description' => '<string>',
'pricePerHour' => 1,
'operatingHours' => [
],
'maxConcurrentBookings' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/areas/{areaId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"description\": \"<string>\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 2\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.1club.ai/v1/platform/areas/{areaId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"description\": \"<string>\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/areas/{areaId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"description\": \"<string>\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"description": "<string>",
"clubId": 123,
"areaTypeId": 123,
"status": "active",
"visibility": "Private",
"sports": [
"<string>"
],
"pricePerHour": 123,
"maxConcurrentBookings": 123,
"timezone": "<string>",
"operatingHours": {}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.
Path Parameters
Area id
Body
Fields accepted when updating an area. Send only what changes; an omitted field is left alone. At least one field is required, and unknown fields are rejected. clubId is absent on purpose - moving a court to another club would strand its bookings, class holds and blocks at the old one.
255From GET /v1/platform/area-types. Decides which sports the area is bookable for and what it is priced from, so resolve it rather than guessing.
5000Only an active area is bookable. maintenance and inactive take it out of availability without losing its history - this is how a court is closed indefinitely, where an area block closes it for a stated window.
active, maintenance, inactive Private, Member_only, Public Overrides the area type's default hourly price; null falls back to it.
x >= 0Per-day-of-week opening schedule, in the club's timezone. Intersected with the club's own hours - an area is never bookable outside them.
How many bookings may hold the area at the same time. 1 for an ordinary court.
x >= 1Response
The updated area
An area - a court, a studio, a lane. One shape for the list, get-by-id, create and update.
The kind of area, from GET /v1/platform/area-types. Decides sports and the default price.
Only an active area is bookable, and only those appear in the list. The other two resolve by id.
active, maintenance, inactive The list shows only Public areas; the others resolve by id.
Private, Member_only, Public Sports the area is bookable for, from its area type.
IANA timezone the operating hours are expressed in (the club's, falling back to the organization's). Convert a local wall time in this zone when sending startTime/endTime to POST /v1/platform/bookings.
Per-day-of-week opening schedule
Was this page helpful?