curl --request PATCH \
--url https://api.1club.ai/v1/platform/bookings/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"areaId": 123,
"instructorId": 123,
"contactId": 123,
"notes": "<string>",
"amount": 123,
"notifyCustomer": true
}
'import requests
url = "https://api.1club.ai/v1/platform/bookings/{id}"
payload = {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"areaId": 123,
"instructorId": 123,
"contactId": 123,
"notes": "<string>",
"amount": 123,
"notifyCustomer": True
}
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({
startTime: '2023-11-07T05:31:56Z',
endTime: '2023-11-07T05:31:56Z',
areaId: 123,
instructorId: 123,
contactId: 123,
notes: '<string>',
amount: 123,
notifyCustomer: true
})
};
fetch('https://api.1club.ai/v1/platform/bookings/{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/bookings/{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([
'startTime' => '2023-11-07T05:31:56Z',
'endTime' => '2023-11-07T05:31:56Z',
'areaId' => 123,
'instructorId' => 123,
'contactId' => 123,
'notes' => '<string>',
'amount' => 123,
'notifyCustomer' => true
]),
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/bookings/{id}"
payload := strings.NewReader("{\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"areaId\": 123,\n \"instructorId\": 123,\n \"contactId\": 123,\n \"notes\": \"<string>\",\n \"amount\": 123,\n \"notifyCustomer\": true\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/bookings/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"areaId\": 123,\n \"instructorId\": 123,\n \"contactId\": 123,\n \"notes\": \"<string>\",\n \"amount\": 123,\n \"notifyCustomer\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/bookings/{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 \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"areaId\": 123,\n \"instructorId\": 123,\n \"contactId\": 123,\n \"notes\": \"<string>\",\n \"amount\": 123,\n \"notifyCustomer\": true\n}"
response = http.request(request)
puts response.read_body{
"bookingId": 123,
"bookingUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"areaId": 123,
"classId": 123,
"eventId": 123,
"instructorId": 123,
"contactId": 123,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"customer": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"payment": {
"status": "paid",
"amount": 123,
"paidAmount": 123,
"refundedAmount": 123,
"reference": "<string>",
"fee": 123
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Update a booking
Edits a booking by its 1club id: reschedule it, move it to another area, attach or remove an instructor, reassign the contact, change its notes or price, or make it recur. Send only the fields that change. Reaches the same bookings as cancel: an API key only those it created, a staff member through an authorized 1club assistant any of the organization’s.
The edit follows the admin portal’s rules. A cancelled booking is final, and a booking on a class takes its time and price from the class. As on create, the club’s member-facing policy (operating hours, instructor availability) is not applied, but an occupied or blocked court, or a coach who is already booked, is refused with details.conflicts[].
Money follows the edit. amount reprices the booking to your figure. Without it, a booking this API created keeps its price, and a booking taken through 1club is re-quoted when the slot, area, instructor or contact changes. The charge is then reconciled: an increase on a paid booking leaves the difference outstanding, and a decrease below what was paid needs a refund, which this endpoint does not perform. Payment status cannot be changed here.
Recurring bookings. recurrence on a one-off booking makes it the first occurrence of a series. On an occurrence of a series, scope=all_future applies the edit to every occurrence that has not started yet, from the earliest upcoming one: a new startTime/endTime gives each that time of day on its own date (the weekday changes only through recurrence.daysOfWeek), a new area or instructor is checked against every date, and a new recurrence rewrites the cadence or end condition; days dropped from a weekly pattern are cancelled with their refund. A series bound to a recurring class follows the class and cannot be re-timed, and a booking an API key created cannot be made to recur at all (RECURRENCE_NOT_AVAILABLE_TO_MANAGING_KEY): 1club would be generating occurrences that key never created, so each one is its own booking. An edit whose series has already run touches nothing.
curl --request PATCH \
--url https://api.1club.ai/v1/platform/bookings/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"areaId": 123,
"instructorId": 123,
"contactId": 123,
"notes": "<string>",
"amount": 123,
"notifyCustomer": true
}
'import requests
url = "https://api.1club.ai/v1/platform/bookings/{id}"
payload = {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"areaId": 123,
"instructorId": 123,
"contactId": 123,
"notes": "<string>",
"amount": 123,
"notifyCustomer": True
}
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({
startTime: '2023-11-07T05:31:56Z',
endTime: '2023-11-07T05:31:56Z',
areaId: 123,
instructorId: 123,
contactId: 123,
notes: '<string>',
amount: 123,
notifyCustomer: true
})
};
fetch('https://api.1club.ai/v1/platform/bookings/{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/bookings/{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([
'startTime' => '2023-11-07T05:31:56Z',
'endTime' => '2023-11-07T05:31:56Z',
'areaId' => 123,
'instructorId' => 123,
'contactId' => 123,
'notes' => '<string>',
'amount' => 123,
'notifyCustomer' => true
]),
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/bookings/{id}"
payload := strings.NewReader("{\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"areaId\": 123,\n \"instructorId\": 123,\n \"contactId\": 123,\n \"notes\": \"<string>\",\n \"amount\": 123,\n \"notifyCustomer\": true\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/bookings/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"areaId\": 123,\n \"instructorId\": 123,\n \"contactId\": 123,\n \"notes\": \"<string>\",\n \"amount\": 123,\n \"notifyCustomer\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/bookings/{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 \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"areaId\": 123,\n \"instructorId\": 123,\n \"contactId\": 123,\n \"notes\": \"<string>\",\n \"amount\": 123,\n \"notifyCustomer\": true\n}"
response = http.request(request)
puts response.read_body{
"bookingId": 123,
"bookingUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"areaId": 123,
"classId": 123,
"eventId": 123,
"instructorId": 123,
"contactId": 123,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"customer": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"payment": {
"status": "paid",
"amount": 123,
"paidAmount": 123,
"refundedAmount": 123,
"reference": "<string>",
"fee": 123
}
}{
"error": "<string>"
}{
"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.
Headers
Retry-safe key; a repeat of the same request replays the first response
255Path Parameters
1club booking id
Query Parameters
For an occurrence of a recurring booking, whether the edit applies to it alone or to every not-yet-started occurrence of the series (see the description)
this_instance, all_future Body
An edit to a booking. Every field is optional; send only what changes. A body with nothing but notifyCustomer is refused.
New start. With scope=all_future, every later occurrence takes this time of day on its own date; change the weekday with recurrence.daysOfWeek.
New end. Must be after the start, stored or sent.
Move the booking to this area (from GET /v1/platform/areas). Must be an area this API can sell, as on create.
Attach this instructor to the session (from GET /v1/platform/instructors), or null to take the instructor off it. Must be free at the time.
Reassign the booking to this contact (from GET /v1/platform/contacts). The outstanding charge, if any, moves with it.
2000The booking's new price, before tax, in the club's currency - your own figure, kept as sent. Omit it to keep the price you recorded on a booking this API created, or to have a booking taken through 1club re-quoted by the club's pricing engine when the slot, area, instructor or contact changes. Cannot be set on a booking a membership covers.
x <= 1000000Make a one-off booking recur, or (with scope=all_future) rewrite the cadence or end condition of an existing series. The series starts at the booking's own start time, so there is no start date here. daysOfWeek is required for a weekly pattern, and a day repeated in it counts once. Not accepted on a booking an API key created.
Show child attributes
Show child attributes
Tell the customer their booking changed - email with the updated calendar invite plus the in-app and WhatsApp notification. Only sent when the edit names a time, area, instructor or class. Off by default for an API key, on by default over an OAuth connection, as on create.
Response
The booking after the edit - for a series edit, the occurrence you named
A booking created through the platform API. Recorded with a booking transaction so it counts for revenue, marked paid (settled against a payment method named after the caller's API key, so the club can reconcile what each partner collected) or unpaid (outstanding) per the caller. Collection stays with the caller; what it collected and what it gave back on cancellation are reported in payment.
1club booking id
Stable unguessable identifier. Prefer this over bookingId when storing a reference.
Booking status (e.g. confirmed, cancelled)
Area id
The class occurrence this booking attends, when it is a class booking. Every attendee holds their own booking row against the same classId, and classes rows are per-occurrence - so this is what tells two classes running in the same hour apart. Join it against GET /v1/platform/classes, or read the roster with GET /v1/platform/classes/{id}/bookings.
The event this booking attends, when it is an event booking
Instructor leading the session, when one is attached
Contact the booking is for
The booking's customer, identical to what GET /v1/platform/contacts/{id} returns. Present only when the request passes include=customer, which additionally requires the contacts:read scope; null when the booking has no contact. Use it to import a window of bookings without a contact lookup per row.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?