curl -X POST https://api.chessplay.io/api/v1/batches/1/add-student/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"student_id": 123}'
import requests
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
response = requests.post(
"https://api.chessplay.io/api/v1/batches/1/add-student/",
headers=headers,
json={"student_id": 123}
)
{
"message": "Student added successfully",
"student": {
"id": 123,
"username": "FastMalamute",
"name": "John Doe"
}
}
{
"error": "Student is already in this batch"
}
Batches
Add Student to Batch
Add a student to a batch
POST
/
api
/
v1
/
batches
/
{id}
/
add-student
/
curl -X POST https://api.chessplay.io/api/v1/batches/1/add-student/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"student_id": 123}'
import requests
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
response = requests.post(
"https://api.chessplay.io/api/v1/batches/1/add-student/",
headers=headers,
json={"student_id": 123}
)
{
"message": "Student added successfully",
"student": {
"id": 123,
"username": "FastMalamute",
"name": "John Doe"
}
}
{
"error": "Student is already in this batch"
}
Path Parameters
integer
required
Batch ID
Body Parameters
integer
required
Student ID to add
curl -X POST https://api.chessplay.io/api/v1/batches/1/add-student/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"student_id": 123}'
import requests
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
response = requests.post(
"https://api.chessplay.io/api/v1/batches/1/add-student/",
headers=headers,
json={"student_id": 123}
)
{
"message": "Student added successfully",
"student": {
"id": 123,
"username": "FastMalamute",
"name": "John Doe"
}
}
{
"error": "Student is already in this batch"
}
Was this page helpful?
⌘I

