linxio-js
API Reference

Realtime

Socket.IO realtime coordinate and notification namespaces.

Realtime uses https://track.linxio.com and the Socket.IO path /socket.io. The SDK handles token query parameters and reconnect behaviour.

/coordinates namespace

Connect to live coordinates

https://track.linxio.com/coordinateslinxio.realtime.onPosition(vehicleIds, handler)

Receives live vehicle coordinate payloads after subscribing to vehicle IDs.

Connection parameters

string
required
JWT token passed as a Socket.IO query parameter.
/socket.io
optional
Socket.IO path.
object
optional
Object parameter. Expand to see child parameters.
Show child parameters
number[]
required
Vehicle IDs sent with the subscribe event.

Payload fields

LinxioId
optional
Vehicle identifier.
number
optional
Current coordinate.
number
optional
Speed when supplied.
number
optional
Heading when supplied.
ISODateString
optional
Timestamp when supplied.

/notifications namespace

Connect to notifications

https://track.linxio.com/notificationslinxio.realtime.onNotification(handler)

Receives Linxio notification payloads for notifications configured in the dashboard for the authenticated user.

Connection parameters

string
required
JWT token passed as a Socket.IO query parameter.
/socket.io
optional
Socket.IO path.

Payload fields

LinxioId
optional
Notification identifier when supplied.
string
optional
Notification type when supplied.
string
optional
Notification message when supplied.
LinxioId | null
optional
Related vehicle when supplied.
ISODateString
optional
Timestamp when supplied.

On this page