linxio-js
SDK Reference

SDK Reference

TypeScript client options, result contracts, service pages, and shared SDK conventions.

The SDK reference is split by service so scripts and agents can retrieve the piece they need without loading the whole surface area.

Services

Service Surface
linxio.auth
loginverifyOtprefreshmelogout
linxio.vehicles
listiteratestreamgetcreateupdatearchiverestoregetOdometerrecalibrateOdometergetEngineHourscounttypes
linxio.devices
listiteratestreamgetcreateupdateinstalluninstallarchiverestorecoordinatessensorshistoryvendorsinstallationscameras
linxio.users, linxio.clients, linxio.drivers, linxio.resellers
userclientdriverand reseller account workflows
linxio.geofences
area and area-group lifecycle workflows
linxio.fuel
recordssummariescardsfuel typestransaction assignment
linxio.reports, linxio.digitalForms
scheduled reports and digital form answer downloads
linxio.routes, linxio.sensors, linxio.cameras
route historytemperature/humidity reportsand camera events
linxio.metadata
read-only tenant settings and reference data
linxio.realtime
connectsubscribeonPositiononNotificationdisconnect
linxio.request, linxio.http
raw HTTP access with SDK authretrytimeoutand refresh behavior
exported utilities
result helperspagination helpersendpoint catalogue helpers

Create a client

Create a client

createClient(options)

Creates a reusable Linxio SDK client. Use one client per Linxio session in scripts, workers, and backend services.

Options

baseUrl
string
optional
REST API base URL.
Default: https://api.linxio.com/api
token
string
optional
JWT bearer token for an existing session.
refreshToken
string
optional
Refresh token used for automatic 401 recovery.
timeoutMs
number
optional
Per-request timeout in milliseconds.
Default: 30000
retry
RetryOptions
optional
Retry configuration for idempotent requests that fail with transient network or 5xx errors.
fetch
FetchLike
optional
Custom fetch implementation for tests, proxies, or non-standard runtimes.
realtimeBaseUrl
string
optional
Socket.IO tracking host.
Default: https://track.linxio.com

Result Contract

Domain service methods return result objects so scripts can branch without wrapping every call in try/catch.

LinxioResult<T>

data
T | null
optional
Successful response payload. Null when the call failed.
error
LinxioError | null
optional
Typed SDK error. Null when the call succeeded.

LinxioPageResult<T>

data
T[] | null
optional
Current page of records, or null when the request failed.
error
LinxioError | null
optional
Typed SDK error. Null when the page was loaded successfully.
meta
{ page: number; limit: number; total: number } | null
optional
Normalized pagination metadata.
aggregations
unknown
optional
Aggregation payload returned by Linxio when the endpoint includes it.

Shared list parameters

Parameters

limit
number
optional
Number of records to request per page.
page
number
optional
Page number to request.
Default: 1
sort
string
optional
Sort expression accepted by the underlying Linxio endpoint.
fields
string[]
optional
Mapped to Linxio's fields[] query parameter to keep responses small.
[filter]
string | number | boolean | string[] | number[]
optional
Additional endpoint-specific filters are forwarded as query parameters.

Pagination helpers

Use list() when you want one page, iterate() when you want a result object containing every page, and stream() when you want to process large tenants without holding every record in memory.

One page
const page = await linxio.vehicles.list({
  fields: ["id", "regNo"],
  limit: 100,
  page: 1,
});
All pages with a result object
const { data: vehicles, error } = await linxio.vehicles.iterate({
  fields: ["id", "regNo", "lastLoggedAt"],
  limit: 100,
});

if (error) {
  throw error;
}
Lazy streaming
for await (const vehicle of linxio.vehicles.stream({ limit: 100 })) {
  console.log(vehicle.id, vehicle.regNo);
}

On this page