Answers to the questions most often asked by people who build student enrolment via API v4 (e.g. from a website or from Make.com). Field details and request examples are in your school's API documentation – see Where can I find the API documentation?

Are installments created automatically after I add a student to a group via the API?#

Yes, in the same cases as when you assign a student to a group in the panel. After POST /groups/{id}/students, regardless of the chosen status (assignType, e.g. booked or assigned), the system:

  • creates installments from the group's installment schedule (the installmentCollectionId field) if the group has a schedule and the "Assigning payment scheme to a group" option is turned on in the system settings – the amounts and due dates are the same as in the schedule, with the student's discounts applied,
  • otherwise, in a group billed for the whole course (billing.model = whole), creates one installment for the course price – but only if the student has no installments in this group yet,
  • in a group billed hourly in advance (hour-in-advance) does not create installments,
  • if the group has a contract template assigned (documentTemplateId), also creates the student's contract.

If the system has created installments by itself (as above) and you also create installments with POST /groups/{id}/students/{studentId}/installments, the student will have them twice. Before you add your own installments, check the list: GET /groups/{id}/students/{studentId}/installments.

Does a student joining a group that has already started get installments only for the remaining classes?#

Not when added via the API. Installments from the schedule have the full amounts from the schedule, and the single installment in a group billed for the whole course has the full course price. The API has no equivalent of "Generate installments" (also with the "Advanced" option and the enrolment date). If the amount should be lower, change the installments with PATCH /groups/{id}/students/{studentId}/installments/{installmentId} or generate them in the panel.

Where does the API return the course price from the group settings?#

In the GET /groups/{id} response, in the price field – this is the "Course price" from the group settings. In a group billed for the whole course, the same value is also in billing.price. In groups billed hourly, billing.price is the unit price (per class), not the course price. The company rate is returned in companyPrice.

How do I check via the API whether an installment is paid?#

Get the installment: GET /groups/{id}/students/{studentId}/installments (list) or …/installments/{installmentId} (one installment). The value field is the installment amount and paidValue is how much of it has been paid. The installment is paid when paidValue equals value.

API v4 webhooks have no event for a payment or an installment. The available events are: student.created, student.activated, student.registered, lesson.status.changed, lesson.attendance.changed, studentInGroup.assignType.modified, studentInGroup.attendance.checked and document.signed. So check the payment status periodically through the list of installments.

No – API v4 does not return a payment link for an installment. The student pays in their panel: in the payments tab they click "Pay online" and choose the installments. When PayU processes the payment, the system adds a transaction to the student by itself and the installment is marked as paid – in the API you will see it in the paidValue field. To turn on PayU payments, see PayU.

Does a student added via the API get login details for the student panel?#

No – creating a student (POST /students) or adding them to a group does not send them login details. You set the login and password with PATCH /students/{id}/access (the login, password or oneTimePassword: true fields – a one-time password), and you read the current login with GET /students/{id}/access. Pass the details to the student yourself or send them from the panel – see How can I provide access details to a student.

What permissions does the API key user need?#

API keys work with the permissions and departments of the user who generated them (more in the API article). The endpoints for students, their panel access and installments (/students…, /groups/{id}/students/{studentId}/installments…) require the students permission, and the endpoints for groups and assigning a student to a group (/groups…, /groups/{id}/students) require the groups permission. The integration user also needs access to the departments where these groups and students are.

Send technical questions about the API to developer@langlion.com.