curl --request PATCH \
--url https://api.1club.ai/v1/platform/pay-rate-policies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"requirePaidBooking": false,
"instructorIds": [
123
],
"classTypeIds": [
123
],
"entranceScopes": [
{
"membershipPlanId": 123,
"externalProgramId": 123
}
]
}
'import requests
url = "https://api.1club.ai/v1/platform/pay-rate-policies/{id}"
payload = {
"name": "<string>",
"requirePaidBooking": False,
"instructorIds": [123],
"classTypeIds": [123],
"entranceScopes": [
{
"membershipPlanId": 123,
"externalProgramId": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
requirePaidBooking: false,
instructorIds: [123],
classTypeIds: [123],
entranceScopes: [{membershipPlanId: 123, externalProgramId: 123}]
})
};
fetch('https://api.1club.ai/v1/platform/pay-rate-policies/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'requirePaidBooking' => false,
'instructorIds' => [
123
],
'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/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"requirePaidBooking\": false,\n \"instructorIds\": [\n 123\n ],\n \"classTypeIds\": [\n 123\n ],\n \"entranceScopes\": [\n {\n \"membershipPlanId\": 123,\n \"externalProgramId\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.1club.ai/v1/platform/pay-rate-policies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"requirePaidBooking\": false,\n \"instructorIds\": [\n 123\n ],\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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"requirePaidBooking\": false,\n \"instructorIds\": [\n 123\n ],\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>"
}{
"error": "<string>"
}Update a pay rate policy
Edits a pay rate policy. Send only what changes; an omitted field is left alone. instructorIds, classTypeIds and entranceScopes each replace the whole list when sent - there is no element-wise merge for a set, so read the policy first and send the list you want.
earnings.kind cannot change once the policy exists: an individual policy and a class policy earn against different units of work, so switching one would silently re-price everything it covers. Create the other kind instead. Sending classTypeIds to an individual policy is refused for the same reason it is on create. Both are 400s.
A change that puts a coach on two overlapping policies is a 409 with code PAY_RATE_POLICY_COLLISION. Changing rates re-resolves the coach’s not-yet-finalized pay from today onward; days already closed stay frozen.
curl --request PATCH \
--url https://api.1club.ai/v1/platform/pay-rate-policies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"requirePaidBooking": false,
"instructorIds": [
123
],
"classTypeIds": [
123
],
"entranceScopes": [
{
"membershipPlanId": 123,
"externalProgramId": 123
}
]
}
'import requests
url = "https://api.1club.ai/v1/platform/pay-rate-policies/{id}"
payload = {
"name": "<string>",
"requirePaidBooking": False,
"instructorIds": [123],
"classTypeIds": [123],
"entranceScopes": [
{
"membershipPlanId": 123,
"externalProgramId": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
requirePaidBooking: false,
instructorIds: [123],
classTypeIds: [123],
entranceScopes: [{membershipPlanId: 123, externalProgramId: 123}]
})
};
fetch('https://api.1club.ai/v1/platform/pay-rate-policies/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'requirePaidBooking' => false,
'instructorIds' => [
123
],
'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/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"requirePaidBooking\": false,\n \"instructorIds\": [\n 123\n ],\n \"classTypeIds\": [\n 123\n ],\n \"entranceScopes\": [\n {\n \"membershipPlanId\": 123,\n \"externalProgramId\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.1club.ai/v1/platform/pay-rate-policies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"requirePaidBooking\": false,\n \"instructorIds\": [\n 123\n ],\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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"requirePaidBooking\": false,\n \"instructorIds\": [\n 123\n ],\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>"
}{
"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
Fields accepted when updating a pay rate policy. Send only what changes; an omitted field is left alone, and any list that IS sent replaces the whole set. earnings.kind must match the policy's existing kind.
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
When true, attendance that was never paid for earns the coach nothing.
Coaches this policy covers. An empty list makes it the organization default, applying to every coach with no policy of their own.
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
The updated pay rate policy
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?