GET api/v2/Users/UserCards?UserId={UserId}&IncludeDeleted={IncludeDeleted}&FacilityCode={FacilityCode}

Returns list of cards for a given user by the UserId

Request Information

URI Parameters

NameDescriptionTypeAdditional information
UserId

globally unique identifier

Required

IncludeDeleted

boolean

Default value is False

FacilityCode

integer

Default value is -1

Body Parameters

None.

Response Information

Resource Description

PersonCardAndUserIdViewModelV2
NameDescriptionTypeAdditional information
UserId

globally unique identifier

None.

Cards

Collection of PersonCardViewModelV2

None.

Response Formats

application/json, text/json

Sample:
{
  "UserId": "ce39165d-191e-4dc3-8bdd-ae03fd48f6ba",
  "Cards": [
    {
      "NumberOfCardUses": 1,
      "PublicNotes": "sample string 1",
      "PersonCardId": "51aef03d-a4f3-4fd9-9ea4-92761630653c",
      "CardName": "sample string 3",
      "CardId": "1ce20da9-d06f-4d72-a3dd-e94be83033ad",
      "CardType": 5,
      "CardACSystemId": "5f58e71c-3739-4281-9769-8d631d68f0a5",
      "CardACSystemName": "sample string 7",
      "InternalCardNumber": 8,
      "ExternalCardNumber": "sample string 9",
      "CardSerialNumber": 1,
      "FacilityCode": 10,
      "IssueCode": 11,
      "PIN": "sample string 12",
      "Deleted": true,
      "HidInvitationCode": "sample string 14",
      "InvitationRedeemedDateTime": "2025-09-18T10:35:29.971874+00:00",
      "DateInserted": "2025-09-18T10:35:29.971874+00:00",
      "DateUpdated": "2025-09-18T10:35:29.971874+00:00",
      "CardActivationStartDateTime": "2025-09-18T10:35:29.971874+00:00",
      "CardDeactivationStartDateTime": "2025-09-18T10:35:29.971874+00:00",
      "CardUserFlags": 1,
      "EncryptedMobileCredentials": [
        {
          "MobileKeySetId": "4a3e2389-938e-495b-b592-642985f936e9",
          "KeyIndex": 2,
          "EncryptedCredential": "sample string 3"
        },
        {
          "MobileKeySetId": "4a3e2389-938e-495b-b592-642985f936e9",
          "KeyIndex": 2,
          "EncryptedCredential": "sample string 3"
        }
      ],
      "CredentialType": 1
    },
    {
      "NumberOfCardUses": 1,
      "PublicNotes": "sample string 1",
      "PersonCardId": "51aef03d-a4f3-4fd9-9ea4-92761630653c",
      "CardName": "sample string 3",
      "CardId": "1ce20da9-d06f-4d72-a3dd-e94be83033ad",
      "CardType": 5,
      "CardACSystemId": "5f58e71c-3739-4281-9769-8d631d68f0a5",
      "CardACSystemName": "sample string 7",
      "InternalCardNumber": 8,
      "ExternalCardNumber": "sample string 9",
      "CardSerialNumber": 1,
      "FacilityCode": 10,
      "IssueCode": 11,
      "PIN": "sample string 12",
      "Deleted": true,
      "HidInvitationCode": "sample string 14",
      "InvitationRedeemedDateTime": "2025-09-18T10:35:29.971874+00:00",
      "DateInserted": "2025-09-18T10:35:29.971874+00:00",
      "DateUpdated": "2025-09-18T10:35:29.971874+00:00",
      "CardActivationStartDateTime": "2025-09-18T10:35:29.971874+00:00",
      "CardDeactivationStartDateTime": "2025-09-18T10:35:29.971874+00:00",
      "CardUserFlags": 1,
      "EncryptedMobileCredentials": [
        {
          "MobileKeySetId": "4a3e2389-938e-495b-b592-642985f936e9",
          "KeyIndex": 2,
          "EncryptedCredential": "sample string 3"
        },
        {
          "MobileKeySetId": "4a3e2389-938e-495b-b592-642985f936e9",
          "KeyIndex": 2,
          "EncryptedCredential": "sample string 3"
        }
      ],
      "CredentialType": 1
    }
  ]
}

application/xml, text/xml

Sample:
<PersonCardAndUserIdViewModelV2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <Cards>
    <PersonCardViewModelV2>
      <CardACSystemId>5f58e71c-3739-4281-9769-8d631d68f0a5</CardACSystemId>
      <CardACSystemName>sample string 7</CardACSystemName>
      <CardActivationStartDateTime>2025-09-18T10:35:29.971874+00:00</CardActivationStartDateTime>
      <CardDeactivationStartDateTime>2025-09-18T10:35:29.971874+00:00</CardDeactivationStartDateTime>
      <CardId>1ce20da9-d06f-4d72-a3dd-e94be83033ad</CardId>
      <CardName>sample string 3</CardName>
      <CardSerialNumber>1</CardSerialNumber>
      <CardType>5</CardType>
      <CardUserFlags>ActiveCardholderRecord</CardUserFlags>
      <CredentialType>Proximity</CredentialType>
      <DateInserted>2025-09-18T10:35:29.971874+00:00</DateInserted>
      <DateUpdated>2025-09-18T10:35:29.971874+00:00</DateUpdated>
      <EncryptedMobileCredentials>
        <EncryptedCredentialData>
          <EncryptedCredential>sample string 3</EncryptedCredential>
          <KeyIndex>2</KeyIndex>
          <MobileKeySetId>4a3e2389-938e-495b-b592-642985f936e9</MobileKeySetId>
        </EncryptedCredentialData>
        <EncryptedCredentialData>
          <EncryptedCredential>sample string 3</EncryptedCredential>
          <KeyIndex>2</KeyIndex>
          <MobileKeySetId>4a3e2389-938e-495b-b592-642985f936e9</MobileKeySetId>
        </EncryptedCredentialData>
      </EncryptedMobileCredentials>
      <ExternalCardNumber>sample string 9</ExternalCardNumber>
      <FacilityCode>10</FacilityCode>
      <HidInvitationCode>sample string 14</HidInvitationCode>
      <InternalCardNumber>8</InternalCardNumber>
      <InvitationRedeemedDateTime>2025-09-18T10:35:29.971874+00:00</InvitationRedeemedDateTime>
      <IssueCode>11</IssueCode>
      <PIN>sample string 12</PIN>
      <PersonCardId>51aef03d-a4f3-4fd9-9ea4-92761630653c</PersonCardId>
      <NumberOfCardUses>1</NumberOfCardUses>
      <PublicNotes>sample string 1</PublicNotes>
    </PersonCardViewModelV2>
    <PersonCardViewModelV2>
      <CardACSystemId>5f58e71c-3739-4281-9769-8d631d68f0a5</CardACSystemId>
      <CardACSystemName>sample string 7</CardACSystemName>
      <CardActivationStartDateTime>2025-09-18T10:35:29.971874+00:00</CardActivationStartDateTime>
      <CardDeactivationStartDateTime>2025-09-18T10:35:29.971874+00:00</CardDeactivationStartDateTime>
      <CardId>1ce20da9-d06f-4d72-a3dd-e94be83033ad</CardId>
      <CardName>sample string 3</CardName>
      <CardSerialNumber>1</CardSerialNumber>
      <CardType>5</CardType>
      <CardUserFlags>ActiveCardholderRecord</CardUserFlags>
      <CredentialType>Proximity</CredentialType>
      <DateInserted>2025-09-18T10:35:29.971874+00:00</DateInserted>
      <DateUpdated>2025-09-18T10:35:29.971874+00:00</DateUpdated>
      <EncryptedMobileCredentials>
        <EncryptedCredentialData>
          <EncryptedCredential>sample string 3</EncryptedCredential>
          <KeyIndex>2</KeyIndex>
          <MobileKeySetId>4a3e2389-938e-495b-b592-642985f936e9</MobileKeySetId>
        </EncryptedCredentialData>
        <EncryptedCredentialData>
          <EncryptedCredential>sample string 3</EncryptedCredential>
          <KeyIndex>2</KeyIndex>
          <MobileKeySetId>4a3e2389-938e-495b-b592-642985f936e9</MobileKeySetId>
        </EncryptedCredentialData>
      </EncryptedMobileCredentials>
      <ExternalCardNumber>sample string 9</ExternalCardNumber>
      <FacilityCode>10</FacilityCode>
      <HidInvitationCode>sample string 14</HidInvitationCode>
      <InternalCardNumber>8</InternalCardNumber>
      <InvitationRedeemedDateTime>2025-09-18T10:35:29.971874+00:00</InvitationRedeemedDateTime>
      <IssueCode>11</IssueCode>
      <PIN>sample string 12</PIN>
      <PersonCardId>51aef03d-a4f3-4fd9-9ea4-92761630653c</PersonCardId>
      <NumberOfCardUses>1</NumberOfCardUses>
      <PublicNotes>sample string 1</PublicNotes>
    </PersonCardViewModelV2>
  </Cards>
  <UserId>ce39165d-191e-4dc3-8bdd-ae03fd48f6ba</UserId>
</PersonCardAndUserIdViewModelV2>