Skip to end of metadata
Go to start of metadata

Users are actually persons in the portal. For every student, teacher or parent there is a user object which contains the name and login information.

Fields

Field

Type

Description

code

string

The identifier for the user. For students this is usually their student ID, for teachers this is their scheduling code/abbreviation.

password

string

The (write-only) plaintext password the user can login with

roles

list of strings

The roles that have been assigned to this user

firstName

string

The first (given) name of a user

prefix

string

Part of the last name of the user that is not used for sorting. This is the Dutch "tussenvoegsel" or "voorvoegsel"

lastName

string

The last name of the user. Should be combined with the prefix if there is any in the order prefix lastName

email

string

The email address of the user

usernamestringThe extra username for this user. If this is specified the user can use this as a username instead of their code.

Query parameters

If you have sufficient permissions you can search on all available fields. In addition, you can use these query parameters:

ParameterTypeExampleDescription
isStudentboolean?isStudent=trueReturns all students.
isFamilyMemberboolean?isFamilyMember=trueReturns all parents/family members.
isEmployeeboolean?isEmployee=trueReturns all employees/teachers.
schoolInSchoolYearinteger id?schoolInSchoolYear=1234Returns all users associated with a certain project.

Example

Example for an user named "Jan van Vliet".

{
  "code" : "173906",
  "password": "hunter2",
  "roles" : ["leerling", "tc"],
  "firstName": "Jan",
  "prefix": "van",
  "lastName": "Vliet",
  "email": "jvanvliet@example.com"
}

If we want to change something we can use the following HTTP PUT:

$ curl 'https://example.zportal.nl/api/v2/users/173906' -X PUT -H 'Authorization: Bearer <access_token>' -H 'Content-Type: application/json; charset=UTF-8' --data-binary $'{"code":"173906", "firstName":"Jan", "prefix":"van", "lastName":"Vliet", "email":"jvanvliet@example.com", "ldap":false, "hasPassword":true, "roles":["leerling"], "password":"hunter2", "username":null, "userPrincipalName":null, "street":"Straat", "houseNumber":"52", "postalCode":"1234 AB", "city":"Stad"}'
  • No labels