curl --request POST \
--url https://api.1club.ai/v1/platform/pay-rate-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"earnings": {
"perSession": 1,
"sessionRevenuePercentage": 50,
"perClass": 1,
"perBooking": 1,
"classRevenuePercentage": 50
},
"instructorIds": [
123
],
"requirePaidBooking": false,
"classTypeIds": [
123
],
"entranceScopes": [
{
"membershipPlanId": 123,
"externalProgramId": 123
}
]
}
'import requests
url = "https://api.1club.ai/v1/platform/pay-rate-policies"
payload = {
"name": "<string>",
"earnings": {
"perSession": 1,
"sessionRevenuePercentage": 50,
"perClass": 1,
"perBooking": 1,
"classRevenuePercentage": 50
},
"instructorIds": [123],
"requirePaidBooking": False,
"classTypeIds": [123],
"entranceScopes": [
{
"membershipPlanId": 123,
"externalProgramId": 123
}
]
}
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({
name: '<string>',
earnings: {
perSession: 1,
sessionRevenuePercentage: 50,
perClass: 1,
perBooking: 1,
classRevenuePercentage: 50
},
instructorIds: [123],
requirePaidBooking: false,
classTypeIds: [123],
entranceScopes: [{membershipPlanId: 123, externalProgramId: 123}]
})
};
fetch('https://api.1club.ai/v1/platform/pay-rate-policies', 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/pay-rate-policies",
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([
'name' => '<string>',
'earnings' => [
'perSession' => 1,
'sessionRevenuePercentage' => 50,
'perClass' => 1,
'perBooking' => 1,
'classRevenuePercentage' => 50
],
'instructorIds' => [
123
],
'requirePaidBooking' => false,
'classTypeIds' => [
123
],
'entranceScopes' => [
[
'membershipPlanId' => 123,
'externalProgramId' => 123
]
]
]),
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/pay-rate-policies"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"earnings\": {\n \"perSession\": 1,\n \"sessionRevenuePercentage\": 50,\n \"perClass\": 1,\n \"perBooking\": 1,\n \"classRevenuePercentage\": 50\n },\n \"instructorIds\": [\n 123\n ],\n \"requirePaidBooking\": false,\n \"classTypeIds\": [\n 123\n ],\n \"entranceScopes\": [\n {\n \"membershipPlanId\": 123,\n \"externalProgramId\": 123\n }\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/pay-rate-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"earnings\": {\n \"perSession\": 1,\n \"sessionRevenuePercentage\": 50,\n \"perClass\": 1,\n \"perBooking\": 1,\n \"classRevenuePercentage\": 50\n },\n \"instructorIds\": [\n 123\n ],\n \"requirePaidBooking\": false,\n \"classTypeIds\": [\n 123\n ],\n \"entranceScopes\": [\n {\n \"membershipPlanId\": 123,\n \"externalProgramId\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/pay-rate-policies")
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 \"name\": \"<string>\",\n \"earnings\": {\n \"perSession\": 1,\n \"sessionRevenuePercentage\": 50,\n \"perClass\": 1,\n \"perBooking\": 1,\n \"classRevenuePercentage\": 50\n },\n \"instructorIds\": [\n 123\n ],\n \"requirePaidBooking\": false,\n \"classTypeIds\": [\n 123\n ],\n \"entranceScopes\": [\n {\n \"membershipPlanId\": 123,\n \"externalProgramId\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"policyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "individual",
"earnings": {
"kind": "individual",
"perSession": 1,
"sessionRevenuePercentage": 50,
"perClass": 1,
"perBooking": 1,
"classRevenuePercentage": 50
},
"requirePaidBooking": true,
"instructors": [
{
"id": 123,
"name": "<string>"
}
],
"classTypes": [
{
"id": 123,
"name": "<string>"
}
],
"entranceScopes": [
{
"entranceMethod": "direct_payment",
"membershipPlanId": 123,
"externalProgramId": 123
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Create a pay rate policy
Creates a rule for what the club pays its coaches. earnings.kind picks what the policy is about and which rates it accepts: individual for one-to-one sessions (perSession, sessionRevenuePercentage) and class for group classes (perClass, perBooking, classRevenuePercentage). At least one rate must be non-zero, and an individual policy cannot be scoped by class type.
instructorIds must be sent. An empty list makes this the organization’s default policy - it then applies to every coach who has no policy of their own, and creating it re-resolves every coach’s pay - so that has to be asked for, never fallen into by omitting the field. classTypeIds and entranceScopes may be omitted; empty covers every class type or every way in.
Two policies may not claim the same coach for overlapping work. That is a 409 with code PAY_RATE_POLICY_COLLISION, carrying the coaches involved and the policy each one is already on, so the caller can say which assignment to undo. Supports the Idempotency-Key header.
Needs instructors:write - the same scope that creates a coach, because both are “how this organization staffs and pays its sessions”. An OAuth connection made before that scope shipped has to be re-authorized.
curl --request POST \
--url https://api.1club.ai/v1/platform/pay-rate-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"earnings": {
"perSession": 1,
"sessionRevenuePercentage": 50,
"perClass": 1,
"perBooking": 1,
"classRevenuePercentage": 50
},
"instructorIds": [
123
],
"requirePaidBooking": false,
"classTypeIds": [
123
],
"entranceScopes": [
{
"membershipPlanId": 123,
"externalProgramId": 123
}
]
}
'import requests
url = "https://api.1club.ai/v1/platform/pay-rate-policies"
payload = {
"name": "<string>",
"earnings": {
"perSession": 1,
"sessionRevenuePercentage": 50,
"perClass": 1,
"perBooking": 1,
"classRevenuePercentage": 50
},
"instructorIds": [123],
"requirePaidBooking": False,
"classTypeIds": [123],
"entranceScopes": [
{
"membershipPlanId": 123,
"externalProgramId": 123
}
]
}
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({
name: '<string>',
earnings: {
perSession: 1,
sessionRevenuePercentage: 50,
perClass: 1,
perBooking: 1,
classRevenuePercentage: 50
},
instructorIds: [123],
requirePaidBooking: false,
classTypeIds: [123],
entranceScopes: [{membershipPlanId: 123, externalProgramId: 123}]
})
};
fetch('https://api.1club.ai/v1/platform/pay-rate-policies', 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/pay-rate-policies",
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([
'name' => '<string>',
'earnings' => [
'perSession' => 1,
'sessionRevenuePercentage' => 50,
'perClass' => 1,
'perBooking' => 1,
'classRevenuePercentage' => 50
],
'instructorIds' => [
123
],
'requirePaidBooking' => false,
'classTypeIds' => [
123
],
'entranceScopes' => [
[
'membershipPlanId' => 123,
'externalProgramId' => 123
]
]
]),
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/pay-rate-policies"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"earnings\": {\n \"perSession\": 1,\n \"sessionRevenuePercentage\": 50,\n \"perClass\": 1,\n \"perBooking\": 1,\n \"classRevenuePercentage\": 50\n },\n \"instructorIds\": [\n 123\n ],\n \"requirePaidBooking\": false,\n \"classTypeIds\": [\n 123\n ],\n \"entranceScopes\": [\n {\n \"membershipPlanId\": 123,\n \"externalProgramId\": 123\n }\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/pay-rate-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"earnings\": {\n \"perSession\": 1,\n \"sessionRevenuePercentage\": 50,\n \"perClass\": 1,\n \"perBooking\": 1,\n \"classRevenuePercentage\": 50\n },\n \"instructorIds\": [\n 123\n ],\n \"requirePaidBooking\": false,\n \"classTypeIds\": [\n 123\n ],\n \"entranceScopes\": [\n {\n \"membershipPlanId\": 123,\n \"externalProgramId\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/pay-rate-policies")
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 \"name\": \"<string>\",\n \"earnings\": {\n \"perSession\": 1,\n \"sessionRevenuePercentage\": 50,\n \"perClass\": 1,\n \"perBooking\": 1,\n \"classRevenuePercentage\": 50\n },\n \"instructorIds\": [\n 123\n ],\n \"requirePaidBooking\": false,\n \"classTypeIds\": [\n 123\n ],\n \"entranceScopes\": [\n {\n \"membershipPlanId\": 123,\n \"externalProgramId\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"policyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "individual",
"earnings": {
"kind": "individual",
"perSession": 1,
"sessionRevenuePercentage": 50,
"perClass": 1,
"perBooking": 1,
"classRevenuePercentage": 50
},
"requirePaidBooking": true,
"instructors": [
{
"id": 123,
"name": "<string>"
}
],
"classTypes": [
{
"id": 123,
"name": "<string>"
}
],
"entranceScopes": [
{
"entranceMethod": "direct_payment",
"membershipPlanId": 123,
"externalProgramId": 123
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"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
255Body
Fields accepted when creating a pay rate policy. instructorIds must be present: an empty list is the organization default and applies to every coach without a policy of their own, so it has to be asked for rather than fallen into. The other coverage lists mean "everything" when omitted.
255What the coach earns, and for what unit of work. kind decides which of the rate fields apply and which are rejected: an individual policy takes perSession and sessionRevenuePercentage, a class policy takes perClass, perBooking and classRevenuePercentage. At least one of the applicable rates must be greater than zero, and kind cannot be changed once the policy exists.
Show child attributes
Show child attributes
Coaches this policy covers. An empty list makes it the organization default, applying to every coach with no policy of their own.
When true, attendance that was never paid for earns the coach nothing.
Class types it covers, from GET /v1/platform/class-types. Empty covers every class type. Rejected on an individual policy, which has no classes to scope.
How the attendee got in. Empty covers every route in.
Show child attributes
Show child attributes
Response
Pay rate policy created
A rule for what the club pays a coach. Not an instructor's hourlyRate, which is what a member pays for an hour of their time. Each coverage list means "everything" when empty: no instructors makes it the organization default, no classTypes covers every class type, no entranceScopes covers every way in.
individual, class What the coach earns, and for what unit of work. kind decides which of the rate fields apply and which are rejected: an individual policy takes perSession and sessionRevenuePercentage, a class policy takes perClass, perBooking and classRevenuePercentage. At least one of the applicable rates must be greater than zero, and kind cannot be changed once the policy exists.
Show child attributes
Show child attributes
Coaches this policy covers. Empty means every coach with no policy of their own.
Show child attributes
Show child attributes
Class types it covers. Empty means every class type.
Show child attributes
Show child attributes
How the attendee got in. Empty means every route in.
Show child attributes
Show child attributes
Was this page helpful?