curl --request POST \
--url https://api.1club.ai/v1/platform/booking-policies/{id}/duplicate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/booking-policies/{id}/duplicate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.1club.ai/v1/platform/booking-policies/{id}/duplicate', 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/booking-policies/{id}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/booking-policies/{id}/duplicate"
req, _ := http.NewRequest("POST", 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.post("https://api.1club.ai/v1/platform/booking-policies/{id}/duplicate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/booking-policies/{id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"policyId": 123,
"name": "<string>",
"kind": "booking",
"clubIds": [
123
],
"validFor": {
"scopes": [
"classes"
],
"classTypes": [
123
],
"areaTypes": [
123
],
"instructorTypes": [
123
]
},
"eventIds": [
123
],
"audience": {
"memberTypes": [
"contact"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
],
"pipelineStageIds": [
123
],
"sourceIds": [
123
]
},
"cancellationRules": [
{
"hoursInAdvance": 4380,
"refundPercentage": 50,
"description": "<string>"
}
],
"forcePayment": "none",
"chargeAdvanceDays": 182,
"minBookingSlotMinutes": 1,
"maxBookingSlotMinutes": 1,
"bookingDurationStepMinutes": 30,
"maxBookInAdvanceDays": 1,
"minBookingNoticeHours": 1,
"waiveNoticeWhenBooked": true,
"checkInRequired": true,
"autoCheckIn": true,
"allowAnonymousBookings": true,
"allowGuestBookings": true,
"allowWalkInCheckins": true,
"allowAnonymousCheckins": true,
"allowedProductCategoryIds": [
123
],
"waitlistClaimWindowMinutes": 1,
"upsellAvailablePlans": true,
"upsellPlanIds": [
123
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"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": {}
}Duplicate a booking policy
curl --request POST \
--url https://api.1club.ai/v1/platform/booking-policies/{id}/duplicate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/booking-policies/{id}/duplicate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.1club.ai/v1/platform/booking-policies/{id}/duplicate', 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/booking-policies/{id}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/booking-policies/{id}/duplicate"
req, _ := http.NewRequest("POST", 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.post("https://api.1club.ai/v1/platform/booking-policies/{id}/duplicate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/booking-policies/{id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"policyId": 123,
"name": "<string>",
"kind": "booking",
"clubIds": [
123
],
"validFor": {
"scopes": [
"classes"
],
"classTypes": [
123
],
"areaTypes": [
123
],
"instructorTypes": [
123
]
},
"eventIds": [
123
],
"audience": {
"memberTypes": [
"contact"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
],
"pipelineStageIds": [
123
],
"sourceIds": [
123
]
},
"cancellationRules": [
{
"hoursInAdvance": 4380,
"refundPercentage": 50,
"description": "<string>"
}
],
"forcePayment": "none",
"chargeAdvanceDays": 182,
"minBookingSlotMinutes": 1,
"maxBookingSlotMinutes": 1,
"bookingDurationStepMinutes": 30,
"maxBookInAdvanceDays": 1,
"minBookingNoticeHours": 1,
"waiveNoticeWhenBooked": true,
"checkInRequired": true,
"autoCheckIn": true,
"allowAnonymousBookings": true,
"allowGuestBookings": true,
"allowWalkInCheckins": true,
"allowAnonymousCheckins": true,
"allowedProductCategoryIds": [
123
],
"waitlistClaimWindowMinutes": 1,
"upsellAvailablePlans": true,
"upsellPlanIds": [
123
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"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.
Headers
Retry-safe key; a repeat of the same request replays the first response
255Path Parameters
1club booking policy id
Response
The copy
The rules a booking is held to: cancellation terms, payment timing, booking window, slot grid and check-in rules. Scoped on WHAT it governs (validFor) and WHO (audience), narrowed to clubIds; when several apply, the most specific wins. An event policy instead decides what event tickets refund.
Internal name, shown to staff in the admin portal.
1 - 255booking (the default) governs bookings of courts, coaches and classes. event decides only what event tickets refund on cancellation, and takes no validFor or audience.
booking, event Clubs the policy applies at. Empty means every club. Required on create.
500What the policy governs. {} means every booking. Always {} on an event policy.
Show child attributes
Show child attributes
Event policies only: the events it covers. Empty means every event.
500Who the policy governs. null means everyone. Always null on an event policy.
Show child attributes
Show child attributes
The refund ladder. The first band whose notice the member met decides the refund; meeting none refunds nothing. hoursInAdvance must be distinct and refunds may not grow as the booking approaches. Empty is free cancellation at any time; every band at 0% is non-refundable (canonically one band, 0 hours at 0%).
20Show child attributes
Show child attributes
at_booking sends members to an online card checkout before the booking is confirmed, and needs an online card payment provider at the policy clubs. at_checkin takes payment on arrival.
none, at_booking, at_checkin Days before each occurrence of a recurring booking that its charge is written. null uses the platform default of 3. Not used while payment is taken at booking.
0 <= x <= 365Shortest booking allowed. A whole number of steps, and at most maxBookingSlotMinutes.
x >= 0Longest booking allowed.
x >= 0The step a booking length grows by.
30, 60, null How many days ahead members may book. null is no limit.
x >= 0How late before the start members may still book. null is no limit.
x >= 0Lift minBookingNoticeHours for a class someone has already booked, since it is confirmed to run.
A booking not checked in by the end of the day is marked a no-show.
Check the booking in automatically when it starts.
Staff may book without naming a contact.
Logged-out visitors may book without an account or password, giving their details at checkout.
Staff may check in a contact who has no booking.
Staff may check in a visitor with no contact record.
Product categories offered with the booking confirmation. Empty offers none.
500Minutes the first person on a waitlist has to claim a place that opens shortly before a class. null uses the default of 15.
x >= 0Offer plans at booking.
The plans offered at booking.
500Was this page helpful?