.. _SystemIntegration_HandlingANPRScanner: ############### ANPRScanner ############### Events ****** Get last scanned item ********************* Returns the last scanned number plate, with the scanned timestamp. **URL parameters** * **hostIp**: ip address of the API host. * **deviceId**: id of the device. .. http:get:: https://{hostIp}:7081/hal/devices/{deviceId}/anprscanner/lastscanned **Example request**: .. sourcecode:: http GET /hal/devices/anpr1/anprscanner/lastscanned HTTP/1.1 Accept: application/json Authorization: Bearer eyJhbGciOiJS... **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "licensePlate": "1-ABC-123", "country": "BE", "score": 80, "base64Image": "string (base64)", "timeStampUtc": "datetime (utc)", "context": "IN", } :statuscode 200: OK :statuscode 204: No licenseplate scanned yet :statuscode 400: Bad Request. A descriptive error comes along with this error. :statuscode 401: Unauthorized. Something is wrong with the :mailheader:`Authorization` header of the request :statuscode 403: Forbidden. Something is wrong with the claims of the user. :statuscode 500: Internal Server Error :resheader Content-Type: defines the serialization format for the response body (this depends on the :mailheader:`Accept` header of the request) :>json string licensePlate: licenseplate (max 20 chars) :>json string country: country of issued licenseplate (max 20 chars) :>json integer score: reading score indicating the quality of the image analysis (from 0 until 100) :>json string base64Image: base64 encoded string that can be converted to an image (max 300000 chars) :>json string context: custom field (max 20 chars) ANPRScanner Events ==================== The websocket server will send an event to a registered websocket client when a license plate is recognized. The event has the following format: :: "messageType":1, "data": { "methodName":"receiveAnpr", "arguments": [{ "anprTags": [{ "licensePlate": "1-ABC-123", "country": "BE", "score": 80, "base64Image": "string (base64)", "timeStampUtc": "datetime (utc)", "context": "IN", }], "deviceId": "anpr1", "version": "1.0" }] }