AddUserCard
Overview
Request Information
Method
POST - api/Person/AddUserCard
URI Parameters
None.
Body Parameters
AddUserCardViewModel
Name | Description | Type | Additional information |
---|---|---|---|
UserId |
Required: The PK of the existing User that you want to add the card to. |
globally unique identifier |
None. |
CardId |
Optional: The PK of an existing card that you want to assign to the User. Retrieve possible values from /Card/GetAllCards. If null, CardType, CardACSystem, InternalCardNumber, ExternalCardNumber and Facility code are required. |
globally unique identifier |
None. |
CardType |
Conditional: If CardId is null, this is required. Represents the type of card being added dynamically. Retrieve possible values from /Card/GetAllCardTypes |
integer |
None. |
CardACSystemId |
Conditional: If CardId is null, this is required. Represents the Access Control System of the card being added dynamically. Retrieve possible values from /ACSystem/GetAllSystems |
globally unique identifier |
None. |
InternalCardNumber |
Conditional: If CardId is null, this is required. Represents the internal/encoded number of the card being added dynamically. |
integer |
None. |
ExternalCardNumber |
Conditional: If CardId is null, this is required. Represents the external number printed on the card being added dynamically. |
string |
None. |
CardSerialNumber |
Conditional: If CardType supports it, this is required. Represents the serial number of the smart card being added dynamically. |
integer |
None. |
FacilityCode |
Conditional: If CardType supports it, this is required. Represents the facility code of the smart card being added dynamically. |
integer |
None. |
IssueCode |
Conditional: If CardType supports it, this is required. Represents the issue code of the smart card being added dynamically. |
integer |
None. |
PIN |
Optional: The PIN that the User may use in conjunction with this Card for Card + PIN mode or for when Readers are in PIN mode only. |
string |
None. |
JSON
{ "UserId": "be1a76eb-3d2b-4ed8-a976-a4870d89aeaf", "CardId": "1541616c-d1f9-484b-be2c-e5789c7fe9a5", "CardType": 2, "CardACSystemId": "bc226c45-2950-49eb-a976-92e11921e897", "InternalCardNumber": 3, "ExternalCardNumber": "sample string 4", "CardSerialNumber": 1, "FacilityCode": 1, "IssueCode": 1, "PIN": "sample string 5" }
XML
<AddUserCardViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers"> <CardACSystemId>bc226c45-2950-49eb-a976-92e11921e897</CardACSystemId> <CardId>1541616c-d1f9-484b-be2c-e5789c7fe9a5</CardId> <CardSerialNumber>1</CardSerialNumber> <CardType>2</CardType> <ExternalCardNumber>sample string 4</ExternalCardNumber> <FacilityCode>1</FacilityCode> <InternalCardNumber>3</InternalCardNumber> <IssueCode>1</IssueCode> <PIN>sample string 5</PIN> <UserId>be1a76eb-3d2b-4ed8-a976-a4870d89aeaf</UserId> </AddUserCardViewModel>
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": "78e754c7-50c3-4e99-ad51-0b38dcd99ebf" }
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>78e754c7-50c3-4e99-ad51-0b38dcd99ebf</Value> </ResultWithGuid>