Skip to main content

AddUser

Overview

Adds a single User to the system. Returns Success/Error code plus primary key of user added.

Request Information


Method

POST - api/Person/AddUser

URI Parameters

None.

Body Parameters

AddUserViewModel

NameDescriptionTypeAdditional information
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/GetAllFacilitiesglobally 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

{
"FirstName": "sample string 1",
"LastName": "sample string 2",
"MiddleInitial": "sample string 3",
"sGenderId": 1,
"DefaultFloorId": "f292df8e-d7f7-49a5-91ec-9924ea146e30",
"DefaultFloorStopId": 1,
"FacilityId": "51c1aa5c-4e2f-4033-8174-3736816cb4a3",
"CompanyInstanceType": 4,
"CompanyInstanceId": "d0978299-921c-4138-b458-6df0e7a6f8c0",
"ACSystemId": "285c612d-3ae9-4248-a4a9-b4af5d5e273d",
"StartDatetime": "2016-12-13T23:32:15.220453-05:00",
"EndDatetime": "2016-12-13T23:32:15.220453-05:00",
"AccessRightsSuspended": true,
"AccessRightsSuspendedStart": "2016-12-13T23:32:15.220453-05:00",
"AccessRightsSuspendedEnd": "2016-12-13T23:32:15.220453-05:00",
"WebSiteRightsSuspended": true,
"WebSiteRightsSuspendedStart": "2016-12-13T23:32:15.2244483-05:00",
"WebSiteRightsSuspendedEnd": "2016-12-13T23:32:15.2244483-05:00",
"BadgeTemplateId": "e1f9369b-6225-4da5-96c8-f07966533519",
"EmployeeNumber": "sample string 8",
"HasLoginRights": true,
"Login": "sample string 10",
"Password": "sample string 11"
}

XML

<AddUserViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers">
<ACSystemId>285c612d-3ae9-4248-a4a9-b4af5d5e273d</ACSystemId>
<AccessRightsSuspended>true</AccessRightsSuspended>
<AccessRightsSuspendedEnd>2016-12-13T23:32:15.220453-05:00</AccessRightsSuspendedEnd>
<AccessRightsSuspendedStart>2016-12-13T23:32:15.220453-05:00</AccessRightsSuspendedStart>
<BadgeTemplateId>e1f9369b-6225-4da5-96c8-f07966533519</BadgeTemplateId>
<CompanyInstanceId>d0978299-921c-4138-b458-6df0e7a6f8c0</CompanyInstanceId>
<CompanyInstanceType>4</CompanyInstanceType>
<DefaultFloorId>f292df8e-d7f7-49a5-91ec-9924ea146e30</DefaultFloorId>
<DefaultFloorStopId>1</DefaultFloorStopId>
<EmployeeNumber>sample string 8</EmployeeNumber>
<EndDatetime>2016-12-13T23:32:15.220453-05:00</EndDatetime>
<FacilityId>51c1aa5c-4e2f-4033-8174-3736816cb4a3</FacilityId>
<FirstName>sample string 1</FirstName>
<HasLoginRights>true</HasLoginRights>
<LastName>sample string 2</LastName>
<Login>sample string 10</Login>
<MiddleInitial>sample string 3</MiddleInitial>
`````<Password>``````sample string 11</Password>
`<StartDatetime>`2016-12-13T23:32:15.220453-05:00</StartDatetime>
`<WebSiteRightsSuspended>`true</WebSiteRightsSuspended>
`<WebSiteRightsSuspendedEnd>`2016-12-13T23:32:15.2244483-05:00</WebSiteRightsSuspendedEnd>
`<WebSiteRightsSuspendedStart>`2016-12-13T23:32:15.2244483-05:00</WebSiteRightsSuspendedStart>
<sGenderId>1</sGenderId>
</AddUserViewModel>

Response Information


Resource Description

ResultWithGuid

NameDescriptionTypeAdditional information
ResultCodeRepresents the result codeintegerNone.
DescriptionRepresents a description of the result codestringNone.
ValueRepresents the PK value that was created as a result of an addglobally unique identifierNone.

Response Formats

JSON

{
"ResultCode": 1,
"Description": "sample string 2",
"Value": "c6dd24f1-2db5-4ba4-ba27-1f23e22b6cf3"
}

XML

<ResultWithGuid 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>
`<Value>`c6dd24f1-2db5-4ba4-ba27-1f23e22b6cf3</Value>
</ResultWithGuid>