AddUser
Overview
Request Information
Method
POST - api/Person/AddUser
URI Parameters
None.
Body Parameters
AddUserViewModel
Name | Description | Type | Additional information |
---|---|---|---|
FirstName |
Required: The User's first/given name. Max Length = 60 |
string |
None. |
LastName |
Required: The User's last name / surname. Max Length = 60 |
string |
None. |
MiddleInitial |
Optional: The User's middle initial. Max Length = 2 |
string |
None. |
sGenderId |
Optional: 1=Female, 2=Male, 3=Unspecified |
integer |
None. |
DefaultFloorId |
Optional: Usually the Floor that the person's desk/primary workplace is on. |
globally unique identifier |
None. |
DefaultFloorStopId |
Optional: Default Floor Stop in elevator that the person will go to when using Destination elevator systems. |
integer |
None. |
FacilityId |
Required: PK of the facility that the User is located in. Retrieve possible values by calling /Facility/GetAllFacilities |
globally unique identifier |
None. |
CompanyInstanceType |
Required: The type of company instance that the User belongs to - 1 = Occupancy, 2 = Vendor, 3 = System Owner, 4 = Integrator |
integer |
None. |
CompanyInstanceId |
Required: 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 identifier |
None. |
ACSystemId |
Required: The PK of the Access Control System the User will be assigned to. Retrieve this by calling /ACSystem/GetAllSystems |
globally unique identifier |
None. |
StartDatetime |
Optional: The DateTime when the record will start to be valid. If null, the record will be active immediately. |
date |
None. |
EndDatetime |
Optional: The DateTime when the record will stop being valid. If null, the record will be active indefinitely. |
date |
None. |
AccessRightsSuspended |
Required: Whether or not the User's Access Rights are suspended |
boolean |
None. |
AccessRightsSuspendedStart |
Optional: The DateTime when the User's Access Rights will become suspended. If null and AccessRightsSuspended is true, all access will be suspended immediately. |
date |
None. |
AccessRightsSuspendedEnd |
Optional: The DateTime when the User's Access Rights will stop being suspended. If null and AccessRightsSuspended is true, access will be suspended indefinitely. |
date |
None. |
WebSiteRightsSuspended |
Required: Whether or not the User's BluSKY login is suspended |
boolean |
None. |
WebSiteRightsSuspendedStart |
Optional: The DateTime when the User's BluSKY login will become suspended. If null and WebSiteRightsSuspended is true, all BluSKY access will be suspended immediately. |
date |
None. |
WebSiteRightsSuspendedEnd |
Optional: The DateTime when the User's BluSKY login will become suspended. If null and WebSiteRightsSuspended is true, all BluSKY access will be suspended immediately. |
date |
None. |
BadgeTemplateId |
Optional: The PK of the Badge Template assinged to the User. Retrieve this by calling /Badges/GetAllBadges |
globally unique identifier |
None. |
EmployeeNumber |
Optional: The employee number assigned to the User (typically by their HR department) |
string |
None. |
HasLoginRights |
Required: Whether or not the User should have a login and password |
boolean |
None. |
Login |
Conditional: Required if HasLoginRights is true |
string |
None. |
Password |
Conditional: Required if HasLoginRights is true |
string |
None. |
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
Name | Description | Type | Additional information |
---|---|---|---|
ResultCode |
Represents the result code |
integer |
None. |
Description |
Represents a description of the result code |
string |
None. |
Value |
Represents the PK value that was created as a result of an add |
globally unique identifier |
None. |
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>