POST api/v2/Users
Adds a single User to the system. Returns Success/Error code plus primary key of user added.
Request Information
URI Parameters
None.
Body Parameters
AddUserViewModelName | Description | Type | Additional information |
---|---|---|---|
FirstName |
Required: The User's first/given name. Max Length = 60 |
string |
Required Max length: 60 |
LastName |
Required: The User's last name / surname. Max Length = 60 |
string |
Required Max length: 60 |
MiddleInitial |
Optional: The User's middle initial. Max Length = 2 |
string |
Max length: 2 |
Nickname |
Represents the User's nickname |
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 |
Required |
CompanyInstanceType |
Required: The type of company instance that the User belongs to - 1 = Occupancy, 2 = Vendor, 3 = System Owner, 4 = Integrator |
integer |
Required |
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 |
Required |
ACSystemId |
Required: The PK of the Access Control System the User will be assigned to. Retrieve this by calling /ACSystem/GetAllSystems |
globally unique identifier |
Required |
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. |
GenerateWelcomeMessage |
Optional: True to send a welcome email message |
boolean |
None. |
Deleted |
Optional: True to create/update User as deleted |
boolean |
None. |
JobTitle |
Optional: Job Title |
string |
None. |
OccupancyName |
Represents an Occupancy a User belongs to. If specified, ACSystemId and FacilityId can be omited as well as a CompanyInstanceId when CompanyInstanceType = 1 |
string |
None. |
UserUDFValueViewModels |
Optional : User Defined Values while creating a new user in BluSky |
Collection of UserUDFValueViewModel |
None. |
DepartmentName |
Optional : The name of the department the person belgons to |
string |
None. |
DepartmentCode |
Optional : The Code of the department the person belgons to |
string |
None. |
PronounId |
Optional : The pronoun the person needs to be called as. Example : He/Him/His Or They/Them/Theirs She/Her/Hers Or They/Them/Theirs She/Her/Hers He/Him/His They/Them/Theirs To Fetch Pronouns : api/v1/Pronouns |
globally unique identifier |
None. |
WorkEnvironmentTypeId |
Optional : Determines the Employment Type of the person, Example : Full time Remote, Hybrid etc. To Fetch WorkEnvironmentType : api/v1/WorkEnvironmentTypes |
globally unique identifier |
None. |
EmploymentTermId |
Optional : Determines whether the employment is Permenent or temporary |
EmploymentTerm |
None. |
WorkerTypeId |
Optional : Determines the type of work the person is going to be doing, example : Consultant, Contractor etc.. |
WorkerType |
None. |
OfficeDeskLocation |
Determines the location of the office desk |
string |
None. |
EmergencyContactName |
Determines the Name of the Person, whose contact is given as Emergency Contact. |
string |
None. |
EmergencyContactRelationship |
Determines the Relationship of the Person with user, whose contact is given as Emergency Contact. |
string |
None. |
EmergencyContactHomePhone |
Determines the Emergency Contact(Home) for a given user |
string |
None. |
EmergencyContactWorkPhone |
Determines the Emergency Contact(Work) for a given user |
string |
None. |
EmergencyContactMobilePhone |
Determines the Emergency Contact(Mobile) for a given user |
string |
None. |
Request Formats
application/json, text/json
{ "FirstName": "sample string 1", "LastName": "sample string 2", "MiddleInitial": "sample string 3", "Nickname": "sample string 4", "sGenderId": 1, "DefaultFloorId": "d1d979e5-5d6f-4b5b-95da-b507a5a4789f", "DefaultFloorStopId": 1, "FacilityId": "26948213-8888-4618-b886-c28ce4f16b56", "CompanyInstanceType": 5, "CompanyInstanceId": "ee1fd977-9444-49e0-8326-b0e9fb99e491", "ACSystemId": "8534a7be-b2ac-4dc4-880e-bf666ffad544", "StartDatetime": "2025-03-14T19:52:13.3795002+00:00", "EndDatetime": "2025-03-14T19:52:13.3795002+00:00", "AccessRightsSuspended": true, "AccessRightsSuspendedStart": "2025-03-14T19:52:13.3795002+00:00", "AccessRightsSuspendedEnd": "2025-03-14T19:52:13.3795002+00:00", "WebSiteRightsSuspended": true, "WebSiteRightsSuspendedStart": "2025-03-14T19:52:13.3795002+00:00", "WebSiteRightsSuspendedEnd": "2025-03-14T19:52:13.3795002+00:00", "BadgeTemplateId": "ae6b1e26-411e-4ae2-b160-58eb51febeed", "EmployeeNumber": "sample string 9", "HasLoginRights": true, "Login": "sample string 11", "Password": "sample string 12", "GenerateWelcomeMessage": true, "Deleted": true, "JobTitle": "sample string 15", "OccupancyName": "sample string 16", "UserUDFValueViewModels": [ { "UDFId": "a4e401fc-4103-4df1-829b-d564b070d9d7", "UDFValue": "sample string 2" }, { "UDFId": "a4e401fc-4103-4df1-829b-d564b070d9d7", "UDFValue": "sample string 2" } ], "DepartmentName": "sample string 17", "DepartmentCode": "sample string 18", "PronounId": "d85af40d-1d77-4e8e-be28-d56c9c5ffe70", "WorkEnvironmentTypeId": "f6536d04-18b0-4ae8-8adb-d1b96983aa30", "EmploymentTermId": 0, "WorkerTypeId": 0, "OfficeDeskLocation": "sample string 19", "EmergencyContactName": "sample string 20", "EmergencyContactRelationship": "sample string 21", "EmergencyContactHomePhone": "sample string 22", "EmergencyContactWorkPhone": "sample string 23", "EmergencyContactMobilePhone": "sample string 24" }
application/xml, text/xml
<AddUserViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <ACSystemId>8534a7be-b2ac-4dc4-880e-bf666ffad544</ACSystemId> <AccessRightsSuspended>true</AccessRightsSuspended> <AccessRightsSuspendedEnd>2025-03-14T19:52:13.3795002+00:00</AccessRightsSuspendedEnd> <AccessRightsSuspendedStart>2025-03-14T19:52:13.3795002+00:00</AccessRightsSuspendedStart> <BadgeTemplateId>ae6b1e26-411e-4ae2-b160-58eb51febeed</BadgeTemplateId> <CompanyInstanceId>ee1fd977-9444-49e0-8326-b0e9fb99e491</CompanyInstanceId> <CompanyInstanceType>5</CompanyInstanceType> <DefaultFloorId>d1d979e5-5d6f-4b5b-95da-b507a5a4789f</DefaultFloorId> <DefaultFloorStopId>1</DefaultFloorStopId> <Deleted>true</Deleted> <DepartmentCode>sample string 18</DepartmentCode> <DepartmentName>sample string 17</DepartmentName> <EmergencyContactHomePhone>sample string 22</EmergencyContactHomePhone> <EmergencyContactMobilePhone>sample string 24</EmergencyContactMobilePhone> <EmergencyContactName>sample string 20</EmergencyContactName> <EmergencyContactRelationship>sample string 21</EmergencyContactRelationship> <EmergencyContactWorkPhone>sample string 23</EmergencyContactWorkPhone> <EmployeeNumber>sample string 9</EmployeeNumber> <EmploymentTermId>Permanent</EmploymentTermId> <EndDatetime>2025-03-14T19:52:13.3795002+00:00</EndDatetime> <FacilityId>26948213-8888-4618-b886-c28ce4f16b56</FacilityId> <FirstName>sample string 1</FirstName> <GenerateWelcomeMessage>true</GenerateWelcomeMessage> <HasLoginRights>true</HasLoginRights> <JobTitle>sample string 15</JobTitle> <LastName>sample string 2</LastName> <Login>sample string 11</Login> <MiddleInitial>sample string 3</MiddleInitial> <Nickname>sample string 4</Nickname> <OccupancyName>sample string 16</OccupancyName> <OfficeDeskLocation>sample string 19</OfficeDeskLocation> <Password>sample string 12</Password> <PronounId>d85af40d-1d77-4e8e-be28-d56c9c5ffe70</PronounId> <StartDatetime>2025-03-14T19:52:13.3795002+00:00</StartDatetime> <UserUDFValueViewModels> <UserUDFValueViewModel> <UDFId>a4e401fc-4103-4df1-829b-d564b070d9d7</UDFId> <UDFValue>sample string 2</UDFValue> </UserUDFValueViewModel> <UserUDFValueViewModel> <UDFId>a4e401fc-4103-4df1-829b-d564b070d9d7</UDFId> <UDFValue>sample string 2</UDFValue> </UserUDFValueViewModel> </UserUDFValueViewModels> <WebSiteRightsSuspended>true</WebSiteRightsSuspended> <WebSiteRightsSuspendedEnd>2025-03-14T19:52:13.3795002+00:00</WebSiteRightsSuspendedEnd> <WebSiteRightsSuspendedStart>2025-03-14T19:52:13.3795002+00:00</WebSiteRightsSuspendedStart> <WorkEnvironmentTypeId>f6536d04-18b0-4ae8-8adb-d1b96983aa30</WorkEnvironmentTypeId> <WorkerTypeId>Employee</WorkerTypeId> <sGenderId>1</sGenderId> </AddUserViewModel>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
ResultWithUDFAndGuidName | Description | Type | Additional information |
---|---|---|---|
Value |
Represents the PK value that was created as a result of an add |
globally unique identifier |
None. |
UDFValidationViewModels |
The Errors and responses from the UDF Validation |
Collection of UDFValidationViewModel |
None. |
ResultCode |
Represents the result code |
integer |
None. |
Description |
Represents a description of the result code |
string |
None. |
Response Formats
application/json, text/json
{ "Value": "f8cd52dc-b500-4620-b930-fa7037dd735d", "UDFValidationViewModels": [ { "UDFId": "d4d06dee-d246-4fca-818d-cd19ffcb3254", "sUDFFieldTypeId": "ff8712a0-f8ea-4097-868f-b26e88adc0bb", "MaxValue": "sample string 3", "MinValue": "sample string 4", "IsParsed": true, "ValidationErrors": [ "sample string 1", "sample string 2" ] }, { "UDFId": "d4d06dee-d246-4fca-818d-cd19ffcb3254", "sUDFFieldTypeId": "ff8712a0-f8ea-4097-868f-b26e88adc0bb", "MaxValue": "sample string 3", "MinValue": "sample string 4", "IsParsed": true, "ValidationErrors": [ "sample string 1", "sample string 2" ] } ], "ResultCode": 2, "Description": "sample string 3" }
application/xml, text/xml
<ResultWithUDFAndGuid xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <Description>sample string 3</Description> <HttpStatusCode>Continue</HttpStatusCode> <ResultCode>2</ResultCode> <UDFValidationViewModels> <UDFValidationViewModel> <IsParsed>true</IsParsed> <MaxValue>sample string 3</MaxValue> <MinValue>sample string 4</MinValue> <UDFId>d4d06dee-d246-4fca-818d-cd19ffcb3254</UDFId> <ValidationErrors xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </ValidationErrors> <sUDFFieldTypeId>ff8712a0-f8ea-4097-868f-b26e88adc0bb</sUDFFieldTypeId> </UDFValidationViewModel> <UDFValidationViewModel> <IsParsed>true</IsParsed> <MaxValue>sample string 3</MaxValue> <MinValue>sample string 4</MinValue> <UDFId>d4d06dee-d246-4fca-818d-cd19ffcb3254</UDFId> <ValidationErrors xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </ValidationErrors> <sUDFFieldTypeId>ff8712a0-f8ea-4097-868f-b26e88adc0bb</sUDFFieldTypeId> </UDFValidationViewModel> </UDFValidationViewModels> <Value>f8cd52dc-b500-4620-b930-fa7037dd735d</Value> </ResultWithUDFAndGuid>