curl --request POST \
--url https://api.1club.ai/v1/platform/bookings/{id}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>",
"notifyCustomer": true,
"keepCancellationCharge": true,
"refund": {
"amount": 123,
"reference": "<string>"
}
}
'import requests
url = "https://api.1club.ai/v1/platform/bookings/{id}/cancel"
payload = {
"reason": "<string>",
"notifyCustomer": True,
"keepCancellationCharge": True,
"refund": {
"amount": 123,
"reference": "<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({
reason: '<string>',
notifyCustomer: true,
keepCancellationCharge: true,
refund: {amount: 123, reference: '<string>'}
})
};
fetch('https://api.1club.ai/v1/platform/bookings/{id}/cancel', 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}/cancel",
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([
'reason' => '<string>',
'notifyCustomer' => true,
'keepCancellationCharge' => true,
'refund' => [
'amount' => 123,
'reference' => '<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/bookings/{id}/cancel"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"notifyCustomer\": true,\n \"keepCancellationCharge\": true,\n \"refund\": {\n \"amount\": 123,\n \"reference\": \"<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/bookings/{id}/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"notifyCustomer\": true,\n \"keepCancellationCharge\": true,\n \"refund\": {\n \"amount\": 123,\n \"reference\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/bookings/{id}/cancel")
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 \"reason\": \"<string>\",\n \"notifyCustomer\": true,\n \"keepCancellationCharge\": true,\n \"refund\": {\n \"amount\": 123,\n \"reference\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"bookingId": 123,
"status": "cancelled",
"refundedAmount": 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": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Cancel a booking
Cancels the booking by its 1club id. Idempotent: cancelling an already-cancelled booking succeeds.
Which bookings are cancellable depends on the credential. An API key may cancel only the bookings it created (source: api); anything else is reported as not found. A staff member acting through an authorized 1club assistant may cancel any of the organization’s bookings, as they can in the admin portal.
Refunds follow the money. On a booking this API created, 1club never held the payment, so it moves none - but it records what you gave back, so the club’s revenue matches yours. Cancelling with an API key records a refund of everything collected unless refund.amount says otherwise: send the amount you actually returned to keep a cancellation fee, or 0 if you kept it all, and your own refund id as refund.reference. Over a staff credential nothing is recorded unless refund is sent. On a booking taken through 1club (member portal, app, front desk), the club is the one cancelling: an unpaid booking owes nothing unless keepCancellationCharge is true. A paid booking the cancellation policy would keep money from needs an explicit keepCancellationCharge - false refunds it in full, true applies the policy - and without one the call is refused (409 CANCELLATION_CHARGE_DECISION_REQUIRED), exactly as the admin portal asks. refund is ignored there.
A booking that has already been checked in cannot be cancelled (409) - voiding a check-in is an admin-portal action. One occurrence of a recurring booking is cancelled, not the series.
curl --request POST \
--url https://api.1club.ai/v1/platform/bookings/{id}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>",
"notifyCustomer": true,
"keepCancellationCharge": true,
"refund": {
"amount": 123,
"reference": "<string>"
}
}
'import requests
url = "https://api.1club.ai/v1/platform/bookings/{id}/cancel"
payload = {
"reason": "<string>",
"notifyCustomer": True,
"keepCancellationCharge": True,
"refund": {
"amount": 123,
"reference": "<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({
reason: '<string>',
notifyCustomer: true,
keepCancellationCharge: true,
refund: {amount: 123, reference: '<string>'}
})
};
fetch('https://api.1club.ai/v1/platform/bookings/{id}/cancel', 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}/cancel",
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([
'reason' => '<string>',
'notifyCustomer' => true,
'keepCancellationCharge' => true,
'refund' => [
'amount' => 123,
'reference' => '<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/bookings/{id}/cancel"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"notifyCustomer\": true,\n \"keepCancellationCharge\": true,\n \"refund\": {\n \"amount\": 123,\n \"reference\": \"<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/bookings/{id}/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"notifyCustomer\": true,\n \"keepCancellationCharge\": true,\n \"refund\": {\n \"amount\": 123,\n \"reference\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/bookings/{id}/cancel")
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 \"reason\": \"<string>\",\n \"notifyCustomer\": true,\n \"keepCancellationCharge\": true,\n \"refund\": {\n \"amount\": 123,\n \"reference\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"bookingId": 123,
"status": "cancelled",
"refundedAmount": 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": {}
}{
"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
1club booking id (returned by create)
Body
Why the booking is cancelled, recorded on the cancellation and shown to staff wherever the booking's cancellation is (and returned by include=cancellation). Defaults to a note naming the API as the channel.
500Tell the customer their booking was cancelled - email plus the in-app and WhatsApp notification. Defaults to off for a booking this API created, since callers normally send their own notice, and to on for a booking taken through 1club, whose customer expects to hear it from the club. The club's own staff alerts are sent either way.
On a booking taken through 1club: true applies the club's cancellation policy, so a late cancellation keeps its charge; false refunds what was paid in full and forgives the rest. Left out, an unpaid booking owes nothing, and a paid one the policy would keep money from is refused with 409 CANCELLATION_CHARGE_DECISION_REQUIRED. Ignored on a booking this API created.
What you returned to the customer, on a booking you collected the money for. Omit it to record a full refund of what was collected (API key) or nothing (staff credential).
Show child attributes
Show child attributes
Was this page helpful?