LearningLessons

Lessons

Learning · 17 операцій

GET

List lessons

/api/lesson

Lessons 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

pagenumberмін. 1 · за замовчуванням 1
pageSizenumber1–250 · за замовчуванням 20
sortBystringОдне з: statusOfLesson typeOfLesson subject teacher dateTimeStart
sortOrderstringОдне з: ASC DESC
statusOfLessonstringОдне з: COMPLETED SCHEDULED CANCELED
dateStartstringRange start as a school-local calendar day, not UTC.
dateEndstring—
studentIdsnumber[]—
Показати ще 16
groupIdsnumber[]—
teacherIdnumber—
teacherIdsnumber[]—
typeOfLessonIdnumber—
audienceIdsnumber[]—
subjectIdsnumber[]—
managerIdsnumber[]—
periodnumber—
periodFilterstringОдне з: day week month
presencebooleanWith studentIds, presence of those students; alone, of any student. Implies conducted lessons.
typeOfLessonIdsnumber[]—
reasonForCancellationIdsnumber[]—
isTrialbooleantrue: only trial lessons; false: everything but trial.
leadIdsnumber[]Lessons booked for these sales leads.
hasLeadbooleanOnly lessons booked for some sales lead, e.g. trial lessons of prospects.
cfstring[]—

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject4 поля
totalnumberобовʼязковий—
totalPagesnumberобовʼязковий—
currentPagenumberобовʼязковий—
lessonsobject[]обовʼязковий12 полів
lessonIdnumberобовʼязковий—
statusOfLessonstringобовʼязковийОдне з: COMPLETED SCHEDULED CANCELED
typeOfLessonobjectобовʼязковий6 полів
typeOfLessonIdnumberобовʼязковий—
nameOfTypestringобовʼязковий—
basicTypeOfLessonstringобовʼязковийОдне з: INDIVIDUAL GROUP TRIAL
colorstringобовʼязковийможе бути null—
iconstringобовʼязковий—
isArchivalbooleanобовʼязковий—
dateTimeStartstringформат YYYY-MM-DDTHH:mm:ss
dateTimeEndstringформат YYYY-MM-DDTHH:mm:ss
subjectobject3 поля
subjectIdnumberобовʼязковий—
nameOfSubjectstringобовʼязковий—
isArchivalbooleanобовʼязковий—
teacherobjectможе бути null4 поля
teacherIdnumberобовʼязковий—
firstNamestringобовʼязковий—
lastNamestringобовʼязковийможе бути null—
isArchivalbooleanобовʼязковий—
studentsobject[]5 полів
lessonStudentIdnumberобовʼязковий—
presenceboolean—
chargeobjectможе бути null3 поля
lessonStudentSubscriptionIdnumberобовʼязковий—
pricenumber—
isGiftboolean—
isSuccessfulTrialboolean—
studentobjectобовʼязковий3 поля
studentIdnumberобовʼязковий—
firstNamestringобовʼязковий—
lastNamestringобовʼязковийможе бути null—
groupsobject[]2 поля
lessonGroupIdnumberобовʼязковий—
groupobjectобовʼязковий3 поля
groupIdnumberобовʼязковий—
nameOfGroupstringобовʼязковий—
isArchivalbooleanобовʼязковий—
reasonForCancellationobjectможе бути null4 поля
reasonForCancellationIdnumberобовʼязковий—
nameOfReasonstringобовʼязковий—
responsibilitystringобовʼязковийможе бути nullОдне з: STUDENT TEACHER SCHOOL FORCE_MAJEURE
isArchivalbooleanобовʼязковий—
cancellationNotestringможе бути null—
customFieldsobjectCustom field values; the table shows the columns chosen in the preset.довільні ключі
Помилки400401403429500
curl "https://your-school.rist.pro/api/lesson" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "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": {}
      }
    ]
  }
}

How 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

cfstring[]—
statusOfLessonstringОдне з: COMPLETED SCHEDULED CANCELED
dateStartstringRange start as a school-local calendar day, not UTC.
dateEndstring—
studentIdsnumber[]—
groupIdsnumber[]—
teacherIdnumber—
teacherIdsnumber[]—
Показати ще 14
typeOfLessonIdnumber—
audienceIdsnumber[]—
subjectIdsnumber[]—
managerIdsnumber[]—
periodnumber—
periodFilterstringОдне з: day week month
presencebooleanWith studentIds, presence of those students; alone, of any student. Implies conducted lessons.
typeOfLessonIdsnumber[]—
reasonForCancellationIdsnumber[]—
isTrialbooleantrue: only trial lessons; false: everything but trial.
leadIdsnumber[]Lessons booked for these sales leads.
hasLeadbooleanOnly lessons booked for some sales lead, e.g. trial lessons of prospects.
groupBystringобовʼязковийWhat to count by; weekday is 1 (Monday) to 7, hour is the school-local start hour.Одне з: status teacher subject typeOfLesson reasonForCancellation weekday hour student group
countBystringstudents counts distinct students instead of lessons, e.g. how many study each subject.Одне з: lessons studentsза замовчуванням lessons

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject3 поля
omittedRowsnumberRows left out by the limit
totalnumberобовʼязковийRecords matching the filters; a record counted in several rows (a student with two teachers) counts here once.
rowsobject[]обовʼязковий3 поля
idinteger | stringобовʼязковийможе бути nullId of the grouped value (teacher id, stage id, weekday 1-7) or its code (lesson status); null means "no value".
namestringобовʼязковий—
countnumberобовʼязковий—
Помилки400401403429500
curl "https://your-school.rist.pro/api/lesson/breakdown?groupBy=status" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {
    "omittedRows": 0,
    "total": 0,
    "rows": [
      {
        "id": 1,
        "name": "string",
        "count": 0
      }
    ]
  }
}
GET

Get lesson calendar

/api/lesson/calendar

Lessons for a calendar day, week or month around a date (view + date), with per-day counts.

get_lesson_calendar

Параметри запиту · 27

pagenumberмін. 1 · за замовчуванням 1
pageSizenumber1–250 · за замовчуванням 20
sortBystringОдне з: statusOfLesson typeOfLesson subject teacher dateTimeStart
sortOrderstringОдне з: ASC DESC
statusOfLessonstringОдне з: COMPLETED SCHEDULED CANCELED
dateStartstringRange start as a school-local calendar day, not UTC.
dateEndstring—
studentIdsnumber[]—
Показати ще 19
groupIdsnumber[]—
teacherIdnumber—
teacherIdsnumber[]—
typeOfLessonIdnumber—
audienceIdsnumber[]—
subjectIdsnumber[]—
managerIdsnumber[]—
periodnumber—
periodFilterstringОдне з: day week month
presencebooleanWith studentIds, presence of those students; alone, of any student. Implies conducted lessons.
typeOfLessonIdsnumber[]—
reasonForCancellationIdsnumber[]—
isTrialbooleantrue: only trial lessons; false: everything but trial.
leadIdsnumber[]Lessons booked for these sales leads.
hasLeadbooleanOnly lessons booked for some sales lead, e.g. trial lessons of prospects.
cfstring[]—
viewstringобовʼязковийОдне з: day week month
datestringобовʼязковийSchool-local calendar day the view is built around, not a UTC moment.
maxEventsPerDaynumber0–10

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject—
Помилки400401403429500
curl "https://your-school.rist.pro/api/lesson/calendar?view=day&date=string" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {}
}
GET

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

idnumberобовʼязковий—

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject—
Помилки400401403429500
curl "https://your-school.rist.pro/api/lesson/1" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {}
}
GET

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

idnumberобовʼязковий—

Параметри запиту · 8

typeOfLessonIdnumberобовʼязковий—
subjectIdnumberобовʼязковий—
periodnumberобовʼязковий—
dateStartstringFirst school-local day of the range (YYYY-MM-DD), inclusive. With dateEnd it overrides period.
dateEndstringLast school-local day of the range (YYYY-MM-DD), inclusive.
lessonCoststringОдне з: FREE TRIAL_FREE GIFT
basicTypeOfLessonstringОдне з: INDIVIDUAL GROUP TRIAL
studentSubscriptionIdnumberStudent subscription to filter the attendance widget lessons by.

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataanyПоля data ще не описані.
Помилки400401403429500
curl "https://your-school.rist.pro/api/lesson/student/1?typeOfLessonId=1&subjectId=1&period=0" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": …
}
GET

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

idnumberобовʼязковий—

Параметри запиту · 8

typeOfLessonIdnumberобовʼязковий—
subjectIdnumberобовʼязковий—
periodnumberобовʼязковий—
dateStartstringFirst school-local day of the range (YYYY-MM-DD), inclusive. With dateEnd it overrides period.
dateEndstringLast school-local day of the range (YYYY-MM-DD), inclusive.
lessonCoststringОдне з: FREE TRIAL_FREE GIFT
basicTypeOfLessonstringОдне з: INDIVIDUAL GROUP TRIAL
studentSubscriptionIdnumberStudent subscription to filter the attendance widget lessons by.

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataanyПоля data ще не описані.
Помилки400401403429500
curl "https://your-school.rist.pro/api/lesson/lead/1?typeOfLessonId=1&subjectId=1&period=0" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": …
}
GET

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

idnumberобовʼязковий—

Параметри запиту · 8

typeOfLessonIdnumberобовʼязковий—
subjectIdnumberобовʼязковий—
periodnumberобовʼязковий—
dateStartstringFirst school-local day of the range (YYYY-MM-DD), inclusive. With dateEnd it overrides period.
dateEndstringLast school-local day of the range (YYYY-MM-DD), inclusive.
lessonCoststringОдне з: FREE TRIAL_FREE GIFT
basicTypeOfLessonstringОдне з: INDIVIDUAL GROUP TRIAL
studentSubscriptionIdnumberStudent subscription to filter the attendance widget lessons by.

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataanyПоля data ще не описані.
Помилки400401403429500
curl "https://your-school.rist.pro/api/lesson/group/1?typeOfLessonId=1&subjectId=1&period=0" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": …
}
GET

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

idnumberобовʼязковий—

Параметри запиту · 24

pagenumberмін. 1 · за замовчуванням 1
pageSizenumber1–250 · за замовчуванням 20
sortBystringОдне з: statusOfLesson typeOfLesson subject teacher dateTimeStart
sortOrderstringОдне з: ASC DESC
statusOfLessonstringОдне з: COMPLETED SCHEDULED CANCELED
dateStartstringRange start as a school-local calendar day, not UTC.
dateEndstring—
studentIdsnumber[]—
Показати ще 16
groupIdsnumber[]—
teacherIdnumber—
teacherIdsnumber[]—
typeOfLessonIdnumber—
audienceIdsnumber[]—
subjectIdsnumber[]—
managerIdsnumber[]—
periodnumber—
periodFilterstringОдне з: day week month
presencebooleanWith studentIds, presence of those students; alone, of any student. Implies conducted lessons.
typeOfLessonIdsnumber[]—
reasonForCancellationIdsnumber[]—
isTrialbooleantrue: only trial lessons; false: everything but trial.
leadIdsnumber[]Lessons booked for these sales leads.
hasLeadbooleanOnly lessons booked for some sales lead, e.g. trial lessons of prospects.
cfstring[]—

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataanyПоля data ще не описані.
Помилки400401403429500
curl "https://your-school.rist.pro/api/lesson/teacher-schedule/1" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": …
}
GET

Preview cancellation charge

/api/lesson/{id}/cancellation-charge

How 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

idnumberобовʼязковий—

Параметри запиту · 1

reasonForCancellationIdnumberобовʼязковий—

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject2 поля
totalnumberобовʼязковий—
studentsobject[]обовʼязковий2 поля
studentIdnumberобовʼязковий—
pricenumberобовʼязковийCharged from the student's balance for this cancellation.
Помилки400401403429500
curl "https://your-school.rist.pro/api/lesson/1/cancellation-charge?reasonForCancellationId=1" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {
    "total": 0,
    "students": [
      {
        "studentId": 1,
        "price": 0
      }
    ]
  }
}
POST

Schedule lesson

/api/lesson

Schedule 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

groupIdsnumber[]може бути nullмін. 1 · елементів мін. 1
teacherIdnumberобовʼязковиймін. 1
audienceIdnumberобовʼязковийможе бути nullмін. 1
typeOfLessonIdnumberобовʼязковиймін. 1
subjectIdnumberобовʼязковиймін. 1
teachingProgramIdnumberобовʼязковийможе бути nullмін. 1
dateTimeStartstringобовʼязковий—
dateTimeEndstringобовʼязковий—
topicstringобовʼязковийможе бути nullдовжина макс. 300
homeworkstringобовʼязковийможе бути nullдовжина макс. 500
notestringобовʼязковийможе бути nullдовжина макс. 1500
recordingUrlstringобовʼязковийможе бути nullдовжина макс. 500
studentsobject[]обовʼязковий9 полів
studentIdnumberобовʼязковиймін. 1
leadIdnumberможе бути nullмін. 1
pricenumberобовʼязковий—
presencebooleanобовʼязковий—
isGiftboolean—
isSuccessfulTrialboolean—
markIdnumberобовʼязковийможе бути nullмін. 1
reasonOfMissingIdnumberобовʼязковийможе бути nullмін. 1
notestringобовʼязковийможе бути nullдовжина макс. 1500
customFieldsobjectдовільні ключі

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject—
Помилки400401403429500
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": {}
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {}
}
POST

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

idnumberобовʼязковий—

Тіло запиту

application/json · object

groupIdsnumber[]може бути nullмін. 1 · елементів мін. 1
teacherIdnumberмін. 1
audienceIdnumberможе бути nullмін. 1
typeOfLessonIdnumberмін. 1
subjectIdnumberмін. 1
teachingProgramIdnumberможе бути nullмін. 1
dateTimeStartstring—
dateTimeEndstring—
topicstringможе бути nullдовжина макс. 300
homeworkstringможе бути nullдовжина макс. 500
notestringможе бути nullдовжина макс. 1500
recordingUrlstringможе бути nullдовжина макс. 500
studentsobject[]9 полів
studentIdnumberобовʼязковиймін. 1
leadIdnumberможе бути nullмін. 1
pricenumberобовʼязковий—
presencebooleanобовʼязковий—
isGiftboolean—
isSuccessfulTrialboolean—
markIdnumberобовʼязковийможе бути nullмін. 1
reasonOfMissingIdnumberобовʼязковийможе бути nullмін. 1
notestringобовʼязковийможе бути nullдовжина макс. 1500
customFieldsobjectдовільні ключі

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject—
Помилки400401403429500
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": {}
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {}
}
POST

Preview bulk cancellation

/api/lesson/bulk-cancel/preview

Read-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

studentIdnumberмін. 1
groupIdnumberмін. 1
dateStartstringобовʼязковий—
dateEndstringобовʼязковий—
reasonForCancellationIdnumberобовʼязковиймін. 1

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject4 поля
countnumberобовʼязковий—
totalnumberобовʼязковий—
untouchedGroupLessonsnumberобовʼязковийScheduled group lessons of the student in the period; bulk cancel from the student card skips them. 0 for a group.
studentsobject[]обовʼязковий6 полів
studentIdnumberобовʼязковий—
firstNamestringобовʼязковий—
lastNamestringобовʼязковийможе бути null—
middleNamestringобовʼязковийможе бути null—
lessonsnumberобовʼязковийLessons of this student that the cancellation takes.
totalnumberобовʼязковийCharged from this student for them.
Помилки400401403429500
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
  }'
Приклад відповіді · 201
{
  "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
      }
    ]
  }
}
POST

Cancel lessons in a period

/api/lesson/bulk-cancel

Cancel 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

studentIdnumberмін. 1
groupIdnumberмін. 1
dateStartstringобовʼязковий—
dateEndstringобовʼязковий—
reasonForCancellationIdnumberобовʼязковиймін. 1

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject1 поле
countnumberобовʼязковийRecords the action changed.
Помилки400401403429500
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
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {
    "count": 0
  }
}
POST

Calculate lesson prices

/api/lesson/calculate-prices

Read-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

studentIdsnumber[]обовʼязковиймін. 1
subjectIdnumberобовʼязковиймін. 1
typeOfLessonIdnumberобовʼязковиймін. 1
dateTimeStartstringобовʼязковий—
dateTimeEndstringобовʼязковий—

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject1 поле
pricesobject[]обовʼязковий9 полів
studentIdnumberобовʼязковий—
priceForLessonnumberобовʼязковий—
durationOfLessonnumberобовʼязковийможе бути null—
constantPricenumberобовʼязковийможе бути null—
discountAmountnumberобовʼязковийможе бути null—
typeOfDiscountstringобовʼязковийможе бути nullОдне з: NUMERICAL PERCENTAGE MONETARY
numberOfLessonnumberобовʼязковийможе бути null—
subscriptionPricenumberобовʼязковийможе бути null—
isGiftbooleanобовʼязковийConducting now would use a gift lesson from the subscription quota.
Помилки400401403429500
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"
  }'
Приклад відповіді · 201
{
  "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
      }
    ]
  }
}
PATCH

Update lesson

/api/lesson/{id}

Change time, teacher, students or other fields of a lesson. Send only the fields to change.

update_lesson

Параметри шляху · 1

idnumberобовʼязковий—

Тіло запиту

application/json · object

groupIdsnumber[]може бути nullмін. 1 · елементів мін. 1
teacherIdnumberмін. 1
audienceIdnumberможе бути nullмін. 1
typeOfLessonIdnumberмін. 1
subjectIdnumberмін. 1
teachingProgramIdnumberможе бути nullмін. 1
dateTimeStartstring—
dateTimeEndstring—
topicstringможе бути nullдовжина макс. 300
homeworkstringможе бути nullдовжина макс. 500
notestringможе бути nullдовжина макс. 1500
recordingUrlstringможе бути nullдовжина макс. 500
studentsobject[]9 полів
studentIdnumberобовʼязковиймін. 1
leadIdnumberможе бути nullмін. 1
pricenumberобовʼязковий—
presencebooleanобовʼязковий—
isGiftboolean—
isSuccessfulTrialboolean—
markIdnumberобовʼязковийможе бути nullмін. 1
reasonOfMissingIdnumberобовʼязковийможе бути nullмін. 1
notestringобовʼязковийможе бути nullдовжина макс. 1500
customFieldsobjectдовільні ключі

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject—
Помилки400401403429500
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": {}
  }'
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {}
}
PATCH

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

idnumberобовʼязковий—

Тіло запиту

application/json · object

reasonForCancellationIdnumberможе бути nullмін. 1
cancellationNotestringможе бути nullдовжина макс. 500

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject—
Помилки400401403429500
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"
  }'
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {}
}
PATCH

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

idnumberобовʼязковий—

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject—
Помилки400401403429500
curl -X PATCH "https://your-school.rist.pro/api/lesson/rollback/1" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {}
}