curl --request GET \
--url https://api.1club.ai/v1/platform/classes/{id}/spots \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/classes/{id}/spots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.1club.ai/v1/platform/classes/{id}/spots', 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/classes/{id}/spots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/classes/{id}/spots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.1club.ai/v1/platform/classes/{id}/spots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/classes/{id}/spots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"usesSpots": true,
"spotName": "<string>",
"spots": [
{
"id": 123,
"label": "<string>",
"row": 123,
"column": 123,
"state": "free",
"holder": {
"bookingId": 123,
"status": "confirmed",
"contactId": 123,
"contactName": "<string>",
"bookerName": "<string>"
}
}
],
"suggestedSpotIds": [
123
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Get a class's room
For a class in a room with numbered spots (a reformer studio, a cycling room), returns every spot with whether it is free, taken or out_of_service, the booking that holds each taken one and the person it is for, and the spots to book for count places - the front-most free ones, side by side where a row has room, which is what an automatic assignment would give. Use it before POST /v1/platform/classes/{id}/bookings (spotIds) or PATCH /v1/platform/bookings/{id} (spotId) to pick a free spot.
The member’s picker reads the same states from the public API (GET /v1/public/classes/{id}/spots), without who holds a spot; staff and the API see the holder. A taken spot is one a confirmed, pending (a checkout hold) or checked_in booking holds: a cancelled or no-show booking keeps its spot only as history and holds nothing. A guest’s seat has no contact: its bookerName says who bought it.
A class that does not use spots (its class type does not pick them, it has no room, or its room has no spot in service) answers usesSpots: false and no spots, not an error.
Requires bookings:read: the holders are who is on the class’s roster, which GET /v1/platform/classes//bookings shows with the same scope. It carries no email; read a contact for that.
curl --request GET \
--url https://api.1club.ai/v1/platform/classes/{id}/spots \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/classes/{id}/spots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.1club.ai/v1/platform/classes/{id}/spots', 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/classes/{id}/spots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/classes/{id}/spots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.1club.ai/v1/platform/classes/{id}/spots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/classes/{id}/spots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"usesSpots": true,
"spotName": "<string>",
"spots": [
{
"id": 123,
"label": "<string>",
"row": 123,
"column": 123,
"state": "free",
"holder": {
"bookingId": 123,
"status": "confirmed",
"contactId": 123,
"contactName": "<string>",
"bookerName": "<string>"
}
}
],
"suggestedSpotIds": [
123
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Query Parameters
Response
The class's room
A class occurrence's room: its spots and who holds them, and the spots to book for the places asked for.
Was this page helpful?