curl --request POST \
--url https://api.1club.ai/v1/platform/pay-rate-policies/{id}/instructors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instructorIds": [
123
]
}
'import requests
url = "https://api.1club.ai/v1/platform/pay-rate-policies/{id}/instructors"
payload = { "instructorIds": [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({instructorIds: [123]})
};
fetch('https://api.1club.ai/v1/platform/pay-rate-policies/{id}/instructors', 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/{id}/instructors",
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([
'instructorIds' => [
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/{id}/instructors"
payload := strings.NewReader("{\n \"instructorIds\": [\n 123\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/{id}/instructors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instructorIds\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/pay-rate-policies/{id}/instructors")
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 \"instructorIds\": [\n 123\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>"
}{
"error": "<string>"
}Put instructors on a pay rate policy
Adds coaches to a policy, leaving the ones already on it alone - the additive counterpart of PATCH, which replaces the whole list. Adding a coach who is already covered by another policy for the same work is a 409 with code PAY_RATE_POLICY_COLLISION.
Note that adding the first coach to a policy that named none narrows it: an empty list means “every coach without a policy of their own”, so it stops being the organization’s default.
curl --request POST \
--url https://api.1club.ai/v1/platform/pay-rate-policies/{id}/instructors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instructorIds": [
123
]
}
'import requests
url = "https://api.1club.ai/v1/platform/pay-rate-policies/{id}/instructors"
payload = { "instructorIds": [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({instructorIds: [123]})
};
fetch('https://api.1club.ai/v1/platform/pay-rate-policies/{id}/instructors', 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/{id}/instructors",
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([
'instructorIds' => [
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/{id}/instructors"
payload := strings.NewReader("{\n \"instructorIds\": [\n 123\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/{id}/instructors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instructorIds\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/pay-rate-policies/{id}/instructors")
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 \"instructorIds\": [\n 123\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>"
}{
"error": "<string>"
}Authorizations
Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.
Path Parameters
Pay rate policy id
Body
Instructors to add. Already-assigned ones are left as they are.
1Response
The policy, with its instructors as they now stand
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?