curl --request PATCH \
--url https://api.1club.ai/v1/platform/classes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clubId": 123,
"areaId": 123,
"classTypeId": 123,
"instructorIds": [
123
],
"name": "<string>",
"description": "<string>",
"priceBeforeTax": 1,
"isFree": true,
"maxCapacity": 2,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"sport": "<string>",
"color": "<string>",
"notifyCustomer": false
}
'import requests
url = "https://api.1club.ai/v1/platform/classes/{id}"
payload = {
"clubId": 123,
"areaId": 123,
"classTypeId": 123,
"instructorIds": [123],
"name": "<string>",
"description": "<string>",
"priceBeforeTax": 1,
"isFree": True,
"maxCapacity": 2,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"sport": "<string>",
"color": "<string>",
"notifyCustomer": False
}
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({
clubId: 123,
areaId: 123,
classTypeId: 123,
instructorIds: [123],
name: '<string>',
description: '<string>',
priceBeforeTax: 1,
isFree: true,
maxCapacity: 2,
startTime: '2023-11-07T05:31:56Z',
endTime: '2023-11-07T05:31:56Z',
sport: '<string>',
color: '<string>',
notifyCustomer: false
})
};
fetch('https://api.1club.ai/v1/platform/classes/{id}', 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}",
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([
'clubId' => 123,
'areaId' => 123,
'classTypeId' => 123,
'instructorIds' => [
123
],
'name' => '<string>',
'description' => '<string>',
'priceBeforeTax' => 1,
'isFree' => true,
'maxCapacity' => 2,
'startTime' => '2023-11-07T05:31:56Z',
'endTime' => '2023-11-07T05:31:56Z',
'sport' => '<string>',
'color' => '<string>',
'notifyCustomer' => false
]),
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/classes/{id}"
payload := strings.NewReader("{\n \"clubId\": 123,\n \"areaId\": 123,\n \"classTypeId\": 123,\n \"instructorIds\": [\n 123\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priceBeforeTax\": 1,\n \"isFree\": true,\n \"maxCapacity\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"sport\": \"<string>\",\n \"color\": \"<string>\",\n \"notifyCustomer\": false\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/classes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clubId\": 123,\n \"areaId\": 123,\n \"classTypeId\": 123,\n \"instructorIds\": [\n 123\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priceBeforeTax\": 1,\n \"isFree\": true,\n \"maxCapacity\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"sport\": \"<string>\",\n \"color\": \"<string>\",\n \"notifyCustomer\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/classes/{id}")
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 \"clubId\": 123,\n \"areaId\": 123,\n \"classTypeId\": 123,\n \"instructorIds\": [\n 123\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priceBeforeTax\": 1,\n \"isFree\": true,\n \"maxCapacity\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"sport\": \"<string>\",\n \"color\": \"<string>\",\n \"notifyCustomer\": false\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"images": [
"<string>"
],
"classTypeId": 123,
"classType": {
"id": 123,
"name": "<string>",
"slug": "<string>",
"maxPartySize": 123
},
"clubId": 123,
"club": {
"id": 123,
"name": "<string>",
"slug": "<string>"
},
"areaId": 123,
"area": {
"id": 123,
"name": "<string>"
},
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"durationMinutes": 123,
"isMultiDay": true,
"status": "active",
"visibility": "Public",
"sport": "<string>",
"color": "<string>",
"price": 123,
"priceBeforeTax": 123,
"isFree": true,
"maxCapacity": 123,
"maxPartySize": 123,
"bookedCount": 123,
"currentBookings": 123,
"spotsLeft": 123,
"waitlistCount": 123,
"allowWaitlist": true,
"timeStatus": "past",
"availabilityStatus": "available",
"recurrenceId": 123,
"occurrenceIndex": 123,
"recurrence": {
"id": 123,
"frequency": "daily",
"interval": 123,
"daysOfWeek": [
"<string>"
],
"endsType": "until",
"endsDate": "2023-11-07T05:31:56Z",
"endsTotalOccurrences": 123,
"status": "active"
},
"instructors": [
{
"id": 123,
"contactId": 123,
"sports": [
"<string>"
],
"typeId": 123,
"type": {
"id": 123,
"name": "<string>"
},
"experience": "<string>",
"hourlyRate": 123,
"bio": {},
"certifications": [
"<string>"
],
"isActive": true,
"isBookable": true,
"contact": {
"name": "<string>",
"profileImage": "<string>"
}
}
],
"externalSource": "<string>",
"externalId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"translations": {},
"series": {
"recurrenceId": 123,
"occurrencesCreated": 123,
"occurrencesRemoved": 123
}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Update a class
Updates one occurrence, or this and all future occurrences when scope=all_future. A recurring class defaults to this_instance, so a series-wide edit must ask for it explicitly.
With scope=all_future, recurrence moves where the series ends - ends plus endDate, the same fields a create takes. Send it on its own: a body that also carries class fields is refused, so an end change never half-applies. Only the end: a frequency, interval or daysOfWeek is refused, and to change a cadence you delete the remaining series and create it again. A later end writes the new occurrences; an earlier one removes the occurrences past it, and is refused with 409 when any of those has an active booking or waitlist entry (cancel them first) - nothing a member holds is cancelled as a side effect. The occurrence named must be one the series keeps, and the end cannot fall before a session that has already run.
The response to an end change carries series.occurrencesCreated and series.occurrencesRemoved. As on a create, an occurrence at a club that is closed is skipped rather than failing the request, so compare the count with what you expected.
curl --request PATCH \
--url https://api.1club.ai/v1/platform/classes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clubId": 123,
"areaId": 123,
"classTypeId": 123,
"instructorIds": [
123
],
"name": "<string>",
"description": "<string>",
"priceBeforeTax": 1,
"isFree": true,
"maxCapacity": 2,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"sport": "<string>",
"color": "<string>",
"notifyCustomer": false
}
'import requests
url = "https://api.1club.ai/v1/platform/classes/{id}"
payload = {
"clubId": 123,
"areaId": 123,
"classTypeId": 123,
"instructorIds": [123],
"name": "<string>",
"description": "<string>",
"priceBeforeTax": 1,
"isFree": True,
"maxCapacity": 2,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"sport": "<string>",
"color": "<string>",
"notifyCustomer": False
}
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({
clubId: 123,
areaId: 123,
classTypeId: 123,
instructorIds: [123],
name: '<string>',
description: '<string>',
priceBeforeTax: 1,
isFree: true,
maxCapacity: 2,
startTime: '2023-11-07T05:31:56Z',
endTime: '2023-11-07T05:31:56Z',
sport: '<string>',
color: '<string>',
notifyCustomer: false
})
};
fetch('https://api.1club.ai/v1/platform/classes/{id}', 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}",
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([
'clubId' => 123,
'areaId' => 123,
'classTypeId' => 123,
'instructorIds' => [
123
],
'name' => '<string>',
'description' => '<string>',
'priceBeforeTax' => 1,
'isFree' => true,
'maxCapacity' => 2,
'startTime' => '2023-11-07T05:31:56Z',
'endTime' => '2023-11-07T05:31:56Z',
'sport' => '<string>',
'color' => '<string>',
'notifyCustomer' => false
]),
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/classes/{id}"
payload := strings.NewReader("{\n \"clubId\": 123,\n \"areaId\": 123,\n \"classTypeId\": 123,\n \"instructorIds\": [\n 123\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priceBeforeTax\": 1,\n \"isFree\": true,\n \"maxCapacity\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"sport\": \"<string>\",\n \"color\": \"<string>\",\n \"notifyCustomer\": false\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/classes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clubId\": 123,\n \"areaId\": 123,\n \"classTypeId\": 123,\n \"instructorIds\": [\n 123\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priceBeforeTax\": 1,\n \"isFree\": true,\n \"maxCapacity\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"sport\": \"<string>\",\n \"color\": \"<string>\",\n \"notifyCustomer\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/classes/{id}")
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 \"clubId\": 123,\n \"areaId\": 123,\n \"classTypeId\": 123,\n \"instructorIds\": [\n 123\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priceBeforeTax\": 1,\n \"isFree\": true,\n \"maxCapacity\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"sport\": \"<string>\",\n \"color\": \"<string>\",\n \"notifyCustomer\": false\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"images": [
"<string>"
],
"classTypeId": 123,
"classType": {
"id": 123,
"name": "<string>",
"slug": "<string>",
"maxPartySize": 123
},
"clubId": 123,
"club": {
"id": 123,
"name": "<string>",
"slug": "<string>"
},
"areaId": 123,
"area": {
"id": 123,
"name": "<string>"
},
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"durationMinutes": 123,
"isMultiDay": true,
"status": "active",
"visibility": "Public",
"sport": "<string>",
"color": "<string>",
"price": 123,
"priceBeforeTax": 123,
"isFree": true,
"maxCapacity": 123,
"maxPartySize": 123,
"bookedCount": 123,
"currentBookings": 123,
"spotsLeft": 123,
"waitlistCount": 123,
"allowWaitlist": true,
"timeStatus": "past",
"availabilityStatus": "available",
"recurrenceId": 123,
"occurrenceIndex": 123,
"recurrence": {
"id": 123,
"frequency": "daily",
"interval": 123,
"daysOfWeek": [
"<string>"
],
"endsType": "until",
"endsDate": "2023-11-07T05:31:56Z",
"endsTotalOccurrences": 123,
"status": "active"
},
"instructors": [
{
"id": 123,
"contactId": 123,
"sports": [
"<string>"
],
"typeId": 123,
"type": {
"id": 123,
"name": "<string>"
},
"experience": "<string>",
"hourlyRate": 123,
"bio": {},
"certifications": [
"<string>"
],
"isActive": true,
"isBookable": true,
"contact": {
"name": "<string>",
"profileImage": "<string>"
}
}
],
"externalSource": "<string>",
"externalId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"translations": {},
"series": {
"recurrenceId": 123,
"occurrencesCreated": 123,
"occurrencesRemoved": 123
}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.
Path Parameters
Query Parameters
Whether the update applies to this occurrence only or to this and every later one in the series
this_instance, all_future Body
201005000The price to store, excluding tax - the same field reads return. The tax-inclusive price a class reads back with is computed and cannot be written: sending it is a 400, because posting it back would re-apply tax on every round trip.
x >= 0x >= 1ISO 8601 instant with an explicit offset.
ISO 8601 instant with an explicit offset.
Private, Member_only, Public 60^#[0-9a-fA-F]{6}$Moves where the series this occurrence belongs to ends; needs scope=all_future, and is sent on its own - a body that also carries class fields is rejected. Only the end - a cadence field is rejected. An earlier end removes the occurrences past it and is refused with 409 while any of them has an active booking or waitlist entry.
Show child attributes
Show child attributes
Tell the people booked on this class what changed - email plus the in-app and WhatsApp notification. Only sent when the edit changes something visible on their booking (start/end time, area, club, or the instructors); a rename or a price change notifies nobody. Off by default, so callers normally send their own. Assigned instructors get their calendar update either way.
Response
Class updated
One class occurrence. A weekly class materializes a row per session, linked by recurrenceId and occurrenceIndex, so id is what a booking's classId points at - and what distinguishes two groups running in the same hour. Read the roster with GET /v1/platform/classes/{id}/bookings.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Room or court the class occupies, when one is assigned.
Show child attributes
Show child attributes
A cancelled occurrence keeps its bookings and roster.
active, cancelled Public, Member_only, Private Price including the organization's default tax - what a member is charged.
The price as stored on the class, before tax.
Seats; null when uncapped.
Largest party one booking may bring, from the class type.
Seats taken: attendee bookings plus standalone walk-in check-ins.
Legacy alias of bookedCount.
maxCapacity - bookedCount, floored at 0; null when capacity is unlimited.
Entries waiting (pending or notified).
past, upcoming available, full The series this occurrence belongs to; null for a one-off class.
Position within the series, as materialized.
The series rule, when this occurrence belongs to one.
Show child attributes
Show child attributes
Who teaches the occurrence. The instructor's own weekly availability is not included; read it from GET /v1/platform/instructors.
Show child attributes
Show child attributes
Import provenance - set when the occurrence came from an external system rather than being created in 1club.
The source system's id for this occurrence, for reconciliation against it.
Every locale's copy, keyed by language code (e.g. 'es', 'fr'). Returned alongside the locale-resolved name/description, so an integration syncing a multilingual timetable can read all of them in one call.
Present only on the response to a recurring create or to an update that moved where the series ends, never on a read: it describes what that one request did. An occurrence at a club that is closed, or past its closing date, is skipped rather than failing the request, so comparing occurrencesCreated with what you asked for is the only way a partially-skipped season is visible.
Show child attributes
Show child attributes
Was this page helpful?