curl --request POST \
--url https://api.1club.ai/v1/platform/areas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"areaTypeId": 123,
"clubId": 123,
"description": "<string>",
"status": "active",
"visibility": "Public",
"pricePerHour": 1,
"operatingHours": {},
"maxConcurrentBookings": 1,
"isDefault": true,
"images": [
"<string>"
]
}
'import requests
url = "https://api.1club.ai/v1/platform/areas"
payload = {
"name": "<string>",
"areaTypeId": 123,
"clubId": 123,
"description": "<string>",
"status": "active",
"visibility": "Public",
"pricePerHour": 1,
"operatingHours": {},
"maxConcurrentBookings": 1,
"isDefault": True,
"images": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
areaTypeId: 123,
clubId: 123,
description: '<string>',
status: 'active',
visibility: 'Public',
pricePerHour: 1,
operatingHours: {},
maxConcurrentBookings: 1,
isDefault: true,
images: ['<string>']
})
};
fetch('https://api.1club.ai/v1/platform/areas', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'areaTypeId' => 123,
'clubId' => 123,
'description' => '<string>',
'status' => 'active',
'visibility' => 'Public',
'pricePerHour' => 1,
'operatingHours' => [
],
'maxConcurrentBookings' => 1,
'isDefault' => true,
'images' => [
'<string>'
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"clubId\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"visibility\": \"Public\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 1,\n \"isDefault\": true,\n \"images\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.1club.ai/v1/platform/areas")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"clubId\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"visibility\": \"Public\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 1,\n \"isDefault\": true,\n \"images\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/areas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"clubId\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"visibility\": \"Public\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 1,\n \"isDefault\": true,\n \"images\": [\n \"<string>\"\n ]\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": {},
"isDefault": true,
"images": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Create an area
Adds a bookable area - a court, a studio, a lane - to one of the organization’s clubs. clubId comes from GET /v1/platform/clubs and areaTypeId from GET /v1/platform/area-types; both must belong to this organization. The area type is what decides which sports the area can be booked for and what it is priced from, so resolve it first rather than guessing.
The new area enters partner availability feeds immediately, with an availability_changes entry written in the same transaction - so a partner reconciling against the change cursor sees the court appear.
Created areas default to active and Public. An area created maintenance, inactive or non-public is returned here and resolves by id, but will not appear in GET /v1/platform/areas, which lists only what is bookable today. Supports the Idempotency-Key header.
Needs areas:write, the same scope that blocks and unblocks areas. Existing grants therefore gain this the moment it ships; an OAuth connection made before it will not, because a grant expands the wildcard at consent time - reconnect to pick it up.
curl --request POST \
--url https://api.1club.ai/v1/platform/areas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"areaTypeId": 123,
"clubId": 123,
"description": "<string>",
"status": "active",
"visibility": "Public",
"pricePerHour": 1,
"operatingHours": {},
"maxConcurrentBookings": 1,
"isDefault": true,
"images": [
"<string>"
]
}
'import requests
url = "https://api.1club.ai/v1/platform/areas"
payload = {
"name": "<string>",
"areaTypeId": 123,
"clubId": 123,
"description": "<string>",
"status": "active",
"visibility": "Public",
"pricePerHour": 1,
"operatingHours": {},
"maxConcurrentBookings": 1,
"isDefault": True,
"images": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
areaTypeId: 123,
clubId: 123,
description: '<string>',
status: 'active',
visibility: 'Public',
pricePerHour: 1,
operatingHours: {},
maxConcurrentBookings: 1,
isDefault: true,
images: ['<string>']
})
};
fetch('https://api.1club.ai/v1/platform/areas', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'areaTypeId' => 123,
'clubId' => 123,
'description' => '<string>',
'status' => 'active',
'visibility' => 'Public',
'pricePerHour' => 1,
'operatingHours' => [
],
'maxConcurrentBookings' => 1,
'isDefault' => true,
'images' => [
'<string>'
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"clubId\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"visibility\": \"Public\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 1,\n \"isDefault\": true,\n \"images\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.1club.ai/v1/platform/areas")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"clubId\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"visibility\": \"Public\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 1,\n \"isDefault\": true,\n \"images\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/areas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"areaTypeId\": 123,\n \"clubId\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"visibility\": \"Public\",\n \"pricePerHour\": 1,\n \"operatingHours\": {},\n \"maxConcurrentBookings\": 1,\n \"isDefault\": true,\n \"images\": [\n \"<string>\"\n ]\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": {},
"isDefault": true,
"images": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Headers
Body
Fields accepted when creating an area. The defaults shown are what an omitted field becomes. Unknown fields are rejected.
Response
Area created
An area - a court, a studio, a lane. One shape for the list, get-by-id, create and update.
Was this page helpful?