Overview
A TypeScript SDK for Linxio fleet, device, driver, geofence, route, sensor, fuel, and realtime APIs.
linxio-js is a Node.js SDK for interacting with Linxio's REST and realtime APIs, built by Ambulance Western Australia and released as open source software under our Open Source Software Projects (OSSP) program, which seeks to share our solutions with the community.
The SDK is designed for Node.js projects, operational scripts, and backend services:
createClient()gives you one clear entry point for the SDK.- Domain services cover documented Linxio workflows and stable dashboard-derived endpoints.
- Service methods return
{ data, error }results for straightforward script control flow. - Automatic JWT refresh coalesces concurrent 401 recovery into one refresh call.
- Idempotent requests retry transient failures with exponential backoff.
- List endpoints return normalized pages, auto-pagination helpers, and streaming iterators.
client.request()is available for advanced or tenant-specific endpoints.- Realtime helpers wrap Linxio's Socket.IO
coordinatesandnotificationschannels.
Start with Getting Started, then use the SDK Reference for TypeScript method signatures or the API Reference for HTTP endpoints, parameters, and response shapes.
import { createClient } from "@ambulancewa/linxio-js";
const linxio = createClient();
await linxio.auth.login({
email: process.env.LINXIO_EMAIL!,
password: process.env.LINXIO_PASSWORD!,
});
const { data: vehicles, error } = await linxio.vehicles.iterate({
fields: ["id", "regNo", "lastLoggedAt"],
limit: 100,
});
if (error) {
throw error;
}
for (const vehicle of vehicles) {
console.log(vehicle.id, vehicle.regNo, vehicle.lastLoggedAt);
}