FinancePayroll

Payroll

Finance · 11 операцій

GET

List payrolls

/api/payroll

Salary payroll batches: period, number of payouts, totals paid and unpaid, counts by payout status. Filter by teacherIds, payoutMethods or accountIds (where a paid payout went, or the teacher account an unpaid one will be paid from).

list_payrolls

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

teacherIdsnumber[]—
payoutMethodsstring[]Payout method from the teacher's current requisites, not as of the payment.Одне з: CARD IBAN CASH
accountIdsnumber[]Where a paid payout went, or the teacher's current account an unpaid one will be paid from.

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject[]10 полів
payrollIdnumberобовʼязковий—
periodFromstringобовʼязковий—
periodTostringобовʼязковий—
withTeacherReviewbooleanобовʼязковий—
createdAtstringобовʼязковийформат YYYY-MM-DDTHH:mm:ss
payoutCountnumberобовʼязковий—
paidCountnumberобовʼязковий—
totalnumberобовʼязковий—
paidTotalnumberобовʼязковий—
lastPaidAtstringобовʼязковийможе бути nullWhen the last teacher of the payroll was paid.формат YYYY-MM-DDTHH:mm:ss
Помилки400401403429500
curl "https://your-school.rist.pro/api/payroll" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": [
    {
      "payrollId": 1,
      "periodFrom": "string",
      "periodTo": "string",
      "withTeacherReview": false,
      "createdAt": "2026-11-09T14:30:00",
      "payoutCount": 0,
      "paidCount": 0,
      "total": 0,
      "paidTotal": 0,
      "lastPaidAt": "2026-11-09T14:30:00"
    }
  ]
}
GET

Get payroll

/api/payroll/{id}

One payroll batch with each teacher payout: status, lesson count, wage, bonus, penalty and correction totals, warnings.

get_payroll

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

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

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject8 полів
payrollIdnumberобовʼязковий—
periodFromstringобовʼязковийYYYY-MM-DD
periodTostringобовʼязковий—
withTeacherReviewbooleanобовʼязковий—
includeBonusesbooleanобовʼязковий—
includePenaltiesbooleanобовʼязковий—
splitFromstringобовʼязковийможе бути nullFirst day of the second part (YYYY-MM-DD): each payout is paid as two operations.
createdAtstringобовʼязковийформат YYYY-MM-DDTHH:mm:ss
Помилки400401403429500
curl "https://your-school.rist.pro/api/payroll/1" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {
    "payrollId": 1,
    "periodFrom": "string",
    "periodTo": "string",
    "withTeacherReview": false,
    "includeBonuses": false,
    "includePenalties": false,
    "splitFrom": "string",
    "createdAt": "2026-11-09T14:30:00"
  }
}
GET

Get teacher payout

/api/payroll/payout/{id}

One teacher payout: totals, status, wage and bonus balances included, event history (sent, confirmed, questions) and the finance operation once paid.

get_payroll_payout

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

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

Відповідь · 200

application/json

statusCodenumberобовʼязковийприклад 200
messagestringобовʼязковий—
dataobject21 поле
periodFromstringобовʼязковий—
periodTostringобовʼязковий—
withTeacherReviewbooleanобовʼязковий—
noChargeLessonCountnumberобовʼязковийCount of period lessons without accrual; the lessons themselves come from GET …/lessons.
splitFromstringобовʼязковийможе бути nullFirst day of the second part (YYYY-MM-DD) when the payroll is paid in two parts.
payrollPayoutIdnumberобовʼязковий—
payrollIdnumberобовʼязковий—
statusstringобовʼязковийОдне з: PREPARED CONFIRMED QUESTION READY PAID TEACHER_REVIEW
totalnumberобовʼязковий—
paidAtstringобовʼязковийможе бути nullформат YYYY-MM-DDTHH:mm:ss
questionstringобовʼязковийможе бути null—
excludedBonusIdsnumber[]обовʼязковий—
teacherobjectобовʼязковий11 полів
teacherIdnumberобовʼязковий—
firstNamestringобовʼязковий—
lastNamestringобовʼязковийможе бути null—
middleNamestringобовʼязковийможе бути null—
avatarUrlstringобовʼязковийможе бути null—
hasAccountbooleanобовʼязковий—
payoutMethodstringможе бути nullRequisites only with the teacher.payoutDetails field permission (or the permission to pay).Одне з: CARD IBAN CASH
payoutRecipientstringможе бути null—
payoutDetailsstringможе бути null—
payoutNotestringможе бути null—
payoutAccountobjectобовʼязковий2 поля
accountIdnumberобовʼязковий—
nameOfAccountstringобовʼязковий—
accountobjectобовʼязковий2 поля
accountIdnumberобовʼязковий—
nameOfAccountstringобовʼязковий—
lessonCountnumberобовʼязковийLessons under wages (without corrections) and their duration.
durationMinutesnumberобовʼязковий—
wageTotalnumberобовʼязковий—
bonusTotalnumberобовʼязковий—
penaltyTotalnumberобовʼязковий—
correctionTotalnumberобовʼязковий—
unconductedLessonCountnumberобовʼязковийPeriod lessons already over but still scheduled (neither conducted nor cancelled).
Помилки400401403429500
curl "https://your-school.rist.pro/api/payroll/payout/1" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {
    "periodFrom": "string",
    "periodTo": "string",
    "withTeacherReview": false,
    "noChargeLessonCount": 0,
    "splitFrom": "string",
    "payrollPayoutId": 1,
    "payrollId": 1,
    "status": "PREPARED",
    "total": 0,
    "paidAt": "2026-11-09T14:30:00",
    "question": "string",
    "excludedBonusIds": [
      1
    ],
    "teacher": {
      "teacherId": 1,
      "firstName": "string",
      "lastName": "string",
      "middleName": "string",
      "avatarUrl": "string",
      "hasAccount": false,
      "payoutMethod": "CARD",
      "payoutRecipient": "string",
      "payoutDetails": "string",
      "payoutNote": "string",
      "payoutAccount": {
        "accountId": 1,
        "nameOfAccount": "string"
      }
    },
    "account": {
      "accountId": 1,
      "nameOfAccount": "string"
    },
    "lessonCount": 0,
    "durationMinutes": 0,
    "wageTotal": 0,
    "bonusTotal": 0,
    "penaltyTotal": 0,
    "correctionTotal": 0,
    "unconductedLessonCount": 0
  }
}
POST

Send payouts to teachers

/api/payroll/payout/send

Send payouts to their teachers for confirmation: PREPARED or QUESTION → TEACHER_REVIEW; a payout with a question is recalculated and sent with the new total. Only in a payroll with teacher review, for teachers with a CRM account. May trigger school automations. ids are payrollPayoutId values from GET /api/payroll/{id}; all of them move in one transaction, so one payout that cannot move fails the whole call.

send_payroll_payouts

Тіло запиту

application/json · object

idsnumber[]обовʼязковиймін. 1 · елементів мін. 1

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject1 поле
countnumberобовʼязковийRecords the action changed.
Помилки400401403429500
curl -X POST "https://your-school.rist.pro/api/payroll/payout/send" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      1
    ]
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {
    "count": 0
  }
}
POST

Recall payouts from teachers

/api/payroll/payout/recall

One step back from the teacher: TEACHER_REVIEW or QUESTION → PREPARED, CONFIRMED → TEACHER_REVIEW (→ PREPARED when the teacher does not review). Lines and totals stay. A return to TEACHER_REVIEW may trigger school automations, as sending does. ids are payrollPayoutId values from GET /api/payroll/{id}; all of them move in one transaction, so one payout that cannot move fails the whole call.

recall_payroll_payouts

Тіло запиту

application/json · object

idsnumber[]обовʼязковиймін. 1 · елементів мін. 1

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject1 поле
countnumberобовʼязковийRecords the action changed.
Помилки400401403429500
curl -X POST "https://your-school.rist.pro/api/payroll/payout/recall" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      1
    ]
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {
    "count": 0
  }
}
POST

Confirm payouts for teachers

/api/payroll/payout/skip-teacher-review

Confirm for teachers who approved the amount outside the CRM: PREPARED, TEACHER_REVIEW or QUESTION → CONFIRMED, the question is cleared. comment says how the teacher approved and goes to the payout history. Only in a payroll with teacher review, for teachers with a CRM account. ids are payrollPayoutId values from GET /api/payroll/{id}; all of them move in one transaction, so one payout that cannot move fails the whole call.

skip_payroll_teacher_review

Тіло запиту

application/json · object

idsnumber[]обовʼязковиймін. 1 · елементів мін. 1
commentstringHow the teacher approved the amount outside the CRM (e.g. by phone); saved to the payout history.довжина макс. 1500

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject1 поле
countnumberобовʼязковийRecords the action changed.
Помилки400401403429500
curl -X POST "https://your-school.rist.pro/api/payroll/payout/skip-teacher-review" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      1
    ],
    "comment": "string"
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {
    "count": 0
  }
}
POST

Mark payouts ready to pay

/api/payroll/payout/ready

Mark payouts as checked and ready to pay: CONFIRMED → READY, or PREPARED → READY when the teacher does not review (payroll without review or teacher without a CRM account). ids are payrollPayoutId values from GET /api/payroll/{id}; all of them move in one transaction, so one payout that cannot move fails the whole call.

mark_payroll_payouts_ready

Тіло запиту

application/json · object

idsnumber[]обовʼязковиймін. 1 · елементів мін. 1

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject1 поле
countnumberобовʼязковийRecords the action changed.
Помилки400401403429500
curl -X POST "https://your-school.rist.pro/api/payroll/payout/ready" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      1
    ]
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {
    "count": 0
  }
}
POST

Unmark payouts ready to pay

/api/payroll/payout/unready

One step back from ready to pay: READY → CONFIRMED (→ PREPARED when the teacher does not review). Lines and totals stay. ids are payrollPayoutId values from GET /api/payroll/{id}; all of them move in one transaction, so one payout that cannot move fails the whole call.

unready_payroll_payouts

Тіло запиту

application/json · object

idsnumber[]обовʼязковиймін. 1 · елементів мін. 1

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject1 поле
countnumberобовʼязковийRecords the action changed.
Помилки400401403429500
curl -X POST "https://your-school.rist.pro/api/payroll/payout/unready" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      1
    ]
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {
    "count": 0
  }
}
POST

Record payouts as paid

/api/payroll/payout/pay

Record payouts as paid: READY → PAID. Creates a wage expense operation per payout and takes the amounts off the teacher rate and bonus balances; a split payroll gets one operation per part, unless a part has nothing to pay. The first part of a split payroll is dated firstPartDateOfOperation (default: the last day of that part), everything else dateOfOperation (YYYY-MM-DD, school day). accountId pays every id from that account instead of each teacher's payout account (account in GET /api/payroll/{id}); pass it only when the person named the account, otherwise leave it out. 409 when a teacher has no account and accountId is not given, or when accruals changed after the calculation (POST /api/payroll/payout/{id}/recalculate first); 403 when the account is not available to your role; 400 when a payout total is zero or negative. Returns count and total. ids are payrollPayoutId values from GET /api/payroll/{id}; all of them move in one transaction, so one payout that cannot move fails the whole call.

pay_payroll_payouts

Тіло запиту

application/json · object

idsnumber[]обовʼязковиймін. 1 · елементів мін. 1
dateOfOperationstringобовʼязковий—
firstPartDateOfOperationstringOperation date of the first part of a split payroll; left out — the last day of that part.
accountIdnumberможе бути nullOverrides the account in each teacher's payout details; the details themselves stay unchanged.мін. 1

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject2 поля
countnumberобовʼязковийPayouts paid.
totalnumberобовʼязковийSum paid, in the school currency.
Помилки400401403429500
curl -X POST "https://your-school.rist.pro/api/payroll/payout/pay" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      1
    ],
    "dateOfOperation": "string",
    "firstPartDateOfOperation": "string",
    "accountId": 1
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {
    "count": 0,
    "total": 0
  }
}
POST

Cancel payout payments

/api/payroll/payout/cancel-payment

Cancel payments: PAID → READY. Deletes the wage operations and returns the amounts to the rate and bonus balances; lines stay. Only the newest payout of a teacher can be cancelled, otherwise 409. ids are payrollPayoutId values from GET /api/payroll/{id}; all of them move in one transaction, so one payout that cannot move fails the whole call.

cancel_payroll_payments

Тіло запиту

application/json · object

idsnumber[]обовʼязковиймін. 1 · елементів мін. 1

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject1 поле
countnumberобовʼязковийRecords the action changed.
Помилки400401403429500
curl -X POST "https://your-school.rist.pro/api/payroll/payout/cancel-payment" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      1
    ]
  }'
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {
    "count": 0
  }
}
POST

Recalculate teacher payout

/api/payroll/payout/{id}/recalculate

Recalculate one unpaid payout from current accruals (lessons conducted or rolled back, changed rates) and return it to PREPARED, so the review starts again. 409 for a paid payout.

recalculate_payroll_payout

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

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

Відповідь · 201

application/json

statusCodenumberобовʼязковийприклад 201
messagestringобовʼязковий—
dataobject1 поле
payrollPayoutIdnumberобовʼязковийThe recalculated payout; read it again for the new amounts.
Помилки400401403429500
curl -X POST "https://your-school.rist.pro/api/payroll/payout/1/recalculate" \
  -H "Authorization: Bearer $RIST_API_KEY"
Приклад відповіді · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {
    "payrollPayoutId": 1
  }
}