It is a common use-case of the API to synchronize the students with an external system.
To add a new student to the portal, perform the following steps:
- Create a user through the users endpoint (using a POST), with optionally the required role. (note that we're phasing out roles, always check if you can grant the student the required permissions through the "schoolfunctions" method).
- Create a student through the students endpoint. If you don't know the department (dutch: afdeling) of the student, from portal version 1.13.0 you can use the intakeProjects field to link the student to a project (schoolInSchoolYear). It wil show up on the intake (dutch: instroom) page.
- If you know the department of the student, you can create a studentInDepartment through the studentindepartments endpoint.
- If you already know the maingroup (dutch: stamklas/stamgroep) of the student, you can use the field mainGroup of the studentInDepartment to set it. Note that you will need to retrieve the id from the groupInDepartments endpoint.
- You can change any of the fields of a user, student or studentindepartment you created earlier using a POST request. Note that you can't change the department of a studentindepartment, you'll need to create a new object to achieve this.
- If someone has left the school, it is best to just archive the user. This can be done by using a POST on users with the code and archived: true. All data on the student will be retained, but he/she will no longer be able to login.