Skip to main content

Users

TypeBase PathTrigger Name
REST resource~{realm}/users/users

This resource holds all users (administrators, cashiers, employees, etc.) in the realm.

Endpoints

NameMethodRelative PathPayloadResponseDescription
addUserPOST~{realm}/users/UserStored_UserAdds a new user to the list.
listUsersGET~{realm}/users/N/AStored_User[]Retrieves a list of users.
getUserGET~{realm}/users/{id}N/AStored_UserRetrieves a user.
putUserPUT~{realm}/users/{id}UserStored_UserReplaces a user.
updateUserPATCH~{realm}/users/{id}Partial_UserStored_UserUpdates specified user fields.
removeUserDELETE~{realm}/users/{id}N/AN/ADeletes a user.

Permissions

PermissionDescription
edit-personal-infoClient is allowed to modify the name, alias, email, pin and password properties of the currently authorized user (assuming there is one).
edit-usersClient is allowed to add new users and to modify or delete existing users.
show-usersClient is allowed to query the user list and to fetch individual users.

Entities

Interface User

namespace User {
type SystemRole = 'admin' | 'cashier' | 'service' | 'employee';
}

interface User {
'name': string;
'alias': string;
'identity-number'?: string;
'email': string;
'pin'?: Base64String;
'password'?: Base64String;
'demon'?: boolean;
'system-roles'?: User.SystemRole[];
'roles'?: number[];
'id'?: number;
'created'?: DateTime;
'updated'?: DateTime;
'deleted'?: DateTime;
'updated-by'?: number;
'updated-from'?: number;
'tags'?: string[];
'labels'?: number[];
}
PropertyData TypeDescription
nameStringName of user.
aliasStringUser alias ("login name").
identity-numberString?User's identification number ("personnummer" in Sweden).
emailStringUser's email address.
pinBase64String?PIN key, derived from a PIN code (see Authentication & Authorization).
passwordBase64String?Password key, derived from a password (see Authentication & Authorization).
demonBoolean?true if user is a global super-user.
system-rolesUser.SystemRole[]?List of system roles user is a member of. Some system roles comes with a predefined list of permissions (and some don't).
rolesInt64[]?List of custom roles this user is a member of.
idInt64?The resource ID of this entity.
createdDateTime?Date and time when this entity was first created.
updatedDateTime?Date and time when this entity was last modified.
deletedDateTime?Date and time when this entity was deleted.
updated-byInt64?ID of User who last modified this entity.
updated-fromInt64?ID of Till (trusted device) which last modified this entity.
labelsInt64[]?A list of Label IDs associated with this entity.