Getting Device's Last Keep-alive Time
This page uses the Lynx API to retrieve details about a device's last keep-alive and last sale time. In the step-by-step guide below, you'll use the following endpoint:
Authentication
Refer to the Security & Token page of this documentation to learn how to access your tokens, and how to properly use it to authenticate your API requests.
Retrieving Machine's Status
Using the Get Specific Machine Statistics endpoint, providing it with the machine's unique identifier, you can retrieve details about the device's last activities.
curl -X GET "https://lynx.nayax.com/operational/api/v1/machines/<MACHINE_ID>/status" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-H "Content-Type: application/json"
Replace
<MACHINE_ID>
with the actual machine's unique identifier, you want to search for information.
The response will contain various timestamps and status information regarding the machine's recent activities. The code below is an example of the response format:
{
"CoinTubesChangeSum": 150,
"MachineCashBoxLevel": 75,
"CancelledTransactionsCount": 2,
"TemperatureFahrenheit": 70,
"TemperatureCelcius": 21,
"MachineRemarksUpdateDateTime": "2024-10-09T16:53:51.225Z",
"Machine24HEventCount": 5,
"CardSalesCounter": 120,
"ActorID": 2001492652,
"MachineID": 942488501,
"PickListGeneratedDateTime": "2024-10-08T14:53:51.225Z",
"MachineInstallationDate": "2023-10-01T10:00:00.000Z",
"InventoryCountDateTime": "2024-10-09T15:00:00.000Z",
"QTYSoldSinceLastVisitDEXSales": 30,
"LastCashSaleDateTime": "2024-10-09T16:30:00.000Z",
"LastCashlessSaleDateTime": "2024-10-09T16:45:00.000Z",
"LastDEXReadDateTime": "2024-10-09T12:00:00.000Z",
"LastGPRSFailureCount": 0,
"LastKeepAliveDateTime": "2024-10-09T17:30:00.000Z",
"LastPowerDownDateTime": "2024-10-08T18:00:00.000Z",
"LastPowerUpDateTime": "2024-10-08T18:05:00.000Z",
"LastReceptionLevel(RSSI)": -85,
"LastTransactionDateTime": "2024-10-09T16:45:00.000Z",
"LastVisitDateTime": "2024-10-08T13:00:00.000Z",
"LastLCDMSISDN(CLI)": "+1234567890",
"ReaderStateErrorDateTime": "2024-10-08T10:00:00.000Z",
"ReaderStateEnableDateTime": "2024-10-08T10:05:00.000Z",
"MachineStockRefilDateTime": "2024-10-09T14:00:00.000Z",
"MachineRemarks": "Regular maintenance performed",
"MachineStatusUpdateDateTime": "2024-10-09T16:53:51.225Z",
"LastCashlesstransactionID": 987654321,
"DeviceLastIPAddress": "192.168.1.10",
"QTYSoldSinceLastVisitOnlineSales": 20,
"LastCashCollectionDateTime(UTC)": "2024-10-09T14:00:00.000Z",
"Href": "https://lynx.nayax.com/machine/942488501/status",
"MachineMQTTStatus": true
}
Where:
LastKeepAliveDateTime
indicates the last time the device communicated with the server.LastCashSaleDateTime
andLastCashlessSaleDateTime
provide the times of the most recent cash and cashless sales.LastPowerDownDateTime
andLastPowerUpDateTime
show the last power cycle details.MachineRemarks
provides any notes or updates related to the machine.MachineMQTTStatus
shows the current connectivity status of the machine.
Updated 5 months ago