linxio-js
SDK Reference

Users, Clients, Drivers, and Resellers

User management, client account users, driver assignment, and reseller account helpers.

These services are related but not interchangeable. linxio.users works at the account user endpoint, linxio.clients works with client accounts and their users, linxio.drivers focuses on driver workflows, and linxio.resellers exposes reseller account lookup.

users.list()

GET

List users

/userslinxio.users.list(params)

Loads one page of users visible to the authenticated account.

Input

params.limit
number
optional
Number of users to request.
params.page
number
optional
Page number to request.
Default: 1
params.fields
UserField[]
optional
Optional fields such as id, email, fullName, role, or status.
params.role
string
optional
Optional role filter.

Returns

data
LinxioUser[] | null
optional
Users for the requested page.
meta
LinxioPaginationMeta | null
optional
Pagination metadata.
error
LinxioError | null
optional
Typed SDK error when the page fails.

users.iterate()

GET

Load all users

/userslinxio.users.iterate(params)

Auto-paginates all user pages and returns a single result object.

Input

params
LinxioUserListParams
optional
Same filters and field projection as users.list().

Returns

data
LinxioUser[] | null
optional
Flat array containing every loaded user.
error
LinxioError | null
optional
Typed SDK error if any page fails.

users.stream()

GET

Stream users

/userslinxio.users.stream(params)

Streams users lazily across pages.

Input

params
LinxioUserListParams
optional
Same filters and field projection as users.list().

Returns

yield
LinxioUser
optional
One user at a time.
throws
LinxioError
optional
Thrown if a page request fails.

users.get()

GET

Get a user

/users/{userId}linxio.users.get(userId)

Fetches one user by ID.

Input

userId
LinxioId
required
User identifier.

Returns

data
LinxioUser | null
optional
User record.
error
LinxioError | null
optional
Typed SDK error when the user cannot be loaded.

users.create()

POST

Create a user

/userslinxio.users.create(payload)

Creates a user. Role and permission validation depends on the authenticated account and tenant configuration.

Input

payload.email
string
optional
User email address.
payload.firstName
string
optional
Given name.
payload.lastName
string
optional
Family name.
payload.fullName
string
optional
Full display name.
payload.phone
string
optional
Phone number.
payload.roleId
LinxioId
optional
Role identifier from metadata.roles().

Returns

data
LinxioUser | null
optional
Created user.
error
LinxioError | null
optional
Typed SDK error when creation fails.

users.update()

PATCH

Update a user

/users/{userId}linxio.users.update(userId, payload)

Updates a user.

Input

userId
LinxioId
required
User identifier.
payload
LinxioUserPayload
required
Partial user payload containing fields to change.

Returns

data
LinxioUser | null
optional
Updated user.
error
LinxioError | null
optional
Typed SDK error when update fails.

users.archive()

PATCH

Archive a user

/users/{userId}/archivelinxio.users.archive(userId)

Soft-archives a user.

Input

userId
LinxioId
required
User identifier.

Returns

data
void
optional
Undefined on success.
error
LinxioError | null
optional
Typed SDK error when archive fails.

users.restore()

PATCH

Restore a user

/users/{userId}/restorelinxio.users.restore(userId)

Restores a previously archived user.

Input

userId
LinxioId
required
Archived user identifier.

Returns

data
void
optional
Undefined on success.
error
LinxioError | null
optional
Typed SDK error when restore fails.

clients.list()

GET

List client accounts

/clients/jsonlinxio.clients.list(params)

Loads one page of client accounts visible to the authenticated account.

Input

params
LinxioClientUserListParams
optional
Pagination, field projection, sorting, role, and dashboard-derived filters.

Returns

data
LinxioClientAccount[] | null
optional
Client account records.
meta
LinxioPaginationMeta | null
optional
Pagination metadata.
error
LinxioError | null
optional
Typed SDK error when the page fails.

clients.get()

GET

Get a client account

/clients/{clientId}linxio.clients.get(clientId)

Fetches one client account by ID.

Input

clientId
LinxioId
required
Client account identifier.

Returns

data
LinxioClientAccount | null
optional
Client account record.
error
LinxioError | null
optional
Typed SDK error when the client cannot be loaded.

clients.listUsers()

GET

List client users

/clients/{clientId}/userslinxio.clients.listUsers(clientId, params)

Loads one page of users for a client account.

Input

clientId
LinxioId
required
Client account identifier.
params.role
string
optional
Optional role filter, such as driver.
params.limit
number
optional
Number of users to request.
params.page
number
optional
Page number to request.
Default: 1

Returns

data
LinxioUser[] | null
optional
Client users for the requested page.
meta
LinxioPaginationMeta | null
optional
Pagination metadata.
error
LinxioError | null
optional
Typed SDK error when the page fails.

clients.iterateUsers()

GET

Load all client users

/clients/{clientId}/userslinxio.clients.iterateUsers(clientId, params)

Auto-paginates users for one client account.

Input

clientId
LinxioId
required
Client account identifier.
params
LinxioClientUserListParams
optional
Same filters as clients.listUsers().

Returns

data
LinxioUser[] | null
optional
Flat array containing every loaded client user.
error
LinxioError | null
optional
Typed SDK error if any page fails.

clients.streamUsers()

GET

Stream client users

/clients/{clientId}/userslinxio.clients.streamUsers(clientId, params)

Streams client users lazily across pages.

Input

clientId
LinxioId
required
Client account identifier.
params
LinxioClientUserListParams
optional
Same filters as clients.listUsers().

Returns

yield
LinxioUser
optional
One client user at a time.
throws
LinxioError
optional
Thrown if a page request fails.

clients.getUser()

GET

Get a client user

/clients/{clientId}/users/{userId}linxio.clients.getUser(clientId, userId)

Fetches one user within a client account.

Input

clientId
LinxioId
required
Client account identifier.
userId
LinxioId
required
User identifier within that client account.

Returns

data
LinxioUser | null
optional
Client user record.
error
LinxioError | null
optional
Typed SDK error when the user cannot be loaded.

clients.createUser()

POST

Create a client user

/clients/{clientId}/userslinxio.clients.createUser(clientId, payload)

Creates a user inside a client account.

Input

clientId
LinxioId
required
Client account identifier.
payload
LinxioUserPayload
required
User fields such as email, name, phone, and roleId.

Returns

data
LinxioUser | null
optional
Created client user.
error
LinxioError | null
optional
Typed SDK error when creation fails.

clients.updateUser()

POST

Update a client user

/clients/{clientId}/users/{userId}linxio.clients.updateUser(clientId, userId, payload)

Updates a user inside a client account.

Input

clientId
LinxioId
required
Client account identifier.
userId
LinxioId
required
User identifier.
payload
LinxioUserPayload
required
Partial user payload containing fields to change.

Returns

data
LinxioUser | null
optional
Updated client user.
error
LinxioError | null
optional
Typed SDK error when update fails.

drivers.list()

GET

List drivers

/drivers or /clients/{clientId}/users?role=driverlinxio.drivers.list(params)

Lists drivers. Pass clientId to use the documented client-users driver endpoint; omit it to use the dashboard-derived /drivers endpoint.

Input

params.clientId
LinxioId
optional
Client account identifier. When supplied, role=driver is sent automatically.
params.limit
number
optional
Number of drivers to request.
params.fields
DriverField[]
optional
Optional fields such as id, fullName, email, phone, or role.

Returns

data
LinxioDriver[] | null
optional
Drivers for the requested page.
meta
LinxioPaginationMeta | null
optional
Pagination metadata.
error
LinxioError | null
optional
Typed SDK error when the page fails.

drivers.iterate()

GET

Load all drivers

/drivers or /clients/{clientId}/users?role=driverlinxio.drivers.iterate(params)

Auto-paginates driver pages into one result object.

Input

params
LinxioDriverListParams
optional
Same parameters as drivers.list().

Returns

data
LinxioDriver[] | null
optional
Flat array containing every loaded driver.
error
LinxioError | null
optional
Typed SDK error if any page fails.

drivers.stream()

GET

Stream drivers

/drivers or /clients/{clientId}/users?role=driverlinxio.drivers.stream(params)

Streams drivers lazily across pages.

Input

params
LinxioDriverListParams
optional
Same parameters as drivers.list().

Returns

yield
LinxioDriver
optional
One driver at a time.
throws
LinxioError
optional
Thrown if a page request fails.

drivers.assignToVehicle()

POST

Assign driver to vehicle

/vehicle/{vehicleId}/set-driver/{driverId}linxio.drivers.assignToVehicle(vehicleId, driverId)

Assigns a driver to a vehicle.

Input

vehicleId
LinxioId
required
Vehicle receiving the driver assignment.
driverId
LinxioId
required
Driver user identifier.

Returns

data
void
optional
Undefined on success.
error
LinxioError | null
optional
Typed SDK error when assignment fails.

drivers.unassignFromVehicle()

POST

Unassign driver from vehicle

/vehicle/{vehicleId}/unset-driver/{driverId}linxio.drivers.unassignFromVehicle(vehicleId, driverId)

Removes a driver assignment from a vehicle.

Input

vehicleId
LinxioId
required
Vehicle identifier.
driverId
LinxioId
required
Driver user identifier.

Returns

data
void
optional
Undefined on success.
error
LinxioError | null
optional
Typed SDK error when unassignment fails.

resellers.list()

GET

List reseller accounts

/resellerlinxio.resellers.list()

Lists reseller accounts visible to the authenticated account.

Input

none
void
optional
list() does not take parameters.

Returns

data
LinxioReseller[] | null
optional
Reseller account records.
error
LinxioError | null
optional
Typed SDK error when resellers cannot be loaded.

resellers.get()

GET

Get a reseller account

/reseller/{resellerId}linxio.resellers.get(resellerId)

Fetches one reseller account by ID.

Input

resellerId
LinxioId
required
Reseller identifier.

Returns

data
LinxioReseller | null
optional
Reseller account record.
error
LinxioError | null
optional
Typed SDK error when the reseller cannot be loaded.

On this page