TeachersWages

Wages

Teachers · 11 операцій

GET

Get teacher rates

/api/teacher/{id}/wages

Pay rates of one teacher (per lesson, percent, tiers, own or from a system rate). Amounts are present only when the role may see wage amounts; a missing amount means no access, not zero.

get_teacher_wages

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

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

Відповідь · 200

application/json

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

Get rate accrual history

/api/teacher/wage/{id}/history

Balance journal of one rate (path id is the wageId from GET /api/teacher/{id}/wages): lesson accruals, payouts and adjustments between dateStart and dateEnd (YYYY-MM-DD, school days), with totals. Denied unless the role may see the rate balance.

get_teacher_wage_history

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

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

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

dateStartstringобовʼязковий—
dateEndstringобовʼязковий—

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject1 поле
balancenumberобовʼязковийCurrent wage balance, not limited to the period.
Помилки400401403429500
curl "https://your-school.rist.pro/api/teacher/wage/1/history?dateStart=string&dateEnd=string" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {
    "balance": 0
  }
}
GET

Get rate coverage of teachers

/api/teacher/wage-coverage

All active teachers with their active pay rates, to spot teachers without a rate. Amounts are present only when the role may see wage amounts.

get_teacher_wage_coverage

Відповідь · 200

application/json

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

List system rates

/api/wage-template

System pay rates: shared terms assigned to many teachers at once. Assigned teachers read the terms from the rate until they override them.

list_wage_templates

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

pagenumberмін. 1 · за замовчуванням 1
pageSizenumber1–250 · за замовчуванням 20
nameOfWagestring—
wageTemplateIdsnumber[]—
isArchivalbooleanза замовчуванням false

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject3 поля
totalnumberобовʼязковий—
currentPagenumberобовʼязковий—
totalPagesnumberобовʼязковий—
Помилки400401403429500
curl "https://your-school.rist.pro/api/wage-template" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {
    "total": 0,
    "currentPage": 0,
    "totalPages": 0
  }
}
GET

Get system rate

/api/wage-template/{id}

One system pay rate with its terms.

get_wage_template

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

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

Відповідь · 200

application/json

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

Create system rate

/api/wage-template

Add a system pay rate to assign to teachers with POST /api/teacher/wage/template. Terms: nameOfWage; typeOfLessonIds and subjectIds it applies to (both non-empty); durationOfLesson in minutes or null for any; prices with at least one of: present {amount, amountType FIXED or PERCENT, tiers [{studentCount, amount, amountType}] to vary by students present} paid per student present at a conducted lesson; absent {rules [{amount, amountType, studentCount?, reasonIds of GET /api/reason-of-missing, empty = any other reason}]} per absent student; presentOrAbsent priced like present, counting absences with its reasonIds, not combined with present or absent; canceled {rules [{amount, amountType, reasonIds of GET /api/reason-for-cancellation, at least one}]} per canceled lesson; null = not paid. PERCENT is a percent of what students were charged. With FIXED, increasePerStudent multiplies the amount by the students counted and increaseProportionDuration scales it by lesson minutes / durationOfLesson. Example, 300 per lesson: prices {present {amount 300, amountType FIXED}}, increasePerStudent false.

create_wage_template

Тіло запиту

application/json · object

nameOfWagestringобовʼязковийдовжина 1–150
pricesobjectобовʼязковий4 поля
presentobjectможе бути nullPer student present at a conducted lesson.4 поля
amountnumberобовʼязковиймін. 0
amountTypestringUnit of amount: fixed per lesson or percent of student charges. Defaults to fixed; tiers carry their own.Одне з: PERCENT FIXED
tiersobject[]обовʼязковийможе бути nullStudent-count tiers; without them amount applies.3 поля
studentCountnumberобовʼязковиймін. 1
amountnumberобовʼязковиймін. 0
amountTypestringTier unit: fixed amount per lesson or percent of what students were charged. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]Present-or-absent price only: absence reasons counted with present students; empty means any. Ignored for present.мін. 1
absentobjectможе бути nullPer student absent from a conducted lesson; each rule counts absences with its own reasons.1 поле
rulesobject[]обовʼязковийелементів мін. 14 поля
studentCountnumberможе бути nullApplies to lessons with this many students; omitted means any count.мін. 1
amountnumberобовʼязковиймін. 0
amountTypestringUnit: fixed amount per lesson or percent of student charges. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]обовʼязковийMissing reasons (absent) or cancellation reasons (canceled). An absent rule without reasons means "any other reason"; a canceled rule requires at least one.мін. 1
presentOrAbsentobjectможе бути nullPresent and absent students together (absences limited by reasonIds, or any), priced like present. Cannot be combined with separate present or absent prices.4 поля
amountnumberобовʼязковиймін. 0
amountTypestringUnit of amount: fixed per lesson or percent of student charges. Defaults to fixed; tiers carry their own.Одне з: PERCENT FIXED
tiersobject[]обовʼязковийможе бути nullStudent-count tiers; without them amount applies.3 поля
studentCountnumberобовʼязковиймін. 1
amountnumberобовʼязковиймін. 0
amountTypestringTier unit: fixed amount per lesson or percent of what students were charged. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]Present-or-absent price only: absence reasons counted with present students; empty means any. Ignored for present.мін. 1
canceledobjectможе бути nullPer lesson canceled for a reason listed in one of the rules.1 поле
rulesobject[]обовʼязковийелементів мін. 14 поля
studentCountnumberможе бути nullApplies to lessons with this many students; omitted means any count.мін. 1
amountnumberобовʼязковиймін. 0
amountTypestringUnit: fixed amount per lesson or percent of student charges. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]обовʼязковийMissing reasons (absent) or cancellation reasons (canceled). An absent rule without reasons means "any other reason"; a canceled rule requires at least one.мін. 1
typeOfLessonIdsnumber[]обовʼязковиймін. 1 · елементів мін. 1
subjectIdsnumber[]обовʼязковиймін. 1 · елементів мін. 1
durationOfLessonnumberобовʼязковийможе бути nullмін. 1
increasePerStudentbooleanобовʼязковий—
increaseProportionDurationbooleanобовʼязковий—
notestringобовʼязковийможе бути nullдовжина макс. 1500

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject—
Помилки400401403429500
curl -X POST "https://your-school.rist.pro/api/wage-template" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "nameOfWage": "string",
    "prices": {
      "present": {
        "amount": 0,
        "amountType": "PERCENT",
        "tiers": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT"
          }
        ],
        "reasonIds": [
          1
        ]
      },
      "absent": {
        "rules": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT",
            "reasonIds": [
              1
            ]
          }
        ]
      },
      "presentOrAbsent": {
        "amount": 0,
        "amountType": "PERCENT",
        "tiers": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT"
          }
        ],
        "reasonIds": [
          1
        ]
      },
      "canceled": {
        "rules": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT",
            "reasonIds": [
              1
            ]
          }
        ]
      }
    },
    "typeOfLessonIds": [
      1
    ],
    "subjectIds": [
      1
    ],
    "durationOfLesson": 1,
    "increasePerStudent": false,
    "increaseProportionDuration": false,
    "note": "string"
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {}
}
POST

Assign system rate to teachers

/api/teacher/wage/template

Give a system pay rate to several teachers at once (wageTemplateId, teacherIds, optional dateStart and dateEnd as YYYY-MM-DD, note). Teachers who already have it are skipped. The usual way to set up rates of many teachers.

assign_wage_template

Тіло запиту

application/json · object

wageTemplateIdnumberобовʼязковиймін. 1
teacherIdsnumber[]обовʼязковиймін. 1 · елементів мін. 1
dateStartstringобовʼязковийможе бути null—
dateEndstringобовʼязковийможе бути null—
notestringобовʼязковийможе бути nullдовжина макс. 1500

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject[]15 полів
balancenumberобовʼязковий—
wageIdnumberобовʼязковий—
teacherIdnumberобовʼязковий—
wageTemplateIdnumberобовʼязковийможе бути nullSystem wage template; the terms below are already resolved from it. null for a personal wage.
overriddenTermsstring[]обовʼязковийField names of template terms overridden for this teacher; empty for a personal wage.
nameOfWagestringобовʼязковий—
durationOfLessonnumberобовʼязковийможе бути null—
increasePerStudentbooleanобовʼязковий—
increaseProportionDurationbooleanобовʼязковий—
dateStartstringобовʼязковийможе бути nullформат YYYY-MM-DDTHH:mm:ss
dateEndstringобовʼязковийможе бути nullформат YYYY-MM-DDTHH:mm:ss
notestringобовʼязковийможе бути null—
isArchivalbooleanобовʼязковий—
updatedAtstringобовʼязковийформат YYYY-MM-DDTHH:mm:ss
createdAtstringобовʼязковийформат YYYY-MM-DDTHH:mm:ss
Помилки400401403429500
curl -X POST "https://your-school.rist.pro/api/teacher/wage/template" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "wageTemplateId": 1,
    "teacherIds": [
      1
    ],
    "dateStart": "string",
    "dateEnd": "string",
    "note": "string"
  }'
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": [
    {
      "balance": 0,
      "wageId": 1,
      "teacherId": 1,
      "wageTemplateId": 1,
      "overriddenTerms": [
        "string"
      ],
      "nameOfWage": "string",
      "durationOfLesson": 0,
      "increasePerStudent": false,
      "increaseProportionDuration": false,
      "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"
    }
  ]
}
POST

Create teacher rate

/api/teacher/wage

Add a personal pay rate to one teacher (teacherId, optional dateStart and dateEnd as YYYY-MM-DD, note). Prefer a system rate when several teachers share the terms. Terms: nameOfWage; typeOfLessonIds and subjectIds it applies to (both non-empty); durationOfLesson in minutes or null for any; prices with at least one of: present {amount, amountType FIXED or PERCENT, tiers [{studentCount, amount, amountType}] to vary by students present} paid per student present at a conducted lesson; absent {rules [{amount, amountType, studentCount?, reasonIds of GET /api/reason-of-missing, empty = any other reason}]} per absent student; presentOrAbsent priced like present, counting absences with its reasonIds, not combined with present or absent; canceled {rules [{amount, amountType, reasonIds of GET /api/reason-for-cancellation, at least one}]} per canceled lesson; null = not paid. PERCENT is a percent of what students were charged. With FIXED, increasePerStudent multiplies the amount by the students counted and increaseProportionDuration scales it by lesson minutes / durationOfLesson. Example, 300 per lesson: prices {present {amount 300, amountType FIXED}}, increasePerStudent false.

create_teacher_wage

Тіло запиту

application/json · object

teacherIdnumberобовʼязковиймін. 1
nameOfWagestringобовʼязковийдовжина 1–150
pricesobjectобовʼязковий4 поля
presentobjectможе бути nullPer student present at a conducted lesson.4 поля
amountnumberобовʼязковиймін. 0
amountTypestringUnit of amount: fixed per lesson or percent of student charges. Defaults to fixed; tiers carry their own.Одне з: PERCENT FIXED
tiersobject[]обовʼязковийможе бути nullStudent-count tiers; without them amount applies.3 поля
studentCountnumberобовʼязковиймін. 1
amountnumberобовʼязковиймін. 0
amountTypestringTier unit: fixed amount per lesson or percent of what students were charged. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]Present-or-absent price only: absence reasons counted with present students; empty means any. Ignored for present.мін. 1
absentobjectможе бути nullPer student absent from a conducted lesson; each rule counts absences with its own reasons.1 поле
rulesobject[]обовʼязковийелементів мін. 14 поля
studentCountnumberможе бути nullApplies to lessons with this many students; omitted means any count.мін. 1
amountnumberобовʼязковиймін. 0
amountTypestringUnit: fixed amount per lesson or percent of student charges. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]обовʼязковийMissing reasons (absent) or cancellation reasons (canceled). An absent rule without reasons means "any other reason"; a canceled rule requires at least one.мін. 1
presentOrAbsentobjectможе бути nullPresent and absent students together (absences limited by reasonIds, or any), priced like present. Cannot be combined with separate present or absent prices.4 поля
amountnumberобовʼязковиймін. 0
amountTypestringUnit of amount: fixed per lesson or percent of student charges. Defaults to fixed; tiers carry their own.Одне з: PERCENT FIXED
tiersobject[]обовʼязковийможе бути nullStudent-count tiers; without them amount applies.3 поля
studentCountnumberобовʼязковиймін. 1
amountnumberобовʼязковиймін. 0
amountTypestringTier unit: fixed amount per lesson or percent of what students were charged. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]Present-or-absent price only: absence reasons counted with present students; empty means any. Ignored for present.мін. 1
canceledobjectможе бути nullPer lesson canceled for a reason listed in one of the rules.1 поле
rulesobject[]обовʼязковийелементів мін. 14 поля
studentCountnumberможе бути nullApplies to lessons with this many students; omitted means any count.мін. 1
amountnumberобовʼязковиймін. 0
amountTypestringUnit: fixed amount per lesson or percent of student charges. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]обовʼязковийMissing reasons (absent) or cancellation reasons (canceled). An absent rule without reasons means "any other reason"; a canceled rule requires at least one.мін. 1
typeOfLessonIdsnumber[]обовʼязковиймін. 1 · елементів мін. 1
subjectIdsnumber[]обовʼязковиймін. 1 · елементів мін. 1
durationOfLessonnumberобовʼязковийможе бути nullмін. 1
increasePerStudentbooleanобовʼязковий—
increaseProportionDurationbooleanобовʼязковий—
dateStartstringобовʼязковийможе бути null—
dateEndstringобовʼязковийможе бути null—
notestringобовʼязковийможе бути nullдовжина макс. 1500

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject15 полів
balancenumberобовʼязковий—
wageIdnumberобовʼязковий—
teacherIdnumberобовʼязковий—
wageTemplateIdnumberобовʼязковийможе бути nullSystem wage template; the terms below are already resolved from it. null for a personal wage.
overriddenTermsstring[]обовʼязковийField names of template terms overridden for this teacher; empty for a personal wage.
nameOfWagestringобовʼязковий—
durationOfLessonnumberобовʼязковийможе бути null—
increasePerStudentbooleanобовʼязковий—
increaseProportionDurationbooleanобовʼязковий—
dateStartstringобовʼязковийможе бути nullформат YYYY-MM-DDTHH:mm:ss
dateEndstringобовʼязковийможе бути nullформат YYYY-MM-DDTHH:mm:ss
notestringобовʼязковийможе бути null—
isArchivalbooleanобовʼязковий—
updatedAtstringобовʼязковийформат YYYY-MM-DDTHH:mm:ss
createdAtstringобовʼязковийформат YYYY-MM-DDTHH:mm:ss
Помилки400401403429500
curl -X POST "https://your-school.rist.pro/api/teacher/wage" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "teacherId": 1,
    "nameOfWage": "string",
    "prices": {
      "present": {
        "amount": 0,
        "amountType": "PERCENT",
        "tiers": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT"
          }
        ],
        "reasonIds": [
          1
        ]
      },
      "absent": {
        "rules": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT",
            "reasonIds": [
              1
            ]
          }
        ]
      },
      "presentOrAbsent": {
        "amount": 0,
        "amountType": "PERCENT",
        "tiers": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT"
          }
        ],
        "reasonIds": [
          1
        ]
      },
      "canceled": {
        "rules": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT",
            "reasonIds": [
              1
            ]
          }
        ]
      }
    },
    "typeOfLessonIds": [
      1
    ],
    "subjectIds": [
      1
    ],
    "durationOfLesson": 1,
    "increasePerStudent": false,
    "increaseProportionDuration": false,
    "dateStart": "string",
    "dateEnd": "string",
    "note": "string"
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {
    "balance": 0,
    "wageId": 1,
    "teacherId": 1,
    "wageTemplateId": 1,
    "overriddenTerms": [
      "string"
    ],
    "nameOfWage": "string",
    "durationOfLesson": 0,
    "increasePerStudent": false,
    "increaseProportionDuration": false,
    "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"
  }
}
PUT

Update system rate

/api/wage-template/{id}

Rewrite a system pay rate; send all terms as in POST /api/wage-template. It applies at once to every assigned teacher who has not overridden the terms, for lessons conducted from now on; past accruals change only on recalculation. Terms: nameOfWage; typeOfLessonIds and subjectIds it applies to (both non-empty); durationOfLesson in minutes or null for any; prices with at least one of: present {amount, amountType FIXED or PERCENT, tiers [{studentCount, amount, amountType}] to vary by students present} paid per student present at a conducted lesson; absent {rules [{amount, amountType, studentCount?, reasonIds of GET /api/reason-of-missing, empty = any other reason}]} per absent student; presentOrAbsent priced like present, counting absences with its reasonIds, not combined with present or absent; canceled {rules [{amount, amountType, reasonIds of GET /api/reason-for-cancellation, at least one}]} per canceled lesson; null = not paid. PERCENT is a percent of what students were charged. With FIXED, increasePerStudent multiplies the amount by the students counted and increaseProportionDuration scales it by lesson minutes / durationOfLesson. Example, 300 per lesson: prices {present {amount 300, amountType FIXED}}, increasePerStudent false.

update_wage_template

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

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

Тіло запиту

application/json · object

nameOfWagestringобовʼязковийдовжина 1–150
pricesobjectобовʼязковий4 поля
presentobjectможе бути nullPer student present at a conducted lesson.4 поля
amountnumberобовʼязковиймін. 0
amountTypestringUnit of amount: fixed per lesson or percent of student charges. Defaults to fixed; tiers carry their own.Одне з: PERCENT FIXED
tiersobject[]обовʼязковийможе бути nullStudent-count tiers; without them amount applies.3 поля
studentCountnumberобовʼязковиймін. 1
amountnumberобовʼязковиймін. 0
amountTypestringTier unit: fixed amount per lesson or percent of what students were charged. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]Present-or-absent price only: absence reasons counted with present students; empty means any. Ignored for present.мін. 1
absentobjectможе бути nullPer student absent from a conducted lesson; each rule counts absences with its own reasons.1 поле
rulesobject[]обовʼязковийелементів мін. 14 поля
studentCountnumberможе бути nullApplies to lessons with this many students; omitted means any count.мін. 1
amountnumberобовʼязковиймін. 0
amountTypestringUnit: fixed amount per lesson or percent of student charges. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]обовʼязковийMissing reasons (absent) or cancellation reasons (canceled). An absent rule without reasons means "any other reason"; a canceled rule requires at least one.мін. 1
presentOrAbsentobjectможе бути nullPresent and absent students together (absences limited by reasonIds, or any), priced like present. Cannot be combined with separate present or absent prices.4 поля
amountnumberобовʼязковиймін. 0
amountTypestringUnit of amount: fixed per lesson or percent of student charges. Defaults to fixed; tiers carry their own.Одне з: PERCENT FIXED
tiersobject[]обовʼязковийможе бути nullStudent-count tiers; without them amount applies.3 поля
studentCountnumberобовʼязковиймін. 1
amountnumberобовʼязковиймін. 0
amountTypestringTier unit: fixed amount per lesson or percent of what students were charged. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]Present-or-absent price only: absence reasons counted with present students; empty means any. Ignored for present.мін. 1
canceledobjectможе бути nullPer lesson canceled for a reason listed in one of the rules.1 поле
rulesobject[]обовʼязковийелементів мін. 14 поля
studentCountnumberможе бути nullApplies to lessons with this many students; omitted means any count.мін. 1
amountnumberобовʼязковиймін. 0
amountTypestringUnit: fixed amount per lesson or percent of student charges. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]обовʼязковийMissing reasons (absent) or cancellation reasons (canceled). An absent rule without reasons means "any other reason"; a canceled rule requires at least one.мін. 1
typeOfLessonIdsnumber[]обовʼязковиймін. 1 · елементів мін. 1
subjectIdsnumber[]обовʼязковиймін. 1 · елементів мін. 1
durationOfLessonnumberобовʼязковийможе бути nullмін. 1
increasePerStudentbooleanобовʼязковий—
increaseProportionDurationbooleanобовʼязковий—
notestringобовʼязковийможе бути nullдовжина макс. 1500

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject—
Помилки400401403429500
curl -X PUT "https://your-school.rist.pro/api/wage-template/1" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "nameOfWage": "string",
    "prices": {
      "present": {
        "amount": 0,
        "amountType": "PERCENT",
        "tiers": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT"
          }
        ],
        "reasonIds": [
          1
        ]
      },
      "absent": {
        "rules": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT",
            "reasonIds": [
              1
            ]
          }
        ]
      },
      "presentOrAbsent": {
        "amount": 0,
        "amountType": "PERCENT",
        "tiers": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT"
          }
        ],
        "reasonIds": [
          1
        ]
      },
      "canceled": {
        "rules": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT",
            "reasonIds": [
              1
            ]
          }
        ]
      }
    },
    "typeOfLessonIds": [
      1
    ],
    "subjectIds": [
      1
    ],
    "durationOfLesson": 1,
    "increasePerStudent": false,
    "increaseProportionDuration": false,
    "note": "string"
  }'
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {}
}
PATCH

Archive system rate

/api/wage-template/archive/{id}

Archive (isArchival=true) or restore (isArchival=false) a system pay rate. Archiving also ends today every active teacher rate assigned from it; restoring does not bring those back.

archive_wage_template

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

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

Тіло запиту

application/json · object

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

Відповідь · 200

application/json

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

Update teacher rate

/api/teacher/wage/{id}

Change a teacher rate (path id is the wageId from GET /api/teacher/{id}/wages). Send only the fields to change; a sent price replaces that price, null stops paying it. Changing the terms of a rate from a system rate overrides them for this teacher only. Applies to lessons conducted from now on.

update_teacher_wage

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

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

Тіло запиту

application/json · object

teacherIdnumberмін. 1
nameOfWagestringдовжина 1–150
pricesobject4 поля
presentobjectможе бути nullPer student present at a conducted lesson.4 поля
amountnumberобовʼязковиймін. 0
amountTypestringUnit of amount: fixed per lesson or percent of student charges. Defaults to fixed; tiers carry their own.Одне з: PERCENT FIXED
tiersobject[]обовʼязковийможе бути nullStudent-count tiers; without them amount applies.3 поля
studentCountnumberобовʼязковиймін. 1
amountnumberобовʼязковиймін. 0
amountTypestringTier unit: fixed amount per lesson or percent of what students were charged. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]Present-or-absent price only: absence reasons counted with present students; empty means any. Ignored for present.мін. 1
absentobjectможе бути nullPer student absent from a conducted lesson; each rule counts absences with its own reasons.1 поле
rulesobject[]обовʼязковийелементів мін. 14 поля
studentCountnumberможе бути nullApplies to lessons with this many students; omitted means any count.мін. 1
amountnumberобовʼязковиймін. 0
amountTypestringUnit: fixed amount per lesson or percent of student charges. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]обовʼязковийMissing reasons (absent) or cancellation reasons (canceled). An absent rule without reasons means "any other reason"; a canceled rule requires at least one.мін. 1
presentOrAbsentobjectможе бути nullPresent and absent students together (absences limited by reasonIds, or any), priced like present. Cannot be combined with separate present or absent prices.4 поля
amountnumberобовʼязковиймін. 0
amountTypestringUnit of amount: fixed per lesson or percent of student charges. Defaults to fixed; tiers carry their own.Одне з: PERCENT FIXED
tiersobject[]обовʼязковийможе бути nullStudent-count tiers; without them amount applies.3 поля
studentCountnumberобовʼязковиймін. 1
amountnumberобовʼязковиймін. 0
amountTypestringTier unit: fixed amount per lesson or percent of what students were charged. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]Present-or-absent price only: absence reasons counted with present students; empty means any. Ignored for present.мін. 1
canceledobjectможе бути nullPer lesson canceled for a reason listed in one of the rules.1 поле
rulesobject[]обовʼязковийелементів мін. 14 поля
studentCountnumberможе бути nullApplies to lessons with this many students; omitted means any count.мін. 1
amountnumberобовʼязковиймін. 0
amountTypestringUnit: fixed amount per lesson or percent of student charges. Defaults to a fixed amount.Одне з: PERCENT FIXED
reasonIdsnumber[]обовʼязковийMissing reasons (absent) or cancellation reasons (canceled). An absent rule without reasons means "any other reason"; a canceled rule requires at least one.мін. 1
typeOfLessonIdsnumber[]мін. 1 · елементів мін. 1
subjectIdsnumber[]мін. 1 · елементів мін. 1
durationOfLessonnumberможе бути nullмін. 1
increasePerStudentboolean—
increaseProportionDurationboolean—
dateStartstringможе бути null—
dateEndstringможе бути null—
notestringможе бути nullдовжина макс. 1500

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject15 полів
balancenumberобовʼязковий—
wageIdnumberобовʼязковий—
teacherIdnumberобовʼязковий—
wageTemplateIdnumberобовʼязковийможе бути nullSystem wage template; the terms below are already resolved from it. null for a personal wage.
overriddenTermsstring[]обовʼязковийField names of template terms overridden for this teacher; empty for a personal wage.
nameOfWagestringобовʼязковий—
durationOfLessonnumberобовʼязковийможе бути null—
increasePerStudentbooleanобовʼязковий—
increaseProportionDurationbooleanобовʼязковий—
dateStartstringобовʼязковийможе бути nullформат YYYY-MM-DDTHH:mm:ss
dateEndstringобовʼязковийможе бути nullформат YYYY-MM-DDTHH:mm:ss
notestringобовʼязковийможе бути null—
isArchivalbooleanобовʼязковий—
updatedAtstringобовʼязковийформат YYYY-MM-DDTHH:mm:ss
createdAtstringобовʼязковийформат YYYY-MM-DDTHH:mm:ss
Помилки400401403429500
curl -X PATCH "https://your-school.rist.pro/api/teacher/wage/1" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "teacherId": 1,
    "nameOfWage": "string",
    "prices": {
      "present": {
        "amount": 0,
        "amountType": "PERCENT",
        "tiers": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT"
          }
        ],
        "reasonIds": [
          1
        ]
      },
      "absent": {
        "rules": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT",
            "reasonIds": [
              1
            ]
          }
        ]
      },
      "presentOrAbsent": {
        "amount": 0,
        "amountType": "PERCENT",
        "tiers": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT"
          }
        ],
        "reasonIds": [
          1
        ]
      },
      "canceled": {
        "rules": [
          {
            "studentCount": 1,
            "amount": 0,
            "amountType": "PERCENT",
            "reasonIds": [
              1
            ]
          }
        ]
      }
    },
    "typeOfLessonIds": [
      1
    ],
    "subjectIds": [
      1
    ],
    "durationOfLesson": 1,
    "increasePerStudent": false,
    "increaseProportionDuration": false,
    "dateStart": "string",
    "dateEnd": "string",
    "note": "string"
  }'
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {
    "balance": 0,
    "wageId": 1,
    "teacherId": 1,
    "wageTemplateId": 1,
    "overriddenTerms": [
      "string"
    ],
    "nameOfWage": "string",
    "durationOfLesson": 0,
    "increasePerStudent": false,
    "increaseProportionDuration": false,
    "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"
  }
}