POST api/v1/Users/SP1CheckIn
Looks up a person by a criterion specified and assigns a card to her/him. If a card not exists a new one is created
Request Information
URI Parameters
None.
Body Parameters
SP1CheckInRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| MatchUserByInternalCardNumber |
Represents the internal/encoded number of the card to lookup a User by |
integer |
None. |
| MatchUserByEmployeeNumber |
Represents the Employee number to look upa User by |
string |
None. |
| MatchUserByUserId |
Represents the UserId for the User to look up |
globally unique identifier |
None. |
| MatchUserByByEmail |
Represents the email address to look up a User by |
string |
None. |
| NewCardInternalCardNumber |
Represents the internal/encoded number of the card to assign to the User |
integer |
None. |
| NewCardExternalCardNumber |
Represents the serial number of the smart card being added dynamically |
string |
None. |
| NewCardFacilityCode |
Represents the facility code of the card to assign to the User /// |
integer |
None. |
| NewCardCardType |
Represents the type of the card to assign to the User |
integer |
None. |
| NewCardCardACSystemId |
Represents the ID of the System to create the card in |
globally unique identifier |
None. |
| NewCardEnforceOccupancySystem |
Optional: Requests to verify if the CardACSystemId matches the system the User's Occupancy belongs to |
boolean |
None. |
Request Formats
application/json, text/json
{
"MatchUserByInternalCardNumber": 1,
"MatchUserByEmployeeNumber": "sample string 1",
"MatchUserByUserId": "71c61981-8667-41d4-89c1-d48c9e6d121b",
"MatchUserByByEmail": "sample string 2",
"NewCardInternalCardNumber": 3,
"NewCardExternalCardNumber": "sample string 4",
"NewCardFacilityCode": 5,
"NewCardCardType": 6,
"NewCardCardACSystemId": "f9aeeec9-dce7-4254-b153-dad93352c98a",
"NewCardEnforceOccupancySystem": true
}
application/xml, text/xml
<SP1CheckInRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <MatchUserByByEmail>sample string 2</MatchUserByByEmail> <MatchUserByEmployeeNumber>sample string 1</MatchUserByEmployeeNumber> <MatchUserByInternalCardNumber>1</MatchUserByInternalCardNumber> <MatchUserByUserId>71c61981-8667-41d4-89c1-d48c9e6d121b</MatchUserByUserId> <NewCardCardACSystemId>f9aeeec9-dce7-4254-b153-dad93352c98a</NewCardCardACSystemId> <NewCardCardType>6</NewCardCardType> <NewCardEnforceOccupancySystem>true</NewCardEnforceOccupancySystem> <NewCardExternalCardNumber>sample string 4</NewCardExternalCardNumber> <NewCardFacilityCode>5</NewCardFacilityCode> <NewCardInternalCardNumber>3</NewCardInternalCardNumber> </SP1CheckInRequest>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
SP1CheckInResult| Name | Description | Type | Additional information |
|---|---|---|---|
| PreviousUserId |
Represents a UserId for a user the card previously belonged to |
globally unique identifier |
None. |
| CurrentUserId |
Represents a UserId for a user the card has been assigned to |
globally unique identifier |
None. |
| ExternalCardNumber |
Represents the serial number of the smart card being added dynamically |
string |
None. |
| InternalCardNumber |
Represents the internal/encoded number of the card being added dynamically. |
integer |
None. |
| FacilityCode |
Represents the facility code of the smart card being added dynamically. |
integer |
None. |
| CardType |
Represents the type of card being added dynamically. Retrieve possible values from /Card/GetAllCardTypes |
integer |
None. |
| Value |
Represents the PK value that was created as a result of an add |
globally unique identifier |
None. |
| ResultCode |
Represents the result code |
integer |
None. |
| Description |
Represents a description of the result code |
string |
None. |
Response Formats
application/json, text/json
{
"PreviousUserId": "6b7eebf0-f306-428f-8f44-952a43c6d610",
"CurrentUserId": "70d46b5a-f6d7-4d0f-8e3f-d33be4d32031",
"ExternalCardNumber": "sample string 1",
"InternalCardNumber": 1,
"FacilityCode": 1,
"CardType": 1,
"Value": "ca62bc8e-4478-4e97-a458-e5b90becf21f",
"ResultCode": 3,
"Description": "sample string 4"
}
application/xml, text/xml
<SP1CheckInResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <Description>sample string 4</Description> <HttpStatusCode>Continue</HttpStatusCode> <ResultCode>3</ResultCode> <Value>ca62bc8e-4478-4e97-a458-e5b90becf21f</Value> <CardType>1</CardType> <CurrentUserId>70d46b5a-f6d7-4d0f-8e3f-d33be4d32031</CurrentUserId> <ExternalCardNumber>sample string 1</ExternalCardNumber> <FacilityCode>1</FacilityCode> <InternalCardNumber>1</InternalCardNumber> <PreviousUserId>6b7eebf0-f306-428f-8f44-952a43c6d610</PreviousUserId> </SP1CheckInResult>