AddVisitorRequest
Overview
Adds a single Visitor Request to the system. Returns Success/Error code plus primary key of Visitor Request added.
Request Information
Method
POST - api/Visitor/AddVisitorRequest
URI Parameters
None.
Body Parameters
AddUpdateVisitorRequestViewModel
| Name | Description | Type | Additional information |
|---|---|---|---|
| VisitorRequestId | Conditional: Represents the PK of an existing Visitor Request in BluSKY if calling an Update method. Not used for Add methods | globally unique identifier | None. |
| GuestPersonId | Conditional: Represents the PK of an existing Visitor Request Guest in BluSKY if calling an Update method. Not used for Add methods | globally unique identifier | None. |
| GuestFirstName | Required: Represents the Guest's first/given name. Max Length = 60 | string | None. |
| GuestLastName | Required: Represents the Guest's last name / surname. Max Length = 60 | string | None. |
| GuestEmail | Optional: Represents the email address of the Guest | string | None. |
| GuestPhone | Optional: Represents the phone number of the Guest | string | None. |
| GuestCompanyName | Optional: Represents the name of the occupancy or vendor instance that the Guest belongs to | string | None. |
| GroupHashTag | Optional: Represents the group name that the Guest may belong to (if provided) | string | None. |
| VisitationPattern | Required: Represents the visitation pattern that has been requested for the Guest | string | None. |
| Message | Optional: Represents a supplemental message that will be viewable by Security/Reception when the Guest arrives | string | None. |
| VisitorTypeId | Required: Represents a supplemental message that will be viewable by Security/Reception when the Guest arrives. Retrieve possible values from /Visitor/GetAllVisitorTypes | globally unique identifier | None. |
| HostPersonId | Required: Represents the PK of an existing Visitor Request Host in BluSKY. Used for both Add and Update | globally unique identifier | None. |
| FacilityId | Required: Represents the PK of the facility that the Guest is expected at. Retrieve possible values from /Facility/GetAllFacilities | globally unique identifier | None. |
| ACSystemId | Required: Represents the PK of the Access Control System that the Host is located in. Retrieve possible values from /ACSystem/GetAllSystems | globally unique identifier | None. |
| Floors | Optional: Represents the list of floors that the Guest will be allowed to visit if Access Levels are not being used. | Collection of FloorsViewModel | None. |
| RequestedAccessLevelId | Optional: Represents an Access Level assignments requested by the Requestor for the Visitor. Retrieve possible values from /AccessLevel/GetAllAccessLevels | globally unique identifier | None. |
| Deleted | Required: Represents whether the Visitor Request is deleted or not. Should be false for Add methods. | boolean | None. |
JSON
{
"VisitorRequestId": "2506605e-875b-4030-8218-e6a1824a696e",
"GuestPersonId": "dd143bc8-e552-4863-b3bd-e02938c6fc61",
"GuestFirstName": "sample string 1",
"GuestLastName": "sample string 2",
"GuestEmail": "sample string 3",
"GuestPhone": "sample string 4",
"GuestCompanyName": "sample string 5",
"GroupHashTag": "sample string 6",
"VisitationPattern": "sample string 7",
"Message": "sample string 8",
"VisitorTypeId": "c9e54226-7863-4b69-86ea-44835af58d13",
"HostPersonId": "24b25525-c13b-4c00-8652-f33c1ad53e3b",
"FacilityId": "86751bc8-1aa2-4cf1-be77-83d57bb58b9a",
"ACSystemId": "3cd9fa38-7d39-4493-ad53-8b4f55c2b934",
"Floors": \\\\[
{
"FloorId": "e2d881ad-868a-4d4d-8307-f2bd47a0a839",
"Name": "sample string 2",
"PhysicalSequence": 3,
"Deleted": true
},
{
"FloorId": "e2d881ad-868a-4d4d-8307-f2bd47a0a839",
"Name": "sample string 2",
"PhysicalSequence": 3,
"Deleted": true
}
],
"RequestedAccessLevelId": "766fd316-e24b-4173-81b5-8cfa8a91565b",
"Deleted": true
}
XML
<AddUpdateVisitorRequestViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers">
<ACSystemId>3cd9fa38-7d39-4493-ad53-8b4f55c2b934</ACSystemId>
<Deleted>true</Deleted>
<FacilityId>86751bc8-1aa2-4cf1-be77-83d57bb58b9a</FacilityId>
<Floors>
<FloorsViewModel>
<Deleted>true</Deleted>
<FloorId>e2d881ad-868a-4d4d-8307-f2bd47a0a839</FloorId>
`<Name>`sample string 2</Name>
<PhysicalSequence>3</PhysicalSequence>
</FloorsViewModel>
<FloorsViewModel>
<Deleted>true</Deleted>
<FloorId>e2d881ad-868a-4d4d-8307-f2bd47a0a839</FloorId>
`<Name>`sample string 2</Name>
<PhysicalSequence>3</PhysicalSequence>
</FloorsViewModel>
</Floors>
<GroupHashTag>sample string 6</GroupHashTag>
<GuestCompanyName>sample string 5</GuestCompanyName>
<GuestEmail>sample string 3</GuestEmail>
<GuestFirstName>sample string 1</GuestFirstName>
<GuestLastName>sample string 2</GuestLastName>
<GuestPersonId>dd143bc8-e552-4863-b3bd-e02938c6fc61</GuestPersonId>
<GuestPhone>sample string 4</GuestPhone>
<HostPersonId>24b25525-c13b-4c00-8652-f33c1ad53e3b</HostPersonId>
<Message>sample string 8</Message>
<RequestedAccessLevelId>766fd316-e24b-4173-81b5-8cfa8a91565b</RequestedAccessLevelId>
<VisitationPattern>sample string 7</VisitationPattern>
<VisitorRequestId>2506605e-875b-4030-8218-e6a1824a696e</VisitorRequestId>
<VisitorTypeId>c9e54226-7863-4b69-86ea-44835af58d13</VisitorTypeId>
</AddUpdateVisitorRequestViewModel>
```
## 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
```json
{
"ResultCode": 1,
"Description": "sample string 2",
"Value": "29ecb16a-78a8-4144-8fff-6d03f7293f5f"
}
```
#### XML
```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>`29ecb16a-78a8-4144-8fff-6d03f7293f5f</Value>
</ResultWithGuid>