Click or drag to resize

ServiceRouterDeleteUser Method

**BETA**
Deletes a list of users by its EmpIDList and returns a list of DeleteResult status structures

Namespace: AppOne.Services.V2
Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax
public DeleteUserOut DeleteUser(
	DeleteUserIn input
)

Parameters

input  DeleteUserIn
A new DeleteUserIn object

Return Value

DeleteUserOut
A list of DeleteResult status structures
Remarks
Deletes a list of users by its EmpIDList and returns a list of DeleteResult status structures. The structures give a status for each of the EmpIDList items passed in. To get a list of EmpIds use the GetUserBasic(GetUserBasicIn) endpoint.

Caution note  Caution
A user can only be deleted if they have no associated data with either time punches or pay adjustment data. If the user does have associated data then that associated data will need to be removed before the user can be deleted.

This endpoint currently takes in a list of EmployeeIds and the valid range count for EmpId items is between 1 and 10. An EmpId item list count outside of that range will throw a service exception message.

The ID returned as part of the DeleteResult struct is the UserID key. This is an internal id used to track a user. The UserID is correlated but still a different key from EmpID. The EmpID represents a clients internal key used to identify a user in the remote system.
Example
JSON Request
{
    "AuthToken":"...",
    "EmpIDList":["113", "3539", "115"],
}
JSON Response
{
   "Report":    {
      "APIVersion": "2.0",
      "ProcessTime": "0.8180067",
      "RequestTime": "/Date(1579551995788-0700)/",
      "ResponseTime": "/Date(1579551996606-0700)/",
      "Results": 3
   },
   "Results":    [
            {
         "ID": -1,
         "IsDeleted": false,
         "Message": "WARN: No EmpID with value '113' found!",
         "Status": 2
      },
            {
         "ID": 2,
         "IsDeleted": false,
         "Message": "WARN: Unable to delete user with EmpID '3539'.  This employee has data in the system and can not be deleted until it is removed!",
         "Status": 3
      },
            {
         "ID": 2311,
         "IsDeleted": true,
         "Message": "PASS: User successfully deleted with EmpID '115'",
         "Status": 1
      }
   ]
}
See Also