Update a rotation assignment
curl --request PATCH \
--url https://api.1club.ai/v1/platform/shift-rotation-assignments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rotationId": 123,
"cycleOffset": 123,
"effectiveFrom": "2023-12-25",
"effectiveTo": "2023-12-25"
}
'import requests
url = "https://api.1club.ai/v1/platform/shift-rotation-assignments/{id}"
payload = {
"rotationId": 123,
"cycleOffset": 123,
"effectiveFrom": "2023-12-25",
"effectiveTo": "2023-12-25"
}
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({
rotationId: 123,
cycleOffset: 123,
effectiveFrom: '2023-12-25',
effectiveTo: '2023-12-25'
})
};
fetch('https://api.1club.ai/v1/platform/shift-rotation-assignments/{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/shift-rotation-assignments/{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([
'rotationId' => 123,
'cycleOffset' => 123,
'effectiveFrom' => '2023-12-25',
'effectiveTo' => '2023-12-25'
]),
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/shift-rotation-assignments/{id}"
payload := strings.NewReader("{\n \"rotationId\": 123,\n \"cycleOffset\": 123,\n \"effectiveFrom\": \"2023-12-25\",\n \"effectiveTo\": \"2023-12-25\"\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/shift-rotation-assignments/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rotationId\": 123,\n \"cycleOffset\": 123,\n \"effectiveFrom\": \"2023-12-25\",\n \"effectiveTo\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/shift-rotation-assignments/{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 \"rotationId\": 123,\n \"cycleOffset\": 123,\n \"effectiveFrom\": \"2023-12-25\",\n \"effectiveTo\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"assignment": {
"id": 123,
"instructorId": 123,
"instructorName": "<string>",
"rotationId": 123,
"rotationName": "<string>",
"cycleOffset": 123,
"effectiveFrom": "2023-12-25",
"effectiveTo": "2023-12-25",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"generated": {
"created": 123,
"updated": 123,
"skipped": 123
}
}{
"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": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Staff Roster
Update a rotation assignment
Moves the coach to another rotation, shifts where in the cycle they start, or changes the dates, then regenerates their staff roster. Shifts edited by hand are left as they are.
PATCH
/
v1
/
platform
/
shift-rotation-assignments
/
{id}
Update a rotation assignment
curl --request PATCH \
--url https://api.1club.ai/v1/platform/shift-rotation-assignments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rotationId": 123,
"cycleOffset": 123,
"effectiveFrom": "2023-12-25",
"effectiveTo": "2023-12-25"
}
'import requests
url = "https://api.1club.ai/v1/platform/shift-rotation-assignments/{id}"
payload = {
"rotationId": 123,
"cycleOffset": 123,
"effectiveFrom": "2023-12-25",
"effectiveTo": "2023-12-25"
}
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({
rotationId: 123,
cycleOffset: 123,
effectiveFrom: '2023-12-25',
effectiveTo: '2023-12-25'
})
};
fetch('https://api.1club.ai/v1/platform/shift-rotation-assignments/{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/shift-rotation-assignments/{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([
'rotationId' => 123,
'cycleOffset' => 123,
'effectiveFrom' => '2023-12-25',
'effectiveTo' => '2023-12-25'
]),
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/shift-rotation-assignments/{id}"
payload := strings.NewReader("{\n \"rotationId\": 123,\n \"cycleOffset\": 123,\n \"effectiveFrom\": \"2023-12-25\",\n \"effectiveTo\": \"2023-12-25\"\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/shift-rotation-assignments/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rotationId\": 123,\n \"cycleOffset\": 123,\n \"effectiveFrom\": \"2023-12-25\",\n \"effectiveTo\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/shift-rotation-assignments/{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 \"rotationId\": 123,\n \"cycleOffset\": 123,\n \"effectiveFrom\": \"2023-12-25\",\n \"effectiveTo\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"assignment": {
"id": 123,
"instructorId": 123,
"instructorName": "<string>",
"rotationId": 123,
"rotationName": "<string>",
"cycleOffset": 123,
"effectiveFrom": "2023-12-25",
"effectiveTo": "2023-12-25",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"generated": {
"created": 123,
"updated": 123,
"skipped": 123
}
}{
"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": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.
Path Parameters
Body
application/json
Was this page helpful?