Bonuses
Teachers · 10 операцій
/api/teacher/{id}/bonusesGETGet bonus coverage of teachers/api/teacher/bonus-coverageGETList system bonuses/api/bonus-templateGETGet system bonus/api/bonus-template/{id}POSTCreate system bonus/api/bonus-templatePOSTAssign system bonus to teachers/api/bonus/templatePOSTCreate teacher bonus/api/bonusPUTUpdate system bonus/api/bonus-template/{id}PATCHArchive system bonus/api/bonus-template/archive/{id}PATCHUpdate teacher bonus/api/bonus/{id}Get teacher bonuses
/api/teacher/{id}/bonusesBonus rules of one teacher with their current balances. Amounts are present only when the role may see bonus amounts; a missing amount means no access, not zero.
get_teacher_bonuses
Параметри шляху · 1
id—Відповідь · 200
application/json
curl "https://your-school.rist.pro/api/teacher/1/bonuses" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/teacher/1/bonuses", {
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/teacher/1/bonuses",
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 bonus coverage of teachers
/api/teacher/bonus-coverageAll active teachers with their active bonus rules, to spot teachers without a bonus. Amounts are present only when the role may see bonus amounts.
get_teacher_bonus_coverage
Відповідь · 200
application/json
curl "https://your-school.rist.pro/api/teacher/bonus-coverage" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/teacher/bonus-coverage", {
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/teacher/bonus-coverage",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": …
}List system bonuses
/api/bonus-templateSystem bonuses: shared bonus terms assigned to many teachers at once. Assigned teachers read the terms from it until they override them.
list_bonus_templates
Параметри запиту · 5
pageмін. 1 · за замовчуванням 1pageSize1–250 · за замовчуванням 20nameOfBonus—bonusTemplateIds—isArchivalза замовчуванням falseВідповідь · 200
application/json
curl "https://your-school.rist.pro/api/bonus-template" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/bonus-template", {
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/bonus-template",
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,
"currentPage": 0,
"totalPages": 0
}
}Get system bonus
/api/bonus-template/{id}One system bonus with its terms.
get_bonus_template
Параметри шляху · 1
id—Відповідь · 200
application/json
curl "https://your-school.rist.pro/api/bonus-template/1" \
-H "Authorization: Bearer $RIST_API_KEY"const response = await fetch("https://your-school.rist.pro/api/bonus-template/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/bonus-template/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": …
}Create system bonus
/api/bonus-templateAdd a system bonus to assign to teachers with POST /api/bonus/template. Terms: nameOfBonus; type (cannot be changed later): VOLUME = amountPerLesson for every lesson of a period, taken from the highest tier of minutes taught in it (tiers [{totalMinutes, amountPerLesson}], period DAY/WEEK/MONTH); VOLUME_ONCE = one-off sum per period by minutes reached (tiers, period); LESSON_COUNT = one-off sum by lessons per WEEK or MONTH (tiers, totalMinutes holds the lesson count); STUDENT_TENURE = one-off sum when a student reaches N lessons with the teacher (tiers, totalMinutes holds N); ON_TIME_CONDUCT = per-lesson sum from the first tier whose totalMinutes is not below the minutes from lesson end to conducting (values may be negative); CONVERSION = amountPerLesson per converted trial lesson; TIME_RANGE = amountPerLesson per lesson starting within timeRanges [{timeFrom, timeTo}] in minutes from midnight; STUDENT_CLASS = classAmounts [{classOfStudentId, amountPerLesson}]; TEACHING_PROGRAM = programAmounts [{teachingProgramId, amountPerLesson}]; SUBJECT = subjectAmounts [{subjectId, amountPerLesson}] instead of subjectIds; TYPE_OF_LESSON = typeOfLessonAmounts [{typeOfLessonId, amountPerLesson}] instead of typeOfLessonIds. Also typeOfLessonIds and subjectIds it applies to, durationOfLesson or null, presence PRESENT / ABSENT / PRESENT_OR_ABSENT / CANCELED for which lessons count (default any conducted).
create_bonus_template
Тіло запиту
application/json · object
nameOfBonusдовжина 1–150typeDefaults to VOLUME. Cannot be changed after creation.Одне з: VOLUME VOLUME_ONCE CONVERSION TIME_RANGE STUDENT_CLASS ON_TIME_CONDUCT LESSON_COUNT STUDENT_TENURE TEACHING_PROGRAM SUBJECT TYPE_OF_LESSONperiodОдне з: DAY WEEK MONTHpresenceОдне з: CANCELED PRESENT ABSENT PRESENT_OR_ABSENTamountPerLessonмін. 1timeRangesелементів мін. 12 поля
timeFrom0–1439timeTo0–1439typeOfLessonIdsмін. 1 · елементів мін. 1subjectIdsмін. 1 · елементів мін. 1durationOfLessonмін. 1tiersелементів мін. 12 поля
totalMinutes—amountPerLesson—classAmountsелементів мін. 12 поля
classOfStudentIdмін. 1amountPerLessonмін. 1programAmountsелементів мін. 12 поля
teachingProgramIdмін. 1amountPerLessonмін. 1subjectAmountsелементів мін. 12 поля
subjectIdмін. 1amountPerLessonмін. 1typeOfLessonAmountsелементів мін. 12 поля
typeOfLessonIdмін. 1amountPerLessonмін. 1noteдовжина макс. 1500Відповідь · 201
application/json
curl -X POST "https://your-school.rist.pro/api/bonus-template" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
],
"note": "string"
}'const response = await fetch("https://your-school.rist.pro/api/bonus-template", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
],
"note": "string"
}),
});
const { data } = await response.json();import os
import requests
response = requests.post(
"https://your-school.rist.pro/api/bonus-template",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
],
"note": "string"
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 201,
"message": "Operation completed successfully",
"data": …
}Assign system bonus to teachers
/api/bonus/templateGive a system bonus to several teachers at once (bonusTemplateId, teacherIds, optional dateStart and dateEnd as YYYY-MM-DD, note). Teachers who already have it are skipped.
assign_bonus_template
Тіло запиту
application/json · object
bonusTemplateIdмін. 1teacherIdsмін. 1 · елементів мін. 1dateStart—dateEnd—noteдовжина макс. 1500Відповідь · 200
application/json
statusCodeприклад 200message—data16 полів
amountPerLesson—bonusId—teacherId—bonusTemplateIdTemplate the terms below are taken from; null for a personal bonus.overriddenTermsTemplate terms overridden for this teacher (field names); empty for a personal bonus.nameOfBonus—typeОдне з: VOLUME VOLUME_ONCE CONVERSION TIME_RANGE STUDENT_CLASS ON_TIME_CONDUCT LESSON_COUNT STUDENT_TENURE TEACHING_PROGRAM SUBJECT TYPE_OF_LESSONperiodОдне з: DAY WEEK MONTHpresenceWhich lessons the bonus counts by student attendance.Одне з: CANCELED PRESENT ABSENT PRESENT_OR_ABSENTdurationOfLesson—dateStartформат YYYY-MM-DDTHH:mm:ssdateEndформат YYYY-MM-DDTHH:mm:ssnote—isArchival—updatedAtформат YYYY-MM-DDTHH:mm:sscreatedAtформат YYYY-MM-DDTHH:mm:sscurl -X POST "https://your-school.rist.pro/api/bonus/template" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"bonusTemplateId": 1,
"teacherIds": [
1
],
"dateStart": "string",
"dateEnd": "string",
"note": "string"
}'const response = await fetch("https://your-school.rist.pro/api/bonus/template", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"bonusTemplateId": 1,
"teacherIds": [
1
],
"dateStart": "string",
"dateEnd": "string",
"note": "string"
}),
});
const { data } = await response.json();import os
import requests
response = requests.post(
"https://your-school.rist.pro/api/bonus/template",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"bonusTemplateId": 1,
"teacherIds": [
1
],
"dateStart": "string",
"dateEnd": "string",
"note": "string"
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": [
{
"amountPerLesson": 0,
"bonusId": 1,
"teacherId": 1,
"bonusTemplateId": 1,
"overriddenTerms": [
"string"
],
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"durationOfLesson": 0,
"dateStart": "2026-11-09T14:30:00",
"dateEnd": "2026-11-09T14:30:00",
"note": "string",
"isArchival": false,
"updatedAt": "2026-11-09T14:30:00",
"createdAt": "2026-11-09T14:30:00"
}
]
}Create teacher bonus
/api/bonusAdd a personal bonus to one teacher (teacherId, optional dateStart and dateEnd as YYYY-MM-DD, note). Prefer a system bonus when several teachers share the terms. Terms: nameOfBonus; type (cannot be changed later): VOLUME = amountPerLesson for every lesson of a period, taken from the highest tier of minutes taught in it (tiers [{totalMinutes, amountPerLesson}], period DAY/WEEK/MONTH); VOLUME_ONCE = one-off sum per period by minutes reached (tiers, period); LESSON_COUNT = one-off sum by lessons per WEEK or MONTH (tiers, totalMinutes holds the lesson count); STUDENT_TENURE = one-off sum when a student reaches N lessons with the teacher (tiers, totalMinutes holds N); ON_TIME_CONDUCT = per-lesson sum from the first tier whose totalMinutes is not below the minutes from lesson end to conducting (values may be negative); CONVERSION = amountPerLesson per converted trial lesson; TIME_RANGE = amountPerLesson per lesson starting within timeRanges [{timeFrom, timeTo}] in minutes from midnight; STUDENT_CLASS = classAmounts [{classOfStudentId, amountPerLesson}]; TEACHING_PROGRAM = programAmounts [{teachingProgramId, amountPerLesson}]; SUBJECT = subjectAmounts [{subjectId, amountPerLesson}] instead of subjectIds; TYPE_OF_LESSON = typeOfLessonAmounts [{typeOfLessonId, amountPerLesson}] instead of typeOfLessonIds. Also typeOfLessonIds and subjectIds it applies to, durationOfLesson or null, presence PRESENT / ABSENT / PRESENT_OR_ABSENT / CANCELED for which lessons count (default any conducted).
create_teacher_bonus
Тіло запиту
application/json · object
teacherIdмін. 1nameOfBonusдовжина 1–150typeDefaults to VOLUME. Cannot be changed after creation.Одне з: VOLUME VOLUME_ONCE CONVERSION TIME_RANGE STUDENT_CLASS ON_TIME_CONDUCT LESSON_COUNT STUDENT_TENURE TEACHING_PROGRAM SUBJECT TYPE_OF_LESSONperiodОдне з: DAY WEEK MONTHpresenceОдне з: CANCELED PRESENT ABSENT PRESENT_OR_ABSENTamountPerLessonмін. 1timeRangesелементів мін. 12 поля
timeFrom0–1439timeTo0–1439typeOfLessonIdsмін. 1 · елементів мін. 1subjectIdsмін. 1 · елементів мін. 1durationOfLessonмін. 1dateStart—dateEnd—noteдовжина макс. 1500tiersелементів мін. 12 поля
totalMinutes—amountPerLesson—classAmountsелементів мін. 12 поля
classOfStudentIdмін. 1amountPerLessonмін. 1programAmountsелементів мін. 12 поля
teachingProgramIdмін. 1amountPerLessonмін. 1subjectAmountsелементів мін. 12 поля
subjectIdмін. 1amountPerLessonмін. 1typeOfLessonAmountsелементів мін. 12 поля
typeOfLessonIdмін. 1amountPerLessonмін. 1Відповідь · 201
application/json
statusCodeприклад 201message—data16 полів
amountPerLesson—bonusId—teacherId—bonusTemplateIdTemplate the terms below are taken from; null for a personal bonus.overriddenTermsTemplate terms overridden for this teacher (field names); empty for a personal bonus.nameOfBonus—typeОдне з: VOLUME VOLUME_ONCE CONVERSION TIME_RANGE STUDENT_CLASS ON_TIME_CONDUCT LESSON_COUNT STUDENT_TENURE TEACHING_PROGRAM SUBJECT TYPE_OF_LESSONperiodОдне з: DAY WEEK MONTHpresenceWhich lessons the bonus counts by student attendance.Одне з: CANCELED PRESENT ABSENT PRESENT_OR_ABSENTdurationOfLesson—dateStartформат YYYY-MM-DDTHH:mm:ssdateEndформат YYYY-MM-DDTHH:mm:ssnote—isArchival—updatedAtформат YYYY-MM-DDTHH:mm:sscreatedAtформат YYYY-MM-DDTHH:mm:sscurl -X POST "https://your-school.rist.pro/api/bonus" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"teacherId": 1,
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"dateStart": "string",
"dateEnd": "string",
"note": "string",
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
]
}'const response = await fetch("https://your-school.rist.pro/api/bonus", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"teacherId": 1,
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"dateStart": "string",
"dateEnd": "string",
"note": "string",
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
]
}),
});
const { data } = await response.json();import os
import requests
response = requests.post(
"https://your-school.rist.pro/api/bonus",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"teacherId": 1,
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"dateStart": "string",
"dateEnd": "string",
"note": "string",
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
]
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 201,
"message": "Operation completed successfully",
"data": {
"amountPerLesson": 0,
"bonusId": 1,
"teacherId": 1,
"bonusTemplateId": 1,
"overriddenTerms": [
"string"
],
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"durationOfLesson": 0,
"dateStart": "2026-11-09T14:30:00",
"dateEnd": "2026-11-09T14:30:00",
"note": "string",
"isArchival": false,
"updatedAt": "2026-11-09T14:30:00",
"createdAt": "2026-11-09T14:30:00"
}
}Update system bonus
/api/bonus-template/{id}Rewrite a system bonus; send all terms as in POST /api/bonus-template, the type stays. It applies at once to every assigned teacher who has not overridden the terms. Terms: nameOfBonus; type (cannot be changed later): VOLUME = amountPerLesson for every lesson of a period, taken from the highest tier of minutes taught in it (tiers [{totalMinutes, amountPerLesson}], period DAY/WEEK/MONTH); VOLUME_ONCE = one-off sum per period by minutes reached (tiers, period); LESSON_COUNT = one-off sum by lessons per WEEK or MONTH (tiers, totalMinutes holds the lesson count); STUDENT_TENURE = one-off sum when a student reaches N lessons with the teacher (tiers, totalMinutes holds N); ON_TIME_CONDUCT = per-lesson sum from the first tier whose totalMinutes is not below the minutes from lesson end to conducting (values may be negative); CONVERSION = amountPerLesson per converted trial lesson; TIME_RANGE = amountPerLesson per lesson starting within timeRanges [{timeFrom, timeTo}] in minutes from midnight; STUDENT_CLASS = classAmounts [{classOfStudentId, amountPerLesson}]; TEACHING_PROGRAM = programAmounts [{teachingProgramId, amountPerLesson}]; SUBJECT = subjectAmounts [{subjectId, amountPerLesson}] instead of subjectIds; TYPE_OF_LESSON = typeOfLessonAmounts [{typeOfLessonId, amountPerLesson}] instead of typeOfLessonIds. Also typeOfLessonIds and subjectIds it applies to, durationOfLesson or null, presence PRESENT / ABSENT / PRESENT_OR_ABSENT / CANCELED for which lessons count (default any conducted).
update_bonus_template
Параметри шляху · 1
id—Тіло запиту
application/json · object
nameOfBonusдовжина 1–150typeDefaults to VOLUME. Cannot be changed after creation.Одне з: VOLUME VOLUME_ONCE CONVERSION TIME_RANGE STUDENT_CLASS ON_TIME_CONDUCT LESSON_COUNT STUDENT_TENURE TEACHING_PROGRAM SUBJECT TYPE_OF_LESSONperiodОдне з: DAY WEEK MONTHpresenceОдне з: CANCELED PRESENT ABSENT PRESENT_OR_ABSENTamountPerLessonмін. 1timeRangesелементів мін. 12 поля
timeFrom0–1439timeTo0–1439typeOfLessonIdsмін. 1 · елементів мін. 1subjectIdsмін. 1 · елементів мін. 1durationOfLessonмін. 1tiersелементів мін. 12 поля
totalMinutes—amountPerLesson—classAmountsелементів мін. 12 поля
classOfStudentIdмін. 1amountPerLessonмін. 1programAmountsелементів мін. 12 поля
teachingProgramIdмін. 1amountPerLessonмін. 1subjectAmountsелементів мін. 12 поля
subjectIdмін. 1amountPerLessonмін. 1typeOfLessonAmountsелементів мін. 12 поля
typeOfLessonIdмін. 1amountPerLessonмін. 1noteдовжина макс. 1500Відповідь · 200
application/json
curl -X PUT "https://your-school.rist.pro/api/bonus-template/1" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
],
"note": "string"
}'const response = await fetch("https://your-school.rist.pro/api/bonus-template/1", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
],
"note": "string"
}),
});
const { data } = await response.json();import os
import requests
response = requests.put(
"https://your-school.rist.pro/api/bonus-template/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
],
"note": "string"
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": …
}Archive system bonus
/api/bonus-template/archive/{id}Archive (isArchival=true) or restore (isArchival=false) a system bonus. Archiving also ends today every active teacher bonus assigned from it; restoring does not bring those back.
archive_bonus_template
Параметри шляху · 1
id—Тіло запиту
application/json · object
isArchival—Відповідь · 200
application/json
curl -X PATCH "https://your-school.rist.pro/api/bonus-template/archive/1" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"isArchival": false
}'const response = await fetch("https://your-school.rist.pro/api/bonus-template/archive/1", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"isArchival": false
}),
});
const { data } = await response.json();import os
import requests
response = requests.patch(
"https://your-school.rist.pro/api/bonus-template/archive/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"isArchival": False
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": …
}Update teacher bonus
/api/bonus/{id}Change a teacher bonus (path id is the bonusId from GET /api/teacher/{id}/bonuses). Send only the fields to change; the type cannot change. Changing the terms of a bonus from a system bonus overrides them for this teacher only.
update_teacher_bonus
Параметри шляху · 1
id—Тіло запиту
application/json · object
teacherIdмін. 1nameOfBonusдовжина 1–150typeDefaults to VOLUME. Cannot be changed after creation.Одне з: VOLUME VOLUME_ONCE CONVERSION TIME_RANGE STUDENT_CLASS ON_TIME_CONDUCT LESSON_COUNT STUDENT_TENURE TEACHING_PROGRAM SUBJECT TYPE_OF_LESSONperiodОдне з: DAY WEEK MONTHpresenceОдне з: CANCELED PRESENT ABSENT PRESENT_OR_ABSENTamountPerLessonмін. 1timeRangesелементів мін. 12 поля
timeFrom0–1439timeTo0–1439typeOfLessonIdsмін. 1 · елементів мін. 1subjectIdsмін. 1 · елементів мін. 1durationOfLessonмін. 1dateStart—dateEnd—noteдовжина макс. 1500tiersелементів мін. 12 поля
totalMinutes—amountPerLesson—classAmountsелементів мін. 12 поля
classOfStudentIdмін. 1amountPerLessonмін. 1programAmountsелементів мін. 12 поля
teachingProgramIdмін. 1amountPerLessonмін. 1subjectAmountsелементів мін. 12 поля
subjectIdмін. 1amountPerLessonмін. 1typeOfLessonAmountsелементів мін. 12 поля
typeOfLessonIdмін. 1amountPerLessonмін. 1Відповідь · 200
application/json
statusCodeприклад 200message—data16 полів
amountPerLesson—bonusId—teacherId—bonusTemplateIdTemplate the terms below are taken from; null for a personal bonus.overriddenTermsTemplate terms overridden for this teacher (field names); empty for a personal bonus.nameOfBonus—typeОдне з: VOLUME VOLUME_ONCE CONVERSION TIME_RANGE STUDENT_CLASS ON_TIME_CONDUCT LESSON_COUNT STUDENT_TENURE TEACHING_PROGRAM SUBJECT TYPE_OF_LESSONperiodОдне з: DAY WEEK MONTHpresenceWhich lessons the bonus counts by student attendance.Одне з: CANCELED PRESENT ABSENT PRESENT_OR_ABSENTdurationOfLesson—dateStartформат YYYY-MM-DDTHH:mm:ssdateEndформат YYYY-MM-DDTHH:mm:ssnote—isArchival—updatedAtформат YYYY-MM-DDTHH:mm:sscreatedAtформат YYYY-MM-DDTHH:mm:sscurl -X PATCH "https://your-school.rist.pro/api/bonus/1" \
-H "Authorization: Bearer $RIST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"teacherId": 1,
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"dateStart": "string",
"dateEnd": "string",
"note": "string",
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
]
}'const response = await fetch("https://your-school.rist.pro/api/bonus/1", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.RIST_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"teacherId": 1,
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"dateStart": "string",
"dateEnd": "string",
"note": "string",
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
]
}),
});
const { data } = await response.json();import os
import requests
response = requests.patch(
"https://your-school.rist.pro/api/bonus/1",
headers={"Authorization": f"Bearer {os.environ['RIST_API_KEY']}"},
json={
"teacherId": 1,
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"amountPerLesson": 1,
"timeRanges": [
{
"timeFrom": 0,
"timeTo": 0
}
],
"typeOfLessonIds": [
1
],
"subjectIds": [
1
],
"durationOfLesson": 1,
"dateStart": "string",
"dateEnd": "string",
"note": "string",
"tiers": [
{
"totalMinutes": 0,
"amountPerLesson": 0
}
],
"classAmounts": [
{
"classOfStudentId": 1,
"amountPerLesson": 1
}
],
"programAmounts": [
{
"teachingProgramId": 1,
"amountPerLesson": 1
}
],
"subjectAmounts": [
{
"subjectId": 1,
"amountPerLesson": 1
}
],
"typeOfLessonAmounts": [
{
"typeOfLessonId": 1,
"amountPerLesson": 1
}
]
},
)
response.raise_for_status()
data = response.json()["data"]{
"statusCode": 200,
"message": "Operation completed successfully",
"data": {
"amountPerLesson": 0,
"bonusId": 1,
"teacherId": 1,
"bonusTemplateId": 1,
"overriddenTerms": [
"string"
],
"nameOfBonus": "string",
"type": "VOLUME",
"period": "DAY",
"presence": "CANCELED",
"durationOfLesson": 0,
"dateStart": "2026-11-09T14:30:00",
"dateEnd": "2026-11-09T14:30:00",
"note": "string",
"isArchival": false,
"updatedAt": "2026-11-09T14:30:00",
"createdAt": "2026-11-09T14:30:00"
}
}