RestApiModule - SmartCardReader Api

Get smartcard reader state

Returns the SmartCardReaderState.

Authorization level

  • 30 (RestApiModuleGetData )

URL parameters

  • endcustomerId: Endcustomer Id.

  • assetId: Asset Id.

  • deviceId: Device Id of peripheral linked to the asset.

GET /endcustomers/{endcustomerId}/assets/{assetId}/restapi/hal/devices/{deviceId}/smartcardreader/state

Example request:

GET /endcustomers/edfd1133-88ec-4f2d-abb8-16238c6ad926/assets/10401990013-123455789/restapi/hal/devices/smartcardreader1/smartcardreader/state HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...
X-API-Version: 1.0

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Api-Supported-Versions: 1.0

{
  "smartCardReaderStates": [2,32,256],
  "smartCardType":1
}
Status Codes:
Response Headers:
  • Content-Type – application/json; charset=utf-8

  • Api-Supported-Versions – supported api versions

Response JSON Object:
  • smartCardReaderStates (array) – an array of SCardState values. see SCardState for more info.

  • smartCardType (integer) – the type of the inserted smartcard (if any). see SCardType for more info.

Get smartcard files

Returns the content of a file available on the smartcard.

Authorization level

  • 30 (RestApiModuleGetData )

URL parameters

  • endcustomerId: Endcustomer Id.

  • assetId: Asset Id.

  • deviceId: Device Id of peripheral linked to the asset.

  • fileId: integer. Id of the file to be read. The id depends on the smart card type . See file ids for more info.

GET /endcustomers/{endcustomerId}/assets/{assetId}/restapi/hal/devices/{deviceId}/smartcardreader/files/{fileId}

Example request:

GET /endcustomers/edfd1133-88ec-4f2d-abb8-16238c6ad926/assets/10401990013-123455789/restapi/hal/devices/smartcardreader1/smartcardreader/files.1 HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...
X-API-Version: 1.0

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Api-Supported-Versions: 1.0

{
  "version": "string",
  "cardNumber": "string",
  //other ID data...
}
Status Codes:
Response Headers:
  • Content-Type – application/json; charset=utf-8

  • Api-Supported-Versions – supported api versions :>json object fileData: The response body contains the content of the requested file if the file id exists and if a smartcard is inserted. See file ids for more info.

SCardState

Indicates the state of the reader

  • Unaware = 0

  • Ignore = 1 : reader should be ignored

  • Changed = 2 : state has changed

  • Unknown = 4 : unknown reader

  • Unavailable = 8 : state not available for this reader

  • Empty = 16 : no card in reader

  • Present = 32 : card in reader

  • AtrMatch = 64 : atr match

  • Exclusive = 128 : the card in the reader is allocated by an application exclusively

  • InUse = 256 : the card is in use by one or more applications

  • Mute = 512 : there is an unresponsive card in the reader

  • Unpowered = 1024 : the card is unpowered

SCardType

Indicates the card type of the inserted smartcard.

  • Unknown = 0

  • BEID = 1

  • SLE4442 = 2

Card file ids

enumeration FileIds:

  • ID = 1 (BEID)

  • Address = 2 (BEID)

  • Photo = 3 (BEID)

  • SLE4442Data (SLE4442)

File content schema’s

BEID.ID

{
    "version": "string",
    "cardNumber": "string,
    "chipNumber": "string",
    "validityDateBegin":"string",
    "validityDateEnd":"string",
    "nationalNumber":"string",
    "name":"string",
    "firstName1":"string",
    "firstName2":"string",
    "nationality":"string",
    "birthLocation":"string",
    "birthDate":"string",
    "sex":"string",
    "nobleCondition":"string",
    "documentType":int,
    "whiteCane":bool,
    "yellowCane":bool,
    "extendedMinority":bool,
    "hashPhoto":"string",
    "rfu":"string"
}

BEID.Address

{
    "version":"string",
    "street":"string",
    "streetNumber":"string",
    "boxNumber":"string",
    "zip":"string";
    "municipality":"string",
    "country":"string",
    "rfu":"string"
}

BEID.Photo

Base64 string of binary image.

SLE4442.Data

256bytes in Hex Format

"A2131091FFFF8115FFFFFFFFFFFFFFFF00040000FDD27600000400FFFFFFF...FF"

Events

A webhook message is sent when a smart card is inserted or retracted.

Authorization level

  • 32 (RestApiModuleNotification )

Properties

{
   "event": {
      "methodName": "receiveSmartCardReaderState",
      "arguments":  [{
         "smartCardReaderStates": [2,32,256], //see SCardState enumeration value
         "smartCardType": 1, //see SCardType enumeration value
         "deviceId": "smartcardreader1",
         "version": "1.0"
     }],
      "$type": 300
   },
   "moduleId": "RestApiModule1",
   "$type": 2,
   "version": 1,
   "createdUtc": "2026-11-20T10:56:56.0170712Z",
   "reportedUtc": "2026-11-20T10:56:47.056Z",
   "id": "7b1ad0e7-2759-48a4-8465-1a795f72c61c",
   "assetId": "10401990013-123004002"
}