GET api/v1/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

PersonCardAndUserIdViewModel
NameDescriptionTypeAdditional information
UserId

globally unique identifier

None.

Cards

Collection of PersonCardViewModel

None.

Response Formats

application/json, text/json

Sample:
{
  "UserId": "13b237fd-2038-4372-b6b5-cbe8919fc9aa",
  "Cards": [
    {
      "PersonCardId": "538add23-0643-4d6b-b24e-29cc0e991a5b",
      "CardName": "sample string 2",
      "CardId": "9d277aba-be19-4c90-9dc1-bfc12346acf7",
      "CardType": 4,
      "CardACSystemId": "e5a7fb93-8129-444c-aa44-bb6d5bceaabe",
      "CardACSystemName": "sample string 6",
      "InternalCardNumber": 7,
      "ExternalCardNumber": "sample string 8",
      "CardSerialNumber": 1,
      "FacilityCode": 9,
      "IssueCode": 10,
      "PIN": "sample string 11",
      "Deleted": true,
      "HidInvitationCode": "sample string 13",
      "InvitationRedeemedDateTime": "2025-07-02T08:32:36.4329683+00:00",
      "DateInserted": "2025-07-02T08:32:36.4329683+00:00",
      "DateUpdated": "2025-07-02T08:32:36.4329683+00:00",
      "CardActivationStartDateTime": "2025-07-02T08:32:36.4329683+00:00",
      "CardDeactivationStartDateTime": "2025-07-02T08:32:36.4329683+00:00",
      "CardUserFlags": 1,
      "EncryptedMobileCredentials": [
        {
          "MobileKeySetId": "4df4cad8-fb0b-40b9-8980-328c7d0a863d",
          "KeyIndex": 2,
          "EncryptedCredential": "sample string 3"
        },
        {
          "MobileKeySetId": "4df4cad8-fb0b-40b9-8980-328c7d0a863d",
          "KeyIndex": 2,
          "EncryptedCredential": "sample string 3"
        }
      ],
      "CredentialType": 1
    },
    {
      "PersonCardId": "538add23-0643-4d6b-b24e-29cc0e991a5b",
      "CardName": "sample string 2",
      "CardId": "9d277aba-be19-4c90-9dc1-bfc12346acf7",
      "CardType": 4,
      "CardACSystemId": "e5a7fb93-8129-444c-aa44-bb6d5bceaabe",
      "CardACSystemName": "sample string 6",
      "InternalCardNumber": 7,
      "ExternalCardNumber": "sample string 8",
      "CardSerialNumber": 1,
      "FacilityCode": 9,
      "IssueCode": 10,
      "PIN": "sample string 11",
      "Deleted": true,
      "HidInvitationCode": "sample string 13",
      "InvitationRedeemedDateTime": "2025-07-02T08:32:36.4329683+00:00",
      "DateInserted": "2025-07-02T08:32:36.4329683+00:00",
      "DateUpdated": "2025-07-02T08:32:36.4329683+00:00",
      "CardActivationStartDateTime": "2025-07-02T08:32:36.4329683+00:00",
      "CardDeactivationStartDateTime": "2025-07-02T08:32:36.4329683+00:00",
      "CardUserFlags": 1,
      "EncryptedMobileCredentials": [
        {
          "MobileKeySetId": "4df4cad8-fb0b-40b9-8980-328c7d0a863d",
          "KeyIndex": 2,
          "EncryptedCredential": "sample string 3"
        },
        {
          "MobileKeySetId": "4df4cad8-fb0b-40b9-8980-328c7d0a863d",
          "KeyIndex": 2,
          "EncryptedCredential": "sample string 3"
        }
      ],
      "CredentialType": 1
    }
  ]
}

application/xml, text/xml

Sample:
<PersonCardAndUserIdViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <Cards>
    <PersonCardViewModel>
      <CardACSystemId>e5a7fb93-8129-444c-aa44-bb6d5bceaabe</CardACSystemId>
      <CardACSystemName>sample string 6</CardACSystemName>
      <CardActivationStartDateTime>2025-07-02T08:32:36.4329683+00:00</CardActivationStartDateTime>
      <CardDeactivationStartDateTime>2025-07-02T08:32:36.4329683+00:00</CardDeactivationStartDateTime>
      <CardId>9d277aba-be19-4c90-9dc1-bfc12346acf7</CardId>
      <CardName>sample string 2</CardName>
      <CardSerialNumber>1</CardSerialNumber>
      <CardType>4</CardType>
      <CardUserFlags>ActiveCardholderRecord</CardUserFlags>
      <CredentialType>Proximity</CredentialType>
      <DateInserted>2025-07-02T08:32:36.4329683+00:00</DateInserted>
      <DateUpdated>2025-07-02T08:32:36.4329683+00:00</DateUpdated>
      <EncryptedMobileCredentials>
        <EncryptedCredentialData>
          <EncryptedCredential>sample string 3</EncryptedCredential>
          <KeyIndex>2</KeyIndex>
          <MobileKeySetId>4df4cad8-fb0b-40b9-8980-328c7d0a863d</MobileKeySetId>
        </EncryptedCredentialData>
        <EncryptedCredentialData>
          <EncryptedCredential>sample string 3</EncryptedCredential>
          <KeyIndex>2</KeyIndex>
          <MobileKeySetId>4df4cad8-fb0b-40b9-8980-328c7d0a863d</MobileKeySetId>
        </EncryptedCredentialData>
      </EncryptedMobileCredentials>
      <ExternalCardNumber>sample string 8</ExternalCardNumber>
      <FacilityCode>9</FacilityCode>
      <HidInvitationCode>sample string 13</HidInvitationCode>
      <InternalCardNumber>7</InternalCardNumber>
      <InvitationRedeemedDateTime>2025-07-02T08:32:36.4329683+00:00</InvitationRedeemedDateTime>
      <IssueCode>10</IssueCode>
      <PIN>sample string 11</PIN>
      <PersonCardId>538add23-0643-4d6b-b24e-29cc0e991a5b</PersonCardId>
    </PersonCardViewModel>
    <PersonCardViewModel>
      <CardACSystemId>e5a7fb93-8129-444c-aa44-bb6d5bceaabe</CardACSystemId>
      <CardACSystemName>sample string 6</CardACSystemName>
      <CardActivationStartDateTime>2025-07-02T08:32:36.4329683+00:00</CardActivationStartDateTime>
      <CardDeactivationStartDateTime>2025-07-02T08:32:36.4329683+00:00</CardDeactivationStartDateTime>
      <CardId>9d277aba-be19-4c90-9dc1-bfc12346acf7</CardId>
      <CardName>sample string 2</CardName>
      <CardSerialNumber>1</CardSerialNumber>
      <CardType>4</CardType>
      <CardUserFlags>ActiveCardholderRecord</CardUserFlags>
      <CredentialType>Proximity</CredentialType>
      <DateInserted>2025-07-02T08:32:36.4329683+00:00</DateInserted>
      <DateUpdated>2025-07-02T08:32:36.4329683+00:00</DateUpdated>
      <EncryptedMobileCredentials>
        <EncryptedCredentialData>
          <EncryptedCredential>sample string 3</EncryptedCredential>
          <KeyIndex>2</KeyIndex>
          <MobileKeySetId>4df4cad8-fb0b-40b9-8980-328c7d0a863d</MobileKeySetId>
        </EncryptedCredentialData>
        <EncryptedCredentialData>
          <EncryptedCredential>sample string 3</EncryptedCredential>
          <KeyIndex>2</KeyIndex>
          <MobileKeySetId>4df4cad8-fb0b-40b9-8980-328c7d0a863d</MobileKeySetId>
        </EncryptedCredentialData>
      </EncryptedMobileCredentials>
      <ExternalCardNumber>sample string 8</ExternalCardNumber>
      <FacilityCode>9</FacilityCode>
      <HidInvitationCode>sample string 13</HidInvitationCode>
      <InternalCardNumber>7</InternalCardNumber>
      <InvitationRedeemedDateTime>2025-07-02T08:32:36.4329683+00:00</InvitationRedeemedDateTime>
      <IssueCode>10</IssueCode>
      <PIN>sample string 11</PIN>
      <PersonCardId>538add23-0643-4d6b-b24e-29cc0e991a5b</PersonCardId>
    </PersonCardViewModel>
  </Cards>
  <UserId>13b237fd-2038-4372-b6b5-cbe8919fc9aa</UserId>
</PersonCardAndUserIdViewModel>