FinancePayroll

Payroll

Finance · 11 operations

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

Query parameters · 3

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

Response · 200

application/json

statusCodenumberrequiredexample 200
messagestringrequired—
dataobject[]10 fields
payrollIdnumberrequired—
periodFromstringrequired—
periodTostringrequired—
withTeacherReviewbooleanrequired—
createdAtstringrequiredformat YYYY-MM-DDTHH:mm:ss
payoutCountnumberrequired—
paidCountnumberrequired—
totalnumberrequired—
paidTotalnumberrequired—
lastPaidAtstringrequirednullableWhen the last teacher of the payroll was paid.format YYYY-MM-DDTHH:mm:ss
Errors400401403429500
curl "https://your-school.rist.pro/api/payroll" \
  -H "Authorization: Bearer $RIST_API_KEY"
Response example · 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

Path parameters · 1

idnumberrequired—

Response · 200

application/json

statusCodenumberrequiredexample 200
messagestringrequired—
dataobject8 fields
payrollIdnumberrequired—
periodFromstringrequiredYYYY-MM-DD
periodTostringrequired—
withTeacherReviewbooleanrequired—
includeBonusesbooleanrequired—
includePenaltiesbooleanrequired—
splitFromstringrequirednullableFirst day of the second part (YYYY-MM-DD): each payout is paid as two operations.
createdAtstringrequiredformat YYYY-MM-DDTHH:mm:ss
Errors400401403429500
curl "https://your-school.rist.pro/api/payroll/1" \
  -H "Authorization: Bearer $RIST_API_KEY"
Response example · 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

Path parameters · 1

idnumberrequired—

Response · 200

application/json

statusCodenumberrequiredexample 200
messagestringrequired—
dataobject21 fields
periodFromstringrequired—
periodTostringrequired—
withTeacherReviewbooleanrequired—
noChargeLessonCountnumberrequiredCount of period lessons without accrual; the lessons themselves come from GET …/lessons.
splitFromstringrequirednullableFirst day of the second part (YYYY-MM-DD) when the payroll is paid in two parts.
payrollPayoutIdnumberrequired—
payrollIdnumberrequired—
statusstringrequiredOne of: PREPARED CONFIRMED QUESTION READY PAID TEACHER_REVIEW
totalnumberrequired—
paidAtstringrequirednullableformat YYYY-MM-DDTHH:mm:ss
questionstringrequirednullable—
excludedBonusIdsnumber[]required—
teacherobjectrequired11 fields
teacherIdnumberrequired—
firstNamestringrequired—
lastNamestringrequirednullable—
middleNamestringrequirednullable—
avatarUrlstringrequirednullable—
hasAccountbooleanrequired—
payoutMethodstringnullableRequisites only with the teacher.payoutDetails field permission (or the permission to pay).One of: CARD IBAN CASH
payoutRecipientstringnullable—
payoutDetailsstringnullable—
payoutNotestringnullable—
payoutAccountobjectrequired2 fields
accountIdnumberrequired—
nameOfAccountstringrequired—
accountobjectrequired2 fields
accountIdnumberrequired—
nameOfAccountstringrequired—
lessonCountnumberrequiredLessons under wages (without corrections) and their duration.
durationMinutesnumberrequired—
wageTotalnumberrequired—
bonusTotalnumberrequired—
penaltyTotalnumberrequired—
correctionTotalnumberrequired—
unconductedLessonCountnumberrequiredPeriod lessons already over but still scheduled (neither conducted nor cancelled).
Errors400401403429500
curl "https://your-school.rist.pro/api/payroll/payout/1" \
  -H "Authorization: Bearer $RIST_API_KEY"
Response example · 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

Request body

application/json · object

idsnumber[]requiredmin 1 · items min 1

Response · 201

application/json

statusCodenumberrequiredexample 201
messagestringrequired—
dataobject1 field
countnumberrequiredRecords the action changed.
Errors400401403429500
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
    ]
  }'
Response example · 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

Request body

application/json · object

idsnumber[]requiredmin 1 · items min 1

Response · 201

application/json

statusCodenumberrequiredexample 201
messagestringrequired—
dataobject1 field
countnumberrequiredRecords the action changed.
Errors400401403429500
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
    ]
  }'
Response example · 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

Request body

application/json · object

idsnumber[]requiredmin 1 · items min 1
commentstringHow the teacher approved the amount outside the CRM (e.g. by phone); saved to the payout history.length max 1500

Response · 201

application/json

statusCodenumberrequiredexample 201
messagestringrequired—
dataobject1 field
countnumberrequiredRecords the action changed.
Errors400401403429500
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"
  }'
Response example · 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

Request body

application/json · object

idsnumber[]requiredmin 1 · items min 1

Response · 201

application/json

statusCodenumberrequiredexample 201
messagestringrequired—
dataobject1 field
countnumberrequiredRecords the action changed.
Errors400401403429500
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
    ]
  }'
Response example · 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

Request body

application/json · object

idsnumber[]requiredmin 1 · items min 1

Response · 201

application/json

statusCodenumberrequiredexample 201
messagestringrequired—
dataobject1 field
countnumberrequiredRecords the action changed.
Errors400401403429500
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
    ]
  }'
Response example · 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

Request body

application/json · object

idsnumber[]requiredmin 1 · items min 1
dateOfOperationstringrequired—
firstPartDateOfOperationstringOperation date of the first part of a split payroll; left out — the last day of that part.
accountIdnumbernullableOverrides the account in each teacher's payout details; the details themselves stay unchanged.min 1

Response · 201

application/json

statusCodenumberrequiredexample 201
messagestringrequired—
dataobject2 fields
countnumberrequiredPayouts paid.
totalnumberrequiredSum paid, in the school currency.
Errors400401403429500
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
  }'
Response example · 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

Request body

application/json · object

idsnumber[]requiredmin 1 · items min 1

Response · 201

application/json

statusCodenumberrequiredexample 201
messagestringrequired—
dataobject1 field
countnumberrequiredRecords the action changed.
Errors400401403429500
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
    ]
  }'
Response example · 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

Path parameters · 1

idnumberrequired—

Response · 201

application/json

statusCodenumberrequiredexample 201
messagestringrequired—
dataobject1 field
payrollPayoutIdnumberrequiredThe recalculated payout; read it again for the new amounts.
Errors400401403429500
curl -X POST "https://your-school.rist.pro/api/payroll/payout/1/recalculate" \
  -H "Authorization: Bearer $RIST_API_KEY"
Response example · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {
    "payrollPayoutId": 1
  }
}