Students and customersStudent subscriptions

Student subscriptions

Students and customers · 5 operations

GET

Get student subscriptions and balance

/api/student/subscription

Subscriptions (prepaid lesson packages) of a student with money balance, lessons left, price per lesson and cashback. A negative balance means the student owes money.

get_student_subscriptions

Query parameters · 1

studentIdnumberrequired—

Response · 200

application/json

statusCodenumberrequiredexample 200
messagestringrequired—
dataanyThe fields of data are not described yet.
Errors400401403429500
curl "https://your-school.rist.pro/api/student/subscription?studentId=1" \
  -H "Authorization: Bearer $RIST_API_KEY"
Response example · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": …
}
GET

List student discounts

/api/student/discount

Discounts of one student (pass studentId), including what they apply to and their validity.

list_student_discounts

Query parameters · 1

studentIdnumberrequired—

Response · 200

application/json

statusCodenumberrequiredexample 200
messagestringrequired—
dataanyThe fields of data are not described yet.
Errors400401403429500
curl "https://your-school.rist.pro/api/student/discount?studentId=1" \
  -H "Authorization: Bearer $RIST_API_KEY"
Response example · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": …
}
POST

Sell subscription to student

/api/student/subscription

Attach a subscription (prepaid lesson package from GET /api/subscription) to a student, limited to the given subjects and lesson types. Affects what lessons are charged from; confirm with the user first.

create_student_subscription

Request body

application/json · object

studentIdnumberrequiredmin 1
subscriptionIdnumberrequiredmin 1
typeOfBillstringrequiredOne of: SEPARATE BURNED
typeOfLessonIdsnumber[]requiredmin 1 · items min 1
subjectIdsnumber[]requiredmin 1 · items min 1
dateStartstringrequirednullable—
dateEndstringrequirednullable—
notestringrequirednullablelength max 1500
giftLessonsnumberGift lessons this subscription grants, on top of the tariff's lessons. A plan, not a remainder: used ones are counted from charges, so editing it later does not rewrite the past.0–999
giftPlacementstringOne of: SUFFICIENT_BALANCE INSUFFICIENT_BALANCE
customFieldsobjectany keys

Response · 201

application/json

statusCodenumberrequiredexample 201
messagestringrequired—
dataobject—
Errors400401403429500
curl -X POST "https://your-school.rist.pro/api/student/subscription" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "studentId": 1,
    "subscriptionId": 1,
    "typeOfBill": "SEPARATE",
    "typeOfLessonIds": [
      1
    ],
    "subjectIds": [
      1
    ],
    "dateStart": "string",
    "dateEnd": "string",
    "note": "string",
    "giftLessons": 0,
    "giftPlacement": "SUFFICIENT_BALANCE",
    "customFields": {}
  }'
Response example · 201
{
  "statusCode": 201,
  "message": "Operation completed successfully",
  "data": {}
}
PATCH

Edit student subscription

/api/student/subscription/{id}

Rewrite a student subscription. Send the full body as in POST /api/student/subscription, not only changed fields. There is no archive action: a subscription is archived once dateEnd has passed, so archive or restore it by changing dateEnd. Affects charges and balances; confirm with the user first.

update_student_subscription

Path parameters · 1

idnumberrequired—

Request body

application/json · object

studentIdnumberrequiredmin 1
subscriptionIdnumberrequiredmin 1
typeOfBillstringrequiredOne of: SEPARATE BURNED
typeOfLessonIdsnumber[]requiredmin 1 · items min 1
subjectIdsnumber[]requiredmin 1 · items min 1
dateStartstringrequirednullable—
dateEndstringrequirednullable—
notestringrequirednullablelength max 1500
giftLessonsnumberGift lessons this subscription grants, on top of the tariff's lessons. A plan, not a remainder: used ones are counted from charges, so editing it later does not rewrite the past.0–999
giftPlacementstringOne of: SUFFICIENT_BALANCE INSUFFICIENT_BALANCE
customFieldsobjectany keys

Response · 200

application/json

statusCodenumberrequiredexample 200
messagestringrequired—
dataobject—
Errors400401403429500
curl -X PATCH "https://your-school.rist.pro/api/student/subscription/1" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "studentId": 1,
    "subscriptionId": 1,
    "typeOfBill": "SEPARATE",
    "typeOfLessonIds": [
      1
    ],
    "subjectIds": [
      1
    ],
    "dateStart": "string",
    "dateEnd": "string",
    "note": "string",
    "giftLessons": 0,
    "giftPlacement": "SUFFICIENT_BALANCE",
    "customFields": {}
  }'
Response example · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {}
}
PATCH

Add gift lessons

/api/student/subscription/gift-lessons/{id}

Add free lessons to a student subscription: giftLessons is how many to add, not the new total, so every call adds more. Not for the base or cashback bills. Confirm with the user first.

add_gift_lessons

Path parameters · 1

idnumberrequired—

Request body

application/json · object

giftLessonsnumberrequired1–999

Response · 200

application/json

statusCodenumberrequiredexample 200
messagestringrequired—
dataobject—
Errors400401403429500
curl -X PATCH "https://your-school.rist.pro/api/student/subscription/gift-lessons/1" \
  -H "Authorization: Bearer $RIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "giftLessons": 1
  }'
Response example · 200
{
  "statusCode": 200,
  "message": "Operation completed successfully",
  "data": {}
}