Skip to main content
Version: 5.5

User Profile Service

This service provides methods to manipulate staff profiles in TimePunch.

CreateNewUserProfile

Using this method, you can create a new employee profile in TimePunch. This requires only a few details. As a result, the core permissions will be returned of the employee.

UserProfileRightsDto CreateNewUserProfile(
out TpFault fault,
TpAuthentication authentication,
string userName,
Guid? copyFromUserId,
Guid? teamId,
Guid? departmentId,
Guid? branchId,
string[] applicationKeys,
bool directLogon,
out List<string> permissions);
Needed Permission---
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication with proposed logon and password information
userNameFore –and sure name of the user that shall be created
copyFromUserIdNULL, if no defaults shall be copied or a valid user id, if the e.g. the worktime settings shall be copied.
teamIdNULL, if the user shall not be added to an existing team – otherwise the Id of the existing team.
departmentIdNULL, if the user shall not be added to an existing department – otherwise the Id of the existing department.
branchIdNULL, if the user shall not be added to an existing branch – otherwise the Id of the existing branch.
applicationKeysThe applications for that the user shall be created.
directLogonTrue, if the user shall be directly licensed. False, if the user shall only be created, but need not to be registered directly.
PermissionsOutList that contains the permissions of the newly created user.
return valueObject that contains the core user data and the permissions.

InitializeUserProfiles

This method initialises an employee profile in TimePunch. The initialisation sets a new password for the employee, licences are assigned and, if no time entry exists yet, a new dummy time entry is created when the employee starts.

void InitializeUserProfiles(
out TpFault fault,
TpAuthentication authentication,
InitializeUserProfileDto initializeDto);
Needed PermissionuserProfiles@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication with proposed logon and password information
initializeDtoThe data object that contains the user profile ids, the license information and start date of the users to initialize

DeleteUserProfileDataOlderThan

You can use this method to delete time data from existing user profiles. For this purpose, the delete method is given a period of years. Time data that is older than the specified number of years is deleted from the transferred profiles.

void DeleteUserProfileDataOlderThan(
out TpFault fault,
TpAuthentication authentication,
int olderThanYears,
Guid[] userIds);

Note: Only fully completed years are considered.

This means that if data older than 1 year is to be deleted in May 2018, the data will be deleted by 31.12.2016.

Needed Permissiondsgvo@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
olderThanYearsSpecifies the amount of years to look back in time
userIdsUser ids for that the data shall be deleted.

DownloadProfileImages

This method loads the profile images of specified TimePunch profiles.

List<UserProfileImageDto> DownloadProfileImages(
out TpFault fault,
TpAuthentication authentication,
ImageFormat imageFormat,
Guid[] userIds);
Needed Permissioncore@logon (if server logon is with username)
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
imageFormatThe image format (e.g. max size) the user profiles shall be returned. Valid values are: Thumbnail16, Thumbnail24, Thumbnail32, Thumbnail64, Thumbnail128, Thumbnail256, Thumbnail512, Portrait300X400, Portrait512X682, Portrait600X800, Portrait768X1024, Portrait900X1200
Return valueList containing the profile images for the given profiles.

ExportUserProfileData

This method exports the profile data of selected employees. The search is used for this purpose.

List<UserProfileDataDto> ExportUserProfileData(  
out TpFault fault,
TpAuthentication authentication,
UserSearchDto search);
Needed PermissionuserProfiles@export
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
UserSearchDtoThe search object that is used to find the profiles to export.
Return valueList containing the profile data for the found profiles.

ImportUserProfileData

This method imports the profile data of the passed-employees. The logon is crucial for the creation or update of the profiles.

List<UserProfileDataDto> ImportUserProfileData(  
out TpFault fault,
TpAuthentication authentication,
List<UserProfileDataDto> userProfiles);
Needed PermissionuserProfiles@import
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
userProfilesList containing the profile data that shall be imported.
Return valueList containing the profile data that has been imported.

LoadUserProfileDefaults

The method returns the default values for the specified employee profiles. Those values serve the internal logic of the calculation (flexible working hours / holidays) as offset or underlying.

List<UserProfileDefaultsDto> LoadUserProfileDefaults(  
out TpFault fault,
TpAuthentication authentication,
Guid[] userIds);
Needed PermissionuserProfiles@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
userIdsThe user ids of the members from which the profile defaults shall be loaded
Return valueList with default profile information of the specified users.

LoadUserProfileDetails

This method loads the detailed information about the employee profile.

List<UserProfileDetailsDto> LoadUserProfileDetails(  
out TpFault fault,
TpAuthentication authentication,
Guid[] userIds);
Needed PermissionuserProfiles@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
userIdsThe user ids of the members from which the profile details shall be loaded
Return valueList with detailed profile information of the specified users.

LoadUserProfileRights

This method loads the permissions of the specified employee profiles.

List<UserProfileRightsDto> LoadUserProfileRights(  
out TpFault fault,
TpAuthentication authentication,
Guid[] userIds);
Needed Permissionpermissions@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
userIdsThe user ids of the members from which the permissions shall be loaded
Return valueList with profile permission information of the specified users.

LoadUserProfileSensitive

This method loads relevant and sensitive employee data from the transferred employee profiles. The data can only be read out by users with the appropriate authorization and only if the employees are present in the user³s coverage.

List<UserProfileSensitiveDto> LoadUserProfileSensitive(  
out TpFault fault,
TpAuthentication authentication,
Guid[] userIds)
Needed PermissionuserSensitive@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
userIdsThe user ids of the members from which the sensitive data shall be loaded
Return valueList with sensitive information of the specified users.

SaveUserProfileDefaults

This method updates the default values for the specified employee profiles. This works only, if still no monthly closing has been done for the profiles. The SaveUserProfileDetails method must be used to update basic data.

List<UserProfileDefaultsDto> SaveUserProfileDefaults(  
out TpFault fault,
TpAuthentication authentication,
List<UserProfileDefaultsDto> defaults);
Needed PermissionuserProfiles@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
detailsList containing the profile defaults that shall be updated.
Return valueList containing the profile defaults that has been updated.

SaveUserProfileDetails

This method updates the profile information for one or more employees.

List<UserProfileDetailsDto> SaveUserProfileDetails(  
out TpFault fault,
TpAuthentication authentication,
List<UserProfileDetailsDto> details);
Needed PermissionuserProfiles@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
detailsList containing the profile data that shall be updated.
Return valueList containing the profile data that has been updated.

SaveUserProfileRights

This method updates the rights of the specified employee profiles. The SaveUserProfileDetails method must be used to update basic data.

List<UserProfileRightsDto> SaveUserProfileRights(  
out TpFault fault,
TpAuthentication authentication,
List<UserProfileRightsDto> rights);
Needed Permissionpermissions@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
detailsList containing the profile rights that shall be updated.
Return valueList containing the profile rights that has been updated.

SaveUserProfileSensitive

This method stores employee information relevant to data protection. The data can only be stored by users with appropriate authorization and only if the employees are present in the user's coverage.

List<UserProfileSensitiveDto> SaveUserProfileSensitive(  
out TpFault fault,
TpAuthentication authentication,
List<UserProfileSensitiveDto> sensitive);
Needed PermissionuserSensitive@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
sensitiveList containing the sensitive user data that shall be updated.
Return valueList containing the profile rights that has been updated.

SearchUserProfilesToDelete

This method searches for user profiles that contain data that is older than the specified time in years. The profiles found can serve as a basis for the method DeleteUserProfileDataOlderThan.

List<UserDSGVOInfoDto> SearchUserProfilesToDelete(

out TpFault fault,

TpAuthentication authentication,

int olderThanYears,

UserSearchDto userSearchDto);
Needed Permissiondsgvo@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
olderThanYearsSpecifies the amount of years to look back in time
userSearchDtoSearch definition used to search the user profiles

UploadProfileImage

This method updates the profile pictures for the given employee profiles.

void UploadProfileImage(

out TpFault fault,

TpAuthentication authentication,

UserProfileImageDto[] profileImages);
Needed PermissionuserProfiles@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
profileImagesList containing the profile images that shall be updated.