Skip to main content

Event API

Summary

The Datalogic Fixed Retail Scanner Event API allows third party clients to:

  • Receive notification on Scanner System Events:
    • Label Reads
    • Scale Steady Weight/Weight Change/Zero
    • Scale Sentry Beam Block/Unblocked
    • Object Seen/Leaving Field of View
  • Receive updates on mode/state changes

Getting Started

Open a WebSocket to the scanner by connecting to URL: wss://datalogic-base-SerialNumber.local:433,
where SerialNumber is the serial number of the scanner.
Protocol: wss
Protocol Version: "13"

note

All paths after the port number are ignored (e.g. datalogic-base-serialNumber.local:433/ is equivalent to datalogic-base-serialNumber.local:433/ws).

Server:

Private 9600i/9900i WebSocket Server
URL: wss://datalogic-base-serialNumber.local:433

Channels:

Channel for all Events

Subscribe:

Description: Messages sent from Scanner
Operation ID: onScannerEvent

Message is one of:

  • welcomeMsg
  • pongMsg
  • scannerSystemLabelReadMsg
  • scannerModeStateMsg
  • scannerSystemScaleMsg
  • scannerSystemScaleSentryMsg
  • scannerSystemObjectDetectMsg

Publish:

Description: Messages sent to Scanner
Operation ID: sendMessageToScanner
Only one message: pingMsg

Messages:

welcomeMsg:

ContentType: application/json
Description: Welcome message sent to client on new connection
Payload:

  • type: object
  • required:
    • type
    • data
  • properties:
    • type:
      • type: string
      • description: Type of message
    • data:
      • type: object
      • required:
        eventId
        connectionId
        apiVersionStr
        applicationVersionStr
        serialNumber
        buildVersion

Example:

{
"data" :
{
"apiVersionStr" : "1.0",
"applicationVersionStr" : "DR9401699",
"buildVersion" : "0db329d0eb",
"connectionId" : "14",
"eventId" : "30",
"serialNumber" : "F24H01847"
},
"type" : "welcomeMsg"
}

pingMsg:

ContentType: application/json
Description: Application level ping by client, server will respond back with a pong message
Payload:

  • type: object
  • required:
    • type
    • data
  • properties:
    • type:
      • type: string
      • description: Type of message
      • enum: pingMsg
    • data
      • type: object
      • required: reqId

X-response: pongMsg

pongMsg:

ContentType: application/json
Description: Scanner response to ping message
Payload:

  • type: object
  • required:
    • type
      • string
      • description: Type of message
      • enum: pongMsg
    • data
      • type: object
      • required:
        reqId
        connectionId
        apiVersionStr
        applicationVersionStr
        serialNumber
        buildVersion

Example:

{
"data" :
{
"apiVersionStr" : "1.0",
"applicationVersionStr" : "DR9401699",
"buildVersion" : "0db329d0eb",
"connectionId" : "14",
"reqId" : "7997",
"serialNumber" : "F24H01847"
},
"type" : "pongMsg"
}

scannerModeStateMsg:

ContentType: application/json
Description: Indicates the mode or state of the scanner has changed
Payload:

  • type: object
  • required:
    • type
    • data
  • properties:
    • type:
      • type: string
      • description: Type of message
      • enum: scannerModeStateMsg
    • data:
      • type: object
      • required:
        eventId
        currentMode
        • type: string
        • description: The operating mode of the scanner
        • enum:
          • PRE_OPERATING
          • LIMITED_SCANNING
          • ACTIVE
          • PROGRAMMING
          • FRU_ISOLATION
          • ERROR
          • DIAGNOSTICS
          • SCALE_DIAGNOSTICS
          • SCALE_CALIBRATION
          • ORT
        currentState
        • type: string
        • description: The corresponding state of the scanner
        • enum:
          • IDLE
          • SCANNING_DISABLED
          • SCANNING_ENABLED
          • SLEEP
          • SLUMBER

Example:

{
"data" :
{
"current_mode" : "PROGRAMMING",
"current_state" : "SCANNING_ENABLED",
"eventId" : "31"
},
"type" : "scannerModeStateMsg"
}
{
"data" :
{
"current_mode" : "PRE_OPERATING",
"current_state" : "IDLE",
"eventId" : "34"
},
"type" : "scannerModeStateMsg"
}
{
"data" :
{
"current_mode" : "ACTIVE",
"current_state" : "SCANNING_ENABLED",
"eventId" : "42"
},
"type" : "scannerModeStateMsg"
}

scannerSystemLabelReadMsg:

ContentType: application/json
Description: Indicates a label has been read.

note

The following labels will not sent to clients:

  • Any special purpose label read by the scanner
  • Any scanner programming label
  • Any label whose source is from an attached USB barcode reader
  • Any special purpose label generated by the scanner

Payload:

  • type: object
  • required:
    • type
    • data
  • properties:
    • type:
      • type: string
      • description: Type of message
      • enum: scannerSystemLabelReadMsg
    • data:
      • type: object

      • required:
        eventId
        labelIdType

        • type: string
        • description: The label type
        • enum:
          • AZTEC
          • CODABAR
          • CODE128
          • CODE32
          • CODE39
          • CODE93
          • DATABAR_14
          • DATABAR_14_COMPOSITE
          • DATABAR_EXPANDED
          • DATABAR_EXPANDED_COMPOSITE
          • DATABAR_LIMITED
          • DATABAR_LIMITED_COMPOSITE
          • DATAMATRIX
          • DIGIMARC_NATIVE
          • DOTCODE
          • EAN128
          • EAN13
          • EAN13_COMPOSITE
          • EAN13_P2
          • EAN13_P5
          • EAN8
          • EAN8_COMPOSITE
          • EAN8_P2
          • EAN8_P5
          • HAN_XIN_CODE
          • IATA_INDUSTRIAL_2OF5
          • INTERLEAVED_2OF5
          • ISBN
          • MAXICODE
          • MICRO_PDF
          • MICROQR
          • OCR_A
          • OCR_B
          • OCR_MICR
          • PDF417
          • QR_CODE
          • STANDARD_2OF5
          • UPCA
          • UPCA_COMPOSITE
          • UPCA_P2
          • UPCA_P5
          • UPCE
          • UPCE_COMPOSITE
          • UPCE_P2
          • UPCE_P5

        labelSubType
        type: string
        description: May contain addition data about the label type
        aimID
        type: string (length=3)
        description: The standard 3 character ISO/IEC label identifier. For possible values, see the ISO/IEC 15424 specification. Labels without a defined value are reported as ]X0
        labelSource
        type: string
        description: The source of the scanned label. The pieces may have been from multiple source so the "true source" is unknown.
        enum:

        • horizontal: The horizontal plane (below the platter) on the base barcode scanner
        • vertical: The vertical plane (in the bonnet) on the base barcode scanner
        • tdr: The Top Down Reader (TDR)
        • cfr: The Customer Facing Reader (CFR) attached to the TDR
        • stitched: The label was a result of stitching multiple pieces together.

        labelData
        type: string description: The label data
        Example:

{
"data" :
{
"aimID" : "]E0",
"eventId" : "28",
"labelIdType" : "UPCA",
"labelSource" : "vertical",
"labelSubType" : ""
,
"labelData" : "673419356602"},
"type" : "scannerSystemLabelReadMsg"
}

scannerSystemScaleMsg:

ContentType: application/json
payload:

  • type: object
  • required:
    • type
    • data
  • properties:
    • type:
      • type: string
      • description: Type of message
      • enum: scannerSystemScaleMsg
    • data:
      • type: object

      • required:
        eventId
        scaleEventType
        type: string
        description: The type of scale event. This is only sent when using the internal scale.
        enum:

        • STEADY_WEIGHT: Scale is at a steady weight
        • ZERO_WEIGHT: Scale is at center of zero (0.00)
        • STEADY_WEIGHT_CHANGED: Weight is steady but has changed from the prior steady weight without going to steady zero before.

        scaleWeight
        type: string
        description: The weight on the scale
        scaleUnits
        type: string
        description: Units of the scale weight
        enum:

        • lb
        • kg

Example:

{
"data" :
{
"eventId" : "18",
"scaleEventType" : "STEADY_WEIGHT",
"scaleUnits" : "lb",
"scaleWeight" : "0.63"
},
"type" : "scannerSystemScaleMsg"
}
{
"data" :
{
"eventId" : "19",
"scaleEventType" : "STEADY_WEIGHT_CHANGED",
"scaleUnits" : "lb",
"scaleWeight" : "1.20"
},
"type" : "scannerSystemScaleMsg"
}
{
"data" :
{
"eventId" : "20",
"scaleEventType" : "ZERO_WEIGHT",
"scaleUnits" : "lb",
"scaleWeight" : "0.0"
},
"type" : "scannerSystemScaleMsg"
}

scannerSystemScaleSentryMsg:

ContentType: application/json
payload:

  • type: object
  • required:
    • type
    • data
  • properties:
    • type:
      • type: string
      • description: Type of message
      • enum: scannerSystemScaleSentryMsg
    • data:
      • type: object
      • required:
        eventId
        scaleSentryEventType
        type: string description: The type of Scale Sentry event enum:
        • BEAM_BLOCKED
        • BEAM_UNBLOCKED

Example:

{
"data" :
{
"eventId" : "81",
"scaleSentryEventType" : "BEAM_BLOCKED"
},
"type" : "scannerSystemScaleSentryMsg"
}
{
"data" :
{
"eventId" : "83",
"scaleSentryEventType" : "BEAM_UNBLOCKED"
},
"type" : "scannerSystemScaleSentryMsg"
}

scannerSystemObjectDetectMsg:

ContentType: application/json
payload:

  • type: object
  • required:
    • type
    • data
  • properties:
    • type:
      • type: string
      • description: Type of message
      • enum: scannerSystemObjectDetectMsg
    • data:
      • type: object
      • required:
        eventId
        objectDetectEventType
        type: string description: The type of Object Sense event enum:
        • OBJECT_SEEN
        • OBJECT_NOT_SEEN

Example:

{
"data" :
{
"eventId" : "60",
"objectDetectEventType" : "OBJECT_SEEN"
},
"type" : "scannerSystemObjectDetectMsg"
}
{
"data" :
{
"eventId" : "61",
"objectDetectEventType" : "OBJECT_NOT_SEEN"
},
"type" : "scannerSystemObjectDetectMsg"
}