curl --request GET \
--url https://api.1club.ai/v1/platform/booking-policies/effective \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/booking-policies/effective"
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/booking-policies/effective', 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/effective",
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/booking-policies/effective"
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/booking-policies/effective")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/booking-policies/effective")
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{
"policy": {
"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": {}
}Resolve the effective booking policy
The one policy that governs a booking, resolved exactly as booking, check-in and cancellation resolve it. Name the club and what is being booked: areaId for a court or room, instructorId for a session with a coach, classId for a class. A coach named with an area is judged as the coach’s booking. Add contactId to apply the policies whose audience that person is in; without it, a policy with an audience never applies. With nothing but clubId, only policies that govern every booking are candidates.
With eventId (and only clubId beside it), the answer is instead the event policy that decides what that event’s tickets refund.
policy is null when nothing applies: no cancellation rules then means free cancellation for a booking, while for an event ticket the organizer decides. Every id must belong to this organization, and an area or class must be at the club named.
curl --request GET \
--url https://api.1club.ai/v1/platform/booking-policies/effective \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/booking-policies/effective"
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/booking-policies/effective', 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/effective",
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/booking-policies/effective"
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/booking-policies/effective")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/booking-policies/effective")
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{
"policy": {
"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": {}
}Authorizations
Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.
Query Parameters
The club the booking is at
The area (court, room) being booked
The coach being booked
The class being booked into. Not combinable with areaId or instructorId.
The person booking, for policies with an audience. Also requires the contacts:read scope.
Resolve the cancellation policy for this event's tickets instead. Send with clubId only.
Response
The governing policy, or null when none applies
The policy that governs the booking described, or null when none applies.
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.
Show child attributes
Show child attributes
Was this page helpful?