Delete user

deleteUser(p_companyID, p_Id, p_locationID)

 

You can use this endpoint to delete one user from our software.

Parameters

Name Type Required Description
p_companyID string Yes The security code you have been provided with, string (32)
p_Id integer Yes The Id of the user from the EasySecure database
p_locationID integer No Required only in case the company is Branch.

Return values

NO_ID_RECEIVED - i case no p_ID is provided.

ERROR_UNKNOWN_SECURITY_HASH – no company found based on the security hash used as parameter

ERROR_NO_SECURITY_HASH – no security hash has been provided when the call was made

USER_WAS_NOT_FOUND - user was not found based on the p_Id provided.

Company is Branches but no location has been provided: The location id is required for branch Type companies to be sure we do not delete the user if he is linked to multiple locations.

User has been deleted: The user and his details have been removed from the database.

User does not exist in our db: User with provided id doesn't exist anymore in our database.

User is linked to multiple locations, we will remove the user from this location: User is linked to multiple locations in a Branch type company. We will remove the user only from that location and the groups associated with that location.

NOTE*

When the user is deleted, we also add flags for each of modules the user had access to and during the next syncronization (overwrite or delete sync) the user will also be removed from those modules.

Sample

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uen="uen:esws">
<soapenv:Header/>
<soapenv:Body>
<uen:Esws.deleteUser soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<p_companyID xsi:type="xsd:string">^4p;tU0Q+#dEIhTWkuj5FnLD^aKWqVu0</p_companyID>
<p_Id xsi:type="xsd:string">1</p_Id>
<p_locationID xsi:type="xsd:string"></p_locationID>
</uen:Esws.deleteUser>
</soapenv:Body>
</soapenv:Envelope>

Response

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:Esws.deleteUserResponse xmlns:ns1="uen:esws">
<return xsi:type="xsd:string">User has been deleted</return>
</ns1:Esws.deleteUserResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>