General

Important definitions

The following definitions will occur in the communication with the devices:

  • deviceId : id of the device

Get device state

This method is used to check if the device is enabled and online.

URL parameters

  • hostIp: Ip address of the API host.

  • deviceId: Id of the device.

GET https://{hostIp}:7081/hal/devices/{deviceId}/state

Example request:

GET /hal/devices/smartonemodule1/state HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...
Content-Type: application/json

Example response:

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

{
  "statusId": 1,
  "powerStatusId": 2001,
}
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:

General info of the devices

Get device info

This method is used to retrieve more information about the device’s hardware, firmware and configuration .

URL parameters

  • hostIp: Ip address of the API host.

  • deviceId: Id of the device.

GET https://{hostIp}:7081/hal/devices/{deviceId}/info

Example request:

GET /hal/devices/payter1/info HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...
Content-Type: application/json

Example response:

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

{
   "deviceId": "payter1",
   "name": "payter 1",
   "hardwareType": "APO01.BL.TST V1-1",
   "hardwareVersion": "",
   "firmwareVersion": "",
   "type": 15,
   "connectionState": 1,
   "enabled": true,
   "nodeId": "0",
   "serialNumber": ""
   "channelType": 2,
   "channelName": "192.168.0.10:3201"
}
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:
  • deviceId (string) – id of the device

  • name (string) – user friendly device name

  • hardwareType (string) – hardware type of the device

  • hardwareVersion (string) – hardware version of the device

  • firmwareVersion (string) – firmware version of the device

  • type (string) – device type (see device types)

  • connectionState (integer) – connection state of the device. Possible values: 1 (connected), 0 (disconnected)

  • enabled (boolean) – indicates whether the device is enabled or not

  • nodeId (string) – nodeId of the device in the fieldbus network

  • serialNumber (string) – serial number of the device

  • type – channel type (see channel types)

  • type – channel name

Get device info for one or more devices

This method is used to retrieve more information about the device’s hardware, firmware and configuration of all or one or more devices.

URL parameters

  • hostIp: Ip address of the API host.

  • nodeId (optional): NodeId of the device in the fieldbus network

GET https://{hostIp}:7081/hal/devices/info?nodeId={nodeId}

Example request:

GET /hal/devices/info?nodeId=11:22:33:44:55:66 HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...
Content-Type: application/json

Example response:

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

[
   {
      "deviceId": "OAIII_1",
      "name": "OAIII 1",
      "hardwareType": "",
      "hardwareVersion": "",
      "firmwareVersion": "",
      "type": 17,
      "connectionState": 1,
      "enabled": true,
      "nodeId": "11:22:33:44:55:66",
      "serialNumber": ""
      "channelType": 8,
      "channelName": "hciO"
   }
]
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:
  • info (array) – array of device info of devices matching the query parameters ‘nodeId’. See “get device info” for more info about device info.

Test device connectivity

This method can be used to test the device connectivity

URL parameters

  • hostIp: Ip address of the API host.

  • deviceId: Id of the device.

POST https://{hostIp}:7081/hal/devices/{deviceId}/testconnectivity

Example request:

POST /hal/devices/payter1/testconnectivity HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...
Content-Type: application/json

Example response:

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

{
   "testResults": [
   {
      "id": 100,
      "result": 1,
      "description": "Check if device task manager is running",
      "message": "",
      "index": 0
   },
   {
      "id": 201,
      "result": 1,
      "description": "Check if communicationchannel 10.5.0.132:3201 is opened",
      "message": "",
      "index": 1
   },
   {
      "id": 800,
      "result": 1,
      "description": "Checking system info of payter device pt1",
      "message": "SerialNumber: APO20230900366, Model: APO01.BL.TST V1-1, Platform: apollo/1.1.2-b158/Test",
      "index": 2
   }
   ]
}
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:
  • info (array) – an array of performed tests is returned containing the following fields for each performed test:

:>json int id:id of the test (see channel types) :>json int result: result of the test (0 = not performed/skipped, 1 = success, 2 = failed, 3 = warning) :>json string description: a short description of the performed test :>json string message: extra information gathered while performing the test :>json int index: following order of the performed test

Direct Commands

Direct commands are not device agnostic. The supported commands and their corresponding parameters and returns values depend on the device type. Go the Supported direct commands topic of a specific device in supported devices to learn more about the supported commands for a specific device.

URL parameters

  • hostIp: ip address of the API host.

  • deviceId: id of the device.

  • commandId: id of the direct command.

POST https://{hostIp}:7081/hal/devices/{deviceId}/directcommand/{commandId}

Example request:

POST /hal/devices/oa3/directcommand/2 HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...
Content-Type: application/json

{
   "passkey": 123456,
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Status Codes:

Direct Queries

Like Direct commands, Direct Queries are also not device agnostic. The supported queries and their corresponding parameters and returns values depend on the device type. Go the Supported direct queries topic of a specific device in supported devices to learn more about the supported queries for a specific device.

URL parameters

  • hostIp: Ip address of the API host.

  • deviceId: Id of the device.

  • queryId: id of the direct query.

GET https://{hostIp}:7081/hal/devices/{deviceId}/directquery/{queryId}

Example request:

GET /hal/devices/oa3/directquery/1 HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...
Content-Type: application/json

Example response:

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

{
  "binStatus": 1,
  "isTrusted": true,
  "isPaired": true,
  "isBonded": true
}
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:
  • object (JObject) – go to the direct queries topic of a specific device in supported devices

Enumeration values

Enumeration DCOStatus

  • Enabled = 1

  • Disabled = 7

Enumeration PowerStatus

  • Unknown = 0

  • Online = 2001

  • Offline = 2004

Enumeration DeviceTypes

  • AP286 = 0

  • DBK = 1

  • STID = 2

  • AP338 = 4

  • AP298 = 5

  • AP3010 = 6

  • SmartOne = 7 (EOL)

  • SmartCover = 8 (EOL)

  • SmartCardReader = 9

  • BarcodeScanner = 10

  • UvcWebcam = 11

  • WutWebIO = 12

  • AvutecANPR = 13

  • RGBTechnologyDisplay = 14

  • PayterApollo = 15

  • RPI4Gateway = 16

  • OAIII = 17

  • SuloWeighingBin = 18

  • WHBerlinCoinAcceptor = 19

  • RPI4GatewayDisplay = 20

Enumeration ChannelTypes

  • CAN = 1,

  • TCPIP = 2

  • SERIALPORT = 3

  • PCSC = 4

  • UVC = 5

  • UDPIP = 6

  • DIGITALIO = 7

  • BLE = 8

  • WEB = 9

  • DISPLAY = 10

Test Ids

  • ID_UNKNOWN = 0

  • ID_MANAGER_RUNNING = 100

  • ID_CHANNEL_EXISTS = 200

  • ID_CHANNEL_OPEN = 201

  • ID_MOXA_CONFIG = 300

  • ID_ICMP_PING = 301

  • ID_MOXA_LAUNCHER = 302

  • ID_MOXA_PORT = 303

  • ID_GEN2_DEVICE_CHECK_ADDRESS = 400

  • ID_GEN2_DEVICE_CHECK_APP = 401

  • ID_GEN2_DEVICE_CHECK_BOOTLOADER = 402

  • ID_GEN2_DEVICE_CHECK_SCRIPT_SETTINGS_VERSION = 403

  • ID_OSDP_DEVICE_CHECK_ID_REPORT = 500

  • ID_ELKA_CHECK_DEVICE_INFO = 600

  • ID_CHECK_OPCUA_SERVER_INFO = 700

  • ID_CHECK_PAYTERS_IDS_INFO = 800

  • ID_GWIO_CHECK_IO_ACCESS = 900

  • ID_GWIO_CHECK_IO_STATUS = 901

  • ID_GWIO_CHECK_SCREEN_STATUS = 902

  • ID_BLE_CHECK_ADAPTER_INFO = 1000

  • ID_BLE_CHECK_DEVICE_INFO = 1001

  • ID_CHECK_OAIII_INFO = 1100

  • ID_WEB_CHECK_DOMAIN = 1200

  • ID_WASTEDROPAPI_PING = 1300

  • ID_WASTEDROPAPI_CHECK_CONTAINER = 1301

  • ID_CCTALK_DEVICE_INFO = 1400