Lessons
Learning · 17 операцій
/api/lessonGETCount lessons by teacher, subject, reason or weekday/api/lesson/breakdownGETGet lesson calendar/api/lesson/calendarGETGet lesson/api/lesson/{id}GETGet lessons of a student/api/lesson/student/{id}GETGet lessons of a lead/api/lesson/lead/{id}GETGet lessons of a group/api/lesson/group/{id}GETGet teacher schedule/api/lesson/teacher-schedule/{id}GETPreview cancellation charge/api/lesson/{id}/cancellation-chargePOSTSchedule lesson/api/lessonPOSTMark lesson as conducted/api/lesson/conduct/{id}POSTPreview bulk cancellation/api/lesson/bulk-cancel/previewPOSTCancel lessons in a period/api/lesson/bulk-cancelPOSTCalculate lesson prices/api/lesson/calculate-pricesPATCHUpdate lesson/api/lesson/{id}PATCHCancel lesson/api/lesson/canceled/{id}PATCHRoll back conducted lesson/api/lesson/rollback/{id}List lessons
/api/lessonLessons with filters: date range (dateStart/dateEnd in school local time), status, students, groups, teachers, subjects, lesson types, cancellation reasons, presence (with studentIds: whether those students came), trial lessons (isTrial), lessons booked for leads (leadIds or hasLead). Paginated; "total" is the full count.
list_lessons
Параметри запиту · 24
pageмін. 1 · за замовчуванням 1pageSize1–250 · за замовчуванням 20sortByОдне з: statusOfLesson typeOfLesson subject teacher dateTimeStartsortOrderОдне з: ASC DESCstatusOfLessonОдне з: COMPLETED SCHEDULED CANCELEDdateStartRange start as a school-local calendar day, not UTC.dateEnd—studentIds—Показати ще 16
groupIds—teacherId—teacherIds—typeOfLessonId—audienceIds—subjectIds—managerIds—period—periodFilterОдне з: day week monthpresenceWith studentIds, presence of those students; alone, of any student. Implies conducted lessons.typeOfLessonIds—reasonForCancellationIds—isTrialtrue: only trial lessons; false: everything but trial.leadIdsLessons booked for these sales leads.hasLeadOnly lessons booked for some sales lead, e.g. trial lessons of prospects.cf—Відповідь · 200
application/json
statusCodeприклад 200message—data4 поля
total—totalPages—currentPage—lessons12 полів
lessonId—statusOfLessonОдне з: COMPLETED SCHEDULED CANCELEDtypeOfLesson6 полів
typeOfLessonId—nameOfType—basicTypeOfLessonОдне з: INDIVIDUAL GROUP TRIALcolor—icon—isArchival—dateTimeStartформат YYYY-MM-DDTHH:mm:ssdateTimeEndформат YYYY-MM-DDTHH:mm:sssubject3 поля
subjectId—nameOfSubject—isArchival—teacher4 поля
teacherId—firstName—lastName—isArchival—students5 полів
lessonStudentId—presence—charge3 поля
lessonStudentSubscriptionId—price—isGift—isSuccessfulTrial—student3 поля
studentId—firstName—lastName—groups2 поля
lessonGroupId—group3 поля
groupId—nameOfGroup—isArchival—reasonForCancellation4 поля
reasonForCancellationId—nameOfReason—responsibilityОдне з: STUDENT TEACHER SCHOOL FORCE_MAJEUREisArchival—cancellationNote—customFieldsCustom field values; the table shows the columns chosen in the preset.довільні ключіcurl "https://your-school.rist.pro/api/lesson" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/lesson", {
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://your-school.rist.pro/api/lesson",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"lessons": [
{
"lessonId": 1,
"statusOfLesson": "COMPLETED",
"typeOfLesson": {
"typeOfLessonId": 1,
"nameOfType": "string",
"basicTypeOfLesson": "INDIVIDUAL",
"color": "string",
"icon": "string",
"isArchival": false
},
"dateTimeStart": "2026-11-09T14:30:00",
"dateTimeEnd": "2026-11-09T14:30:00",
"subject": {
"subjectId": 1,
"nameOfSubject": "string",
"isArchival": false
},
"teacher": {
"teacherId": 1,
"firstName": "string",
"lastName": "string",
"isArchival": false
},
"students": [
{
"lessonStudentId": 1,
"presence": false,
"charge": {
"lessonStudentSubscriptionId": 1,
"price": 0,
"isGift": false
},
"isSuccessfulTrial": false,
"student": {
"studentId": 1,
"firstName": "string",
"lastName": "string"
}
}
],
"groups": [
{
"lessonGroupId": 1,
"group": {
"groupId": 1,
"nameOfGroup": "string",
"isArchival": false
}
}
],
"reasonForCancellation": {
"reasonForCancellationId": 1,
"nameOfReason": "string",
"responsibility": "STUDENT",
"isArchival": false
},
"cancellationNote": "string",
"customFields": {}
}
]
}
}Count lessons by teacher, subject, reason or weekday
/api/lesson/breakdownHow many lessons match the GET /api/lesson filters, per status, teacher, subject, lesson type, cancellation reason, weekday (1 Monday to 7), start hour, student or group (groupBy). countBy=students counts distinct students instead. Missed lessons per student: groupBy=student, presence=false. One call instead of paging through GET /api/lesson.
count_lessons
Параметри запиту · 22
cf—statusOfLessonОдне з: COMPLETED SCHEDULED CANCELEDdateStartRange start as a school-local calendar day, not UTC.dateEnd—studentIds—groupIds—teacherId—teacherIds—Показати ще 14
typeOfLessonId—audienceIds—subjectIds—managerIds—period—periodFilterОдне з: day week monthpresenceWith studentIds, presence of those students; alone, of any student. Implies conducted lessons.typeOfLessonIds—reasonForCancellationIds—isTrialtrue: only trial lessons; false: everything but trial.leadIdsLessons booked for these sales leads.hasLeadOnly lessons booked for some sales lead, e.g. trial lessons of prospects.groupByWhat to count by; weekday is 1 (Monday) to 7, hour is the school-local start hour.Одне з: status teacher subject typeOfLesson reasonForCancellation weekday hour student groupcountBystudents counts distinct students instead of lessons, e.g. how many study each subject.Одне з: lessons studentsза замовчуванням lessonsВідповідь · 200
application/json
statusCodeприклад 200message—data3 поля
omittedRowsRows left out by the limittotalRecords matching the filters; a record counted in several rows (a student with two teachers) counts here once.rows3 поля
idId of the grouped value (teacher id, stage id, weekday 1-7) or its code (lesson status); null means "no value".name—count—curl "https://your-school.rist.pro/api/lesson/breakdown?groupBy=status" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/lesson/breakdown?groupBy=status", {
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://your-school.rist.pro/api/lesson/breakdown",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
params={
"groupBy": "status"
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": {
"omittedRows": 0,
"total": 0,
"rows": [
{
"id": 1,
"name": "string",
"count": 0
}
]
}
}Get lesson calendar
/api/lesson/calendarLessons for a calendar day, week or month around a date (view + date), with per-day counts.
get_lesson_calendar
Параметри запиту · 27
pageмін. 1 · за замовчуванням 1pageSize1–250 · за замовчуванням 20sortByОдне з: statusOfLesson typeOfLesson subject teacher dateTimeStartsortOrderОдне з: ASC DESCstatusOfLessonОдне з: COMPLETED SCHEDULED CANCELEDdateStartRange start as a school-local calendar day, not UTC.dateEnd—studentIds—Показати ще 19
groupIds—teacherId—teacherIds—typeOfLessonId—audienceIds—subjectIds—managerIds—period—periodFilterОдне з: day week monthpresenceWith studentIds, presence of those students; alone, of any student. Implies conducted lessons.typeOfLessonIds—reasonForCancellationIds—isTrialtrue: only trial lessons; false: everything but trial.leadIdsLessons booked for these sales leads.hasLeadOnly lessons booked for some sales lead, e.g. trial lessons of prospects.cf—viewОдне з: day week monthdateSchool-local calendar day the view is built around, not a UTC moment.maxEventsPerDay0–10Відповідь · 200
application/json
curl "https://your-school.rist.pro/api/lesson/calendar?view=day&date=string" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/lesson/calendar?view=day&date=string", {
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://your-school.rist.pro/api/lesson/calendar",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
params={
"view": "day",
"date": "string"
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": {}
}Get lesson
/api/lesson/{id}One lesson with students, attendance, teacher, prices and status; conductedAt and conductedByUser are the first conduct, kept through re-conduct and rollback.
get_lesson
Параметри шляху · 1
id—Відповідь · 200
application/json
curl "https://your-school.rist.pro/api/lesson/1" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/lesson/1", {
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://your-school.rist.pro/api/lesson/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": {}
}Get lessons of a student
/api/lesson/student/{id}Lessons of one student, with payment status of each lesson when the role may see it.
get_student_lessons
Параметри шляху · 1
id—Параметри запиту · 8
typeOfLessonId—subjectId—period—dateStartFirst school-local day of the range (YYYY-MM-DD), inclusive. With dateEnd it overrides period.dateEndLast school-local day of the range (YYYY-MM-DD), inclusive.lessonCostОдне з: FREE TRIAL_FREE GIFTbasicTypeOfLessonОдне з: INDIVIDUAL GROUP TRIALstudentSubscriptionIdStudent subscription to filter the attendance widget lessons by.Відповідь · 200
application/json
curl "https://your-school.rist.pro/api/lesson/student/1?typeOfLessonId=1&subjectId=1&period=0" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/lesson/student/1?typeOfLessonId=1&subjectId=1&period=0", {
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://your-school.rist.pro/api/lesson/student/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
params={
"typeOfLessonId": 1,
"subjectId": 1,
"period": 0
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": …
}Get lessons of a lead
/api/lesson/lead/{id}Lessons booked for one lead, trial lessons included. Optional dateStart/dateEnd (YYYY-MM-DD, school days).
get_lead_lessons
Параметри шляху · 1
id—Параметри запиту · 8
typeOfLessonId—subjectId—period—dateStartFirst school-local day of the range (YYYY-MM-DD), inclusive. With dateEnd it overrides period.dateEndLast school-local day of the range (YYYY-MM-DD), inclusive.lessonCostОдне з: FREE TRIAL_FREE GIFTbasicTypeOfLessonОдне з: INDIVIDUAL GROUP TRIALstudentSubscriptionIdStudent subscription to filter the attendance widget lessons by.Відповідь · 200
application/json
curl "https://your-school.rist.pro/api/lesson/lead/1?typeOfLessonId=1&subjectId=1&period=0" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/lesson/lead/1?typeOfLessonId=1&subjectId=1&period=0", {
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://your-school.rist.pro/api/lesson/lead/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
params={
"typeOfLessonId": 1,
"subjectId": 1,
"period": 0
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": …
}Get lessons of a group
/api/lesson/group/{id}Lessons of one study group. Optional dateStart/dateEnd (YYYY-MM-DD, school days).
get_group_lessons
Параметри шляху · 1
id—Параметри запиту · 8
typeOfLessonId—subjectId—period—dateStartFirst school-local day of the range (YYYY-MM-DD), inclusive. With dateEnd it overrides period.dateEndLast school-local day of the range (YYYY-MM-DD), inclusive.lessonCostОдне з: FREE TRIAL_FREE GIFTbasicTypeOfLessonОдне з: INDIVIDUAL GROUP TRIALstudentSubscriptionIdStudent subscription to filter the attendance widget lessons by.Відповідь · 200
application/json
curl "https://your-school.rist.pro/api/lesson/group/1?typeOfLessonId=1&subjectId=1&period=0" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/lesson/group/1?typeOfLessonId=1&subjectId=1&period=0", {
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://your-school.rist.pro/api/lesson/group/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
params={
"typeOfLessonId": 1,
"subjectId": 1,
"period": 0
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": …
}Get teacher schedule
/api/lesson/teacher-schedule/{id}Lessons of one teacher in chronological order, filtered like GET /api/lesson (dateStart/dateEnd in school local time, status, students, groups, subjects). Accrued wage (lessonTeacherWages) and bonuses (lessonTeacherBonuses) are present only when the role may see teacher wages or bonuses; a missing list means no access, an empty list means nothing accrued.
get_teacher_schedule
Параметри шляху · 1
id—Параметри запиту · 24
pageмін. 1 · за замовчуванням 1pageSize1–250 · за замовчуванням 20sortByОдне з: statusOfLesson typeOfLesson subject teacher dateTimeStartsortOrderОдне з: ASC DESCstatusOfLessonОдне з: COMPLETED SCHEDULED CANCELEDdateStartRange start as a school-local calendar day, not UTC.dateEnd—studentIds—Показати ще 16
groupIds—teacherId—teacherIds—typeOfLessonId—audienceIds—subjectIds—managerIds—period—periodFilterОдне з: day week monthpresenceWith studentIds, presence of those students; alone, of any student. Implies conducted lessons.typeOfLessonIds—reasonForCancellationIds—isTrialtrue: only trial lessons; false: everything but trial.leadIdsLessons booked for these sales leads.hasLeadOnly lessons booked for some sales lead, e.g. trial lessons of prospects.cf—Відповідь · 200
application/json
curl "https://your-school.rist.pro/api/lesson/teacher-schedule/1" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/lesson/teacher-schedule/1", {
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://your-school.rist.pro/api/lesson/teacher-schedule/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": …
}Preview cancellation charge
/api/lesson/{id}/cancellation-chargeHow much each student would be charged if the lesson were cancelled with the given reasonForCancellationId. Read-only; call before PATCH /api/lesson/canceled/{id} to show the user the amount.
get_cancellation_charge
Параметри шляху · 1
id—Параметри запиту · 1
reasonForCancellationId—Відповідь · 200
application/json
statusCodeприклад 200message—data2 поля
total—students2 поля
studentId—priceCharged from the student's balance for this cancellation.curl "https://your-school.rist.pro/api/lesson/1/cancellation-charge?reasonForCancellationId=1" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/lesson/1/cancellation-charge?reasonForCancellationId=1", {
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://your-school.rist.pro/api/lesson/1/cancellation-charge",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
params={
"reasonForCancellationId": 1
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": {
"total": 0,
"students": [
{
"studentId": 1,
"price": 0
}
]
}
}Schedule lesson
/api/lessonSchedule a lesson (or a series). Times are school local time. Check GET /api/lesson/calendar for conflicts first. Charges happen only when the lesson is conducted.
create_lesson
Тіло запиту
application/json · object
groupIdsмін. 1 · елементів мін. 1teacherIdмін. 1audienceIdмін. 1typeOfLessonIdмін. 1subjectIdмін. 1teachingProgramIdмін. 1dateTimeStart—dateTimeEnd—topicдовжина макс. 300homeworkдовжина макс. 500noteдовжина макс. 1500recordingUrlдовжина макс. 500students9 полів
studentIdмін. 1leadIdмін. 1price—presence—isGift—isSuccessfulTrial—markIdмін. 1reasonOfMissingIdмін. 1noteдовжина макс. 1500customFieldsдовільні ключіВідповідь · 201
application/json
curl -X POST "https://your-school.rist.pro/api/lesson" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"groupIds": [
1
],
"teacherId": 1,
"audienceId": 1,
"typeOfLessonId": 1,
"subjectId": 1,
"teachingProgramId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string",
"topic": "string",
"homework": "string",
"note": "string",
"recordingUrl": "string",
"students": [
{
"studentId": 1,
"leadId": 1,
"price": 0,
"presence": false,
"isGift": false,
"isSuccessfulTrial": false,
"markId": 1,
"reasonOfMissingId": 1,
"note": "string"
}
],
"customFields": {}
}'const response = await fetch("https://your-school.rist.pro/api/lesson", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"groupIds": [
1
],
"teacherId": 1,
"audienceId": 1,
"typeOfLessonId": 1,
"subjectId": 1,
"teachingProgramId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string",
"topic": "string",
"homework": "string",
"note": "string",
"recordingUrl": "string",
"students": [
{
"studentId": 1,
"leadId": 1,
"price": 0,
"presence": false,
"isGift": false,
"isSuccessfulTrial": false,
"markId": 1,
"reasonOfMissingId": 1,
"note": "string"
}
],
"customFields": {}
}),
});
const { data } = await response.json();import os
import requests
response = requests.post(
"https://your-school.rist.pro/api/lesson",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"groupIds": [
1
],
"teacherId": 1,
"audienceId": 1,
"typeOfLessonId": 1,
"subjectId": 1,
"teachingProgramId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string",
"topic": "string",
"homework": "string",
"note": "string",
"recordingUrl": "string",
"students": [
{
"studentId": 1,
"leadId": 1,
"price": 0,
"presence": False,
"isGift": False,
"isSuccessfulTrial": False,
"markId": 1,
"reasonOfMissingId": 1,
"note": "string"
}
],
"customFields": {}
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 201,
"message": "Operation completed successfully",
"data": {}
}Mark lesson as conducted
/api/lesson/conduct/{id}Mark a lesson as conducted with attendance. This charges students from their subscriptions and accrues teacher wage and bonuses. Confirm with the user first.
conduct_lesson
Параметри шляху · 1
id—Тіло запиту
application/json · object
groupIdsмін. 1 · елементів мін. 1teacherIdмін. 1audienceIdмін. 1typeOfLessonIdмін. 1subjectIdмін. 1teachingProgramIdмін. 1dateTimeStart—dateTimeEnd—topicдовжина макс. 300homeworkдовжина макс. 500noteдовжина макс. 1500recordingUrlдовжина макс. 500students9 полів
studentIdмін. 1leadIdмін. 1price—presence—isGift—isSuccessfulTrial—markIdмін. 1reasonOfMissingIdмін. 1noteдовжина макс. 1500customFieldsдовільні ключіВідповідь · 201
application/json
curl -X POST "https://your-school.rist.pro/api/lesson/conduct/1" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"groupIds": [
1
],
"teacherId": 1,
"audienceId": 1,
"typeOfLessonId": 1,
"subjectId": 1,
"teachingProgramId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string",
"topic": "string",
"homework": "string",
"note": "string",
"recordingUrl": "string",
"students": [
{
"studentId": 1,
"leadId": 1,
"price": 0,
"presence": false,
"isGift": false,
"isSuccessfulTrial": false,
"markId": 1,
"reasonOfMissingId": 1,
"note": "string"
}
],
"customFields": {}
}'const response = await fetch("https://your-school.rist.pro/api/lesson/conduct/1", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"groupIds": [
1
],
"teacherId": 1,
"audienceId": 1,
"typeOfLessonId": 1,
"subjectId": 1,
"teachingProgramId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string",
"topic": "string",
"homework": "string",
"note": "string",
"recordingUrl": "string",
"students": [
{
"studentId": 1,
"leadId": 1,
"price": 0,
"presence": false,
"isGift": false,
"isSuccessfulTrial": false,
"markId": 1,
"reasonOfMissingId": 1,
"note": "string"
}
],
"customFields": {}
}),
});
const { data } = await response.json();import os
import requests
response = requests.post(
"https://your-school.rist.pro/api/lesson/conduct/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"groupIds": [
1
],
"teacherId": 1,
"audienceId": 1,
"typeOfLessonId": 1,
"subjectId": 1,
"teachingProgramId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string",
"topic": "string",
"homework": "string",
"note": "string",
"recordingUrl": "string",
"students": [
{
"studentId": 1,
"leadId": 1,
"price": 0,
"presence": False,
"isGift": False,
"isSuccessfulTrial": False,
"markId": 1,
"reasonOfMissingId": 1,
"note": "string"
}
],
"customFields": {}
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 201,
"message": "Operation completed successfully",
"data": {}
}Preview bulk cancellation
/api/lesson/bulk-cancel/previewRead-only preview of POST /api/lesson/bulk-cancel with the same body: how many lessons would be cancelled, the total charge, the charge per student, and (for a student) how many of their group lessons stay untouched. Changes nothing.
preview_bulk_cancel
Тіло запиту
application/json · object
studentIdмін. 1groupIdмін. 1dateStart—dateEnd—reasonForCancellationIdмін. 1Відповідь · 201
application/json
statusCodeприклад 201message—data4 поля
count—total—untouchedGroupLessonsScheduled group lessons of the student in the period; bulk cancel from the student card skips them. 0 for a group.students6 полів
studentId—firstName—lastName—middleName—lessonsLessons of this student that the cancellation takes.totalCharged from this student for them.curl -X POST "https://your-school.rist.pro/api/lesson/bulk-cancel/preview" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"studentId": 1,
"groupId": 1,
"dateStart": "string",
"dateEnd": "string",
"reasonForCancellationId": 1
}'const response = await fetch("https://your-school.rist.pro/api/lesson/bulk-cancel/preview", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"studentId": 1,
"groupId": 1,
"dateStart": "string",
"dateEnd": "string",
"reasonForCancellationId": 1
}),
});
const { data } = await response.json();import os
import requests
response = requests.post(
"https://your-school.rist.pro/api/lesson/bulk-cancel/preview",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"studentId": 1,
"groupId": 1,
"dateStart": "string",
"dateEnd": "string",
"reasonForCancellationId": 1
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 201,
"message": "Operation completed successfully",
"data": {
"count": 0,
"total": 0,
"untouchedGroupLessons": 0,
"students": [
{
"studentId": 1,
"firstName": "string",
"lastName": "string",
"middleName": "string",
"lessons": 0,
"total": 0
}
]
}
}Cancel lessons in a period
/api/lesson/bulk-cancelCancel scheduled lessons between dateStart and dateEnd with one cancellation reason: for a student only their individual and trial lessons (group lessons are cancelled per group), for a group all its lessons. Each student of a lesson may be charged per the reason. Run POST /api/lesson/bulk-cancel/preview and confirm with the user first.
bulk_cancel_lessons
Тіло запиту
application/json · object
studentIdмін. 1groupIdмін. 1dateStart—dateEnd—reasonForCancellationIdмін. 1Відповідь · 201
application/json
curl -X POST "https://your-school.rist.pro/api/lesson/bulk-cancel" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"studentId": 1,
"groupId": 1,
"dateStart": "string",
"dateEnd": "string",
"reasonForCancellationId": 1
}'const response = await fetch("https://your-school.rist.pro/api/lesson/bulk-cancel", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"studentId": 1,
"groupId": 1,
"dateStart": "string",
"dateEnd": "string",
"reasonForCancellationId": 1
}),
});
const { data } = await response.json();import os
import requests
response = requests.post(
"https://your-school.rist.pro/api/lesson/bulk-cancel",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"studentId": 1,
"groupId": 1,
"dateStart": "string",
"dateEnd": "string",
"reasonForCancellationId": 1
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 201,
"message": "Operation completed successfully",
"data": {
"count": 0
}
}Calculate lesson prices
/api/lesson/calculate-pricesRead-only: price per student for a would-be lesson (studentIds, subjectId, typeOfLessonId, start and end in school local time). Needs permission to see lesson prices. Changes nothing.
calculate_lesson_prices
Тіло запиту
application/json · object
studentIdsмін. 1subjectIdмін. 1typeOfLessonIdмін. 1dateTimeStart—dateTimeEnd—Відповідь · 201
application/json
statusCodeприклад 201message—data1 поле
prices9 полів
studentId—priceForLesson—durationOfLesson—constantPrice—discountAmount—typeOfDiscountОдне з: NUMERICAL PERCENTAGE MONETARYnumberOfLesson—subscriptionPrice—isGiftConducting now would use a gift lesson from the subscription quota.curl -X POST "https://your-school.rist.pro/api/lesson/calculate-prices" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"studentIds": [
1
],
"subjectId": 1,
"typeOfLessonId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string"
}'const response = await fetch("https://your-school.rist.pro/api/lesson/calculate-prices", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"studentIds": [
1
],
"subjectId": 1,
"typeOfLessonId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string"
}),
});
const { data } = await response.json();import os
import requests
response = requests.post(
"https://your-school.rist.pro/api/lesson/calculate-prices",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"studentIds": [
1
],
"subjectId": 1,
"typeOfLessonId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string"
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 201,
"message": "Operation completed successfully",
"data": {
"prices": [
{
"studentId": 1,
"priceForLesson": 0,
"durationOfLesson": 0,
"constantPrice": 0,
"discountAmount": 0,
"typeOfDiscount": "NUMERICAL",
"numberOfLesson": 0,
"subscriptionPrice": 0,
"isGift": false
}
]
}
}Update lesson
/api/lesson/{id}Change time, teacher, students or other fields of a lesson. Send only the fields to change.
update_lesson
Параметри шляху · 1
id—Тіло запиту
application/json · object
groupIdsмін. 1 · елементів мін. 1teacherIdмін. 1audienceIdмін. 1typeOfLessonIdмін. 1subjectIdмін. 1teachingProgramIdмін. 1dateTimeStart—dateTimeEnd—topicдовжина макс. 300homeworkдовжина макс. 500noteдовжина макс. 1500recordingUrlдовжина макс. 500students9 полів
studentIdмін. 1leadIdмін. 1price—presence—isGift—isSuccessfulTrial—markIdмін. 1reasonOfMissingIdмін. 1noteдовжина макс. 1500customFieldsдовільні ключіВідповідь · 200
application/json
curl -X PATCH "https://your-school.rist.pro/api/lesson/1" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"groupIds": [
1
],
"teacherId": 1,
"audienceId": 1,
"typeOfLessonId": 1,
"subjectId": 1,
"teachingProgramId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string",
"topic": "string",
"homework": "string",
"note": "string",
"recordingUrl": "string",
"students": [
{
"studentId": 1,
"leadId": 1,
"price": 0,
"presence": false,
"isGift": false,
"isSuccessfulTrial": false,
"markId": 1,
"reasonOfMissingId": 1,
"note": "string"
}
],
"customFields": {}
}'const response = await fetch("https://your-school.rist.pro/api/lesson/1", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"groupIds": [
1
],
"teacherId": 1,
"audienceId": 1,
"typeOfLessonId": 1,
"subjectId": 1,
"teachingProgramId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string",
"topic": "string",
"homework": "string",
"note": "string",
"recordingUrl": "string",
"students": [
{
"studentId": 1,
"leadId": 1,
"price": 0,
"presence": false,
"isGift": false,
"isSuccessfulTrial": false,
"markId": 1,
"reasonOfMissingId": 1,
"note": "string"
}
],
"customFields": {}
}),
});
const { data } = await response.json();import os
import requests
response = requests.patch(
"https://your-school.rist.pro/api/lesson/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"groupIds": [
1
],
"teacherId": 1,
"audienceId": 1,
"typeOfLessonId": 1,
"subjectId": 1,
"teachingProgramId": 1,
"dateTimeStart": "string",
"dateTimeEnd": "string",
"topic": "string",
"homework": "string",
"note": "string",
"recordingUrl": "string",
"students": [
{
"studentId": 1,
"leadId": 1,
"price": 0,
"presence": False,
"isGift": False,
"isSuccessfulTrial": False,
"markId": 1,
"reasonOfMissingId": 1,
"note": "string"
}
],
"customFields": {}
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": {}
}Cancel lesson
/api/lesson/canceled/{id}Cancel a lesson with a cancellation reason and note. Depending on the reason, students may still be charged. Confirm with the user first.
cancel_lesson
Параметри шляху · 1
id—Тіло запиту
application/json · object
reasonForCancellationIdмін. 1cancellationNoteдовжина макс. 500Відповідь · 200
application/json
curl -X PATCH "https://your-school.rist.pro/api/lesson/canceled/1" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reasonForCancellationId": 1,
"cancellationNote": "string"
}'const response = await fetch("https://your-school.rist.pro/api/lesson/canceled/1", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"reasonForCancellationId": 1,
"cancellationNote": "string"
}),
});
const { data } = await response.json();import os
import requests
response = requests.patch(
"https://your-school.rist.pro/api/lesson/canceled/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"reasonForCancellationId": 1,
"cancellationNote": "string"
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": {}
}Roll back conducted lesson
/api/lesson/rollback/{id}Return a conducted lesson to scheduled: refunds student charges and cashback, reverts teacher wage and bonuses. Confirm with the user first.
rollback_lesson
Параметри шляху · 1
id—Відповідь · 200
application/json
curl -X PATCH "https://your-school.rist.pro/api/lesson/rollback/1" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/lesson/rollback/1", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.patch(
"https://your-school.rist.pro/api/lesson/rollback/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": {}
}