Skip to main content

UpdateUser

Overview

Updates a single User that is already in the system. Returns Success/Error code.

Request Information


Method

POST - api/Person/UpdateUser

URI Parameters

None.

Body Parameters

NameDescriptionTypeAdditional information
UserIdRequired: The PK of the existing User that you want to update.globally unique identifierNone.
FirstNameRequired: The User's first/given name. Max Length = 60stringNone.
LastNameRequired: The User's last name / surname. Max Length = 60stringNone.
MiddleInitialOptional: The User's middle initial. Max Length = 2stringNone.
sGenderIdOptional: 1=Female, 2=Male, 3=UnspecifiedintegerNone.
DefaultFloorIdOptional: Usually the Floor that the person's desk/primary workplace is on.globally unique identifierNone.
DefaultFloorStopIdOptional: Default Floor Stop in elevator that the person will go to when using Destination elevator systems.integerNone.
FacilityIdRequired: PK of the facility that the User is located in. Retrieve possible values by calling /Facility/GetAllFacilitysglobally unique identifierNone.
CompanyInstanceTypeRequired: The type of company instance that the User belongs to - 1 = Occupancy, 2 = Vendor, 3 = System Owner, 4 = IntegratorintegerNone.
CompanyInstanceIdRequired: The PK of the company instance the User will be assigned to. Retrieve this by calling /Occupancy/GetAllOccupancies, /Vendor/GetAllVendors, /SystemOwner/GetAllOwners, or Integrator/GetAllIntegrators based on the CompanyInstanceType.globally unique identifierNone.
ACSystemIdRequired: The PK of the Access Control System the User will be assigned to. Retrieve this by calling /ACSystem/GetAllSystemsglobally unique identifierNone.
StartDatetimeOptional: The DateTime when the record will start to be valid. If null, the record will be active immediately.dateNone.
EndDatetimeOptional: The DateTime when the record will stop being valid. If null, the record will be active indefinitely.dateNone.
AccessRightsSuspendedRequired: Whether or not the User's Access Rights are suspendedbooleanNone.
AccessRightsSuspendedStartOptional: The DateTime when the User's Access Rights will become suspended. If null and AccessRightsSuspended is true, all access will be suspended immediately.dateNone.
AccessRightsSuspendedEndOptional: The DateTime when the User's Access Rights will stop being suspended. If null and AccessRightsSuspended is true, access will be suspended indefinitely.dateNone.
WebSiteRightsSuspendedRequired: Whether or not the User's BluSKY login is suspendedbooleanNone.
WebSiteRightsSuspendedStartOptional: The DateTime when the User's BluSKY login will become suspended. If null and WebSiteRightsSuspended is true, all BluSKY access will be suspended immediately.dateNone.
WebSiteRightsSuspendedEndOptional: The DateTime when the User's BluSKY login will become suspended. If null and WebSiteRightsSuspended is true, all BluSKY access will be suspended immediately.dateNone.
BadgeTemplateIdOptional: The PK of the Badge Template assinged to the User. Retrieve this by calling /Badges/GetAllBadgesglobally unique identifierNone.
EmployeeNumberOptional: The employee number assigned to the User (typically by their HR department)stringNone.
HasLoginRightsRequired: Whether or not the User should have a login and passwordbooleanNone.
LoginConditional: Required if HasLoginRights is truestringNone.
PasswordConditional: Required if HasLoginRights is truestringNone.

JSON

{
"UserId": "5e237665-1831-45c2-b7e5-860b7604a9b1",
"FirstName": "sample string 2",
"LastName": "sample string 3",
"MiddleInitial": "sample string 4",
"sGenderId": 1,
"DefaultFloorId": "b54d3578-c722-40b5-a62c-50be04fc3d96",
"DefaultFloorStopId": 1,
"FacilityId": "5b6b93c4-e027-4b2e-992a-e2c04f76919b",
"CompanyInstanceType": 5,
"CompanyInstanceId": "e14f15f3-d14c-4c6f-b1d0-bc52e509e989",
"ACSystemId": "a5630ddd-c2fd-4690-b4c0-29767f55aa56",
"StartDatetime": "2016-12-13T23:32:17.2734234-05:00",
"EndDatetime": "2016-12-13T23:32:17.2734234-05:00",
"AccessRightsSuspended": true,
"AccessRightsSuspendedStart": "2016-12-13T23:32:17.2734234-05:00",
"AccessRightsSuspendedEnd": "2016-12-13T23:32:17.2734234-05:00",
"WebSiteRightsSuspended": true,
"WebSiteRightsSuspendedStart": "2016-12-13T23:32:17.2734234-05:00",
"WebSiteRightsSuspendedEnd": "2016-12-13T23:32:17.2734234-05:00",
"BadgeTemplateId": "d57bbc03-86fa-47c6-a6e3-563dba81563b",
"EmployeeNumber": "sample string 9",
"HasLoginRights": true,
"Login": "sample string 11",
"Password": "sample string 12"
}

XML

<UpdateUserViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers">
<ACSystemId>a5630ddd-c2fd-4690-b4c0-29767f55aa56</ACSystemId>
<AccessRightsSuspended>true</AccessRightsSuspended>
<AccessRightsSuspendedEnd>2016-12-13T23:32:17.2734234-05:00</AccessRightsSuspendedEnd>
<AccessRightsSuspendedStart>2016-12-13T23:32:17.2734234-05:00</AccessRightsSuspendedStart>
<BadgeTemplateId>d57bbc03-86fa-47c6-a6e3-563dba81563b</BadgeTemplateId>
<CompanyInstanceId>e14f15f3-d14c-4c6f-b1d0-bc52e509e989</CompanyInstanceId>
<CompanyInstanceType>5</CompanyInstanceType>
<DefaultFloorId>b54d3578-c722-40b5-a62c-50be04fc3d96</DefaultFloorId>
<DefaultFloorStopId>1</DefaultFloorStopId>
<EmployeeNumber>sample string 9</EmployeeNumber>
<EndDatetime>2016-12-13T23:32:17.2734234-05:00</EndDatetime>
<FacilityId>5b6b93c4-e027-4b2e-992a-e2c04f76919b</FacilityId>
<FirstName>sample string 2</FirstName>
<HasLoginRights>true</HasLoginRights>
<LastName>sample string 3</LastName>
<Login>sample string 11</Login>
<MiddleInitial>sample string 4</MiddleInitial>
`````<Password>``````sample string 12</Password>
`<StartDatetime>`2016-12-13T23:32:17.2734234-05:00</StartDatetime>
`<UserId>`5e237665-1831-45c2-b7e5-860b7604a9b1</UserId>
`<WebSiteRightsSuspended>`true</WebSiteRightsSuspended>
`<WebSiteRightsSuspendedEnd>`2016-12-13T23:32:17.2734234-05:00</WebSiteRightsSuspendedEnd>
`<WebSiteRightsSuspendedStart>`2016-12-13T23:32:17.2734234-05:00</WebSiteRightsSuspendedStart>
<sGenderId>1</sGenderId>
</UpdateUserViewModel>

Response Information


Resource Description

Result

NameDescriptionTypeAdditional information
ResultCodeRepresents the result codeintegerNone.
DescriptionRepresents a description of the result codestringNone.

Response Formats

JSON

{
"ResultCode": 1,
"Description": "sample string 2"
}

XML

<Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers">
``````<Description>`````sample string 2</Description>
<ResultCode>1</ResultCode>
</Result>