SDK Reference
Users, Clients, Drivers, and Resellers User management, client account users, driver assignment, and reseller account helpers.
Important
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.
Input Object parameter. Expand to see child parameters.
Show child parameters Number of users to request.
Page number to request.
Default: 1
fieldsUserField[]
optional User fields to include in the response projection.
Possible enum values
fullNameUser display name when supplied.
Returns Users for the requested page.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Pagination metadata.
Show child fields Total matching record count.
Typed SDK error when the page fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const users = await linxio.users. list ({
fields: [ "id" , "email" , "fullName" , "role" ],
limit: 100 ,
});
if (users.error) {
throw users.error;
} {
"data" : [
{
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
}
] ,
"meta" : {
"limit" : 100 ,
"page" : 1 ,
"total" : 2
} ,
"error" : null
}
Input Same filters and field projection as users.list().
Show child parameters fieldsUserField[]
optional User fields to include in the response projection.
Possible enum values
fullNameUser display name when supplied.
Maximum records to request per page.
Page number to request.
Default: 1
Sort expression accepted by Linxio for that endpoint.
[filter]QueryValue
optional Additional endpoint-specific filters forwarded as query parameters.
Returns Flat array containing every loaded user.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Typed SDK error if any page fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const { data : users , error } = await linxio.users. iterate ({
fields: [ "id" , "email" , "status" ],
limit: 100 ,
});
if (error) {
throw error;
} {
"data" : [
{
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
}
] ,
"error" : null
}
Input Same filters and field projection as users.list().
Show child parameters fieldsUserField[]
optional User fields to include in the response projection.
Possible enum values
fullNameUser display name when supplied.
Maximum records to request per page.
Page number to request.
Default: 1
Sort expression accepted by Linxio for that endpoint.
[filter]QueryValue
optional Additional endpoint-specific filters forwarded as query parameters.
Returns One user at a time.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Thrown if a page request fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
for await ( const user of linxio.users. stream ({ limit: 100 })) {
console. log (user.id, user.email);
} {
"yield" : {
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
}
}
Returns User record.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Typed SDK error when the user cannot be loaded.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const user = await linxio.users. get (userId);
if (user.error) {
throw user.error;
} {
"data" : {
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
} ,
"error" : null
}
Input Object parameter. Expand to see child parameters.
Show child parameters Role identifier from metadata.roles().
Returns Created user.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Typed SDK error when creation fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const created = await linxio.users. create ({
email: "new-user@example.com" ,
firstName: "New" ,
lastName: "User" ,
roleId,
});
if (created.error) {
throw created.error;
} {
"data" : {
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
} ,
"error" : null
}
Input Partial user payload containing fields to change.
Show child parameters Returns Updated user.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Typed SDK error when update fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const updated = await linxio.users. update (userId, {
phone: "+61 400 000 000" ,
});
if (updated.error) {
throw updated.error;
} {
"data" : {
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
} ,
"error" : null
}
Returns Typed SDK error when archive fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const archived = await linxio.users. archive (userId);
if (archived.error) {
throw archived.error;
} {
"error" : null
}
Input Archived user identifier.
Returns Typed SDK error when restore fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const restored = await linxio.users. restore (userId);
if (restored.error) {
throw restored.error;
} {
"error" : null
}
Input Pagination, field projection, sorting, role, and dashboard-derived filters.
Show child parameters fieldsFieldSelector<TField>
optional Field projection sent as repeated fields[] query parameters.
Maximum records to request per page.
Page number to request.
Default: 1
Sort expression accepted by Linxio for that endpoint.
[filter]QueryValue
optional Additional endpoint-specific filters forwarded as query parameters.
Returns Client account records.
Show child fields Client account identifier.
namestring | null
optional Client account display name.
timezoneLinxioId | null
optional Timezone identifier when supplied.
Pagination metadata.
Show child fields Total matching record count.
Typed SDK error when the page fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const clients = await linxio.clients. list ({ limit: 100 });
if (clients.error) {
throw clients.error;
} {
"data" : [
{
"id" : 64553 ,
"name" : "Example" ,
"timezone" : 64553
}
] ,
"meta" : {
"limit" : 100 ,
"page" : 1 ,
"total" : 2
} ,
"error" : null
}
Input Client account identifier.
Returns Client account record.
Show child fields Client account identifier.
namestring | null
optional Client account display name.
timezoneLinxioId | null
optional Timezone identifier when supplied.
Typed SDK error when the client cannot be loaded.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
Input Client account identifier.
Object parameter. Expand to see child parameters.
Show child parameters Optional role filter, such as driver.
Number of users to request.
Page number to request.
Default: 1
fieldsUserField[]
optional User fields to include in the response projection.
Possible enum values
fullNameUser display name when supplied.
Returns Client users for the requested page.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Pagination metadata.
Show child fields Total matching record count.
Typed SDK error when the page fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const users = await linxio.clients. listUsers (clientId, {
role: "driver" ,
limit: 100 ,
});
if (users.error) {
throw users.error;
} {
"data" : [
{
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
}
] ,
"meta" : {
"limit" : 100 ,
"page" : 1 ,
"total" : 2
} ,
"error" : null
}
Input Client account identifier.
Same filters as clients.listUsers().
Show child parameters fieldsFieldSelector<TField>
optional Field projection sent as repeated fields[] query parameters.
Maximum records to request per page.
Page number to request.
Default: 1
Sort expression accepted by Linxio for that endpoint.
[filter]QueryValue
optional Additional endpoint-specific filters forwarded as query parameters.
Returns Flat array containing every loaded client user.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Typed SDK error if any page fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const { data : users , error } = await linxio.clients. iterateUsers (clientId, {
limit: 100 ,
});
if (error) {
throw error;
} {
"data" : [
{
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
}
] ,
"error" : null
}
Input Client account identifier.
Same filters as clients.listUsers().
Show child parameters fieldsFieldSelector<TField>
optional Field projection sent as repeated fields[] query parameters.
Maximum records to request per page.
Page number to request.
Default: 1
Sort expression accepted by Linxio for that endpoint.
[filter]QueryValue
optional Additional endpoint-specific filters forwarded as query parameters.
Returns One client user at a time.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Thrown if a page request fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
for await ( const user of linxio.clients. streamUsers (clientId, { limit: 100 })) {
console. log (user.id, user.email);
} {
"yield" : {
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
}
}
Input Client account identifier.
User identifier within that client account.
Returns Client user record.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Typed SDK error when the user cannot be loaded.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const user = await linxio.clients. getUser (clientId, userId);
if (user.error) {
throw user.error;
} {
"data" : {
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
} ,
"error" : null
}
Input Client account identifier.
User fields such as email, name, phone, and roleId.
Show child parameters Returns Created client user.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Typed SDK error when creation fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const created = await linxio.clients. createUser (clientId, {
email: "driver@example.com" ,
firstName: "Driver" ,
lastName: "Example" ,
roleId,
});
if (created.error) {
throw created.error;
} {
"data" : {
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
} ,
"error" : null
}
Input Client account identifier.
Partial user payload containing fields to change.
Show child parameters Returns Updated client user.
Show child fields emailstring | null
optional fullNamestring | null
optional rolestring | null
optional statusstring | null
optional Typed SDK error when update fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const updated = await linxio.clients. updateUser (clientId, userId, {
phone: "+61 400 000 000" ,
});
if (updated.error) {
throw updated.error;
} {
"data" : {
"email" : "user@example.com" ,
"fullName" : "Example User" ,
"id" : 64553 ,
"role" : "string" ,
"status" : "online"
} ,
"error" : null
}
Input Object parameter. Expand to see child parameters.
Show child parameters Client account identifier. When supplied, role=driver is sent automatically.
Number of drivers to request.
fieldsDriverField[]
optional Driver fields to include in the response projection.
Possible enum values
idDriver user identifier.
fullNameDriver display name.
emailDriver email address.
phoneDriver phone number.
Returns dataLinxioDriver[] | null
optional Drivers for the requested page.
Pagination metadata.
Show child fields Total matching record count.
Typed SDK error when the page fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
List drivers for a client const drivers = await linxio.drivers. list ({
clientId,
fields: [ "id" , "fullName" , "email" ],
limit: 100 ,
});
if (drivers.error) {
throw drivers.error;
} {
"data" : [
"string"
] ,
"meta" : {
"limit" : 100 ,
"page" : 1 ,
"total" : 2
} ,
"error" : null
}
Input Same parameters as drivers.list().
Show child parameters fieldsDriverField[]
optional Driver fields to include in the response projection.
Possible enum values
idDriver user identifier.
fullNameDriver display name.
emailDriver email address.
phoneDriver phone number.
Maximum records to request per page.
Page number to request.
Default: 1
Sort expression accepted by Linxio for that endpoint.
[filter]QueryValue
optional Additional endpoint-specific filters forwarded as query parameters.
Client account identifier. When supplied, the SDK lists client users with role=driver.
Returns dataLinxioDriver[] | null
optional Flat array containing every loaded driver.
Typed SDK error if any page fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
Input Same parameters as drivers.list().
Show child parameters fieldsDriverField[]
optional Driver fields to include in the response projection.
Possible enum values
idDriver user identifier.
fullNameDriver display name.
emailDriver email address.
phoneDriver phone number.
Maximum records to request per page.
Page number to request.
Default: 1
Sort expression accepted by Linxio for that endpoint.
[filter]QueryValue
optional Additional endpoint-specific filters forwarded as query parameters.
Client account identifier. When supplied, the SDK lists client users with role=driver.
Returns yieldLinxioDriver
optional Thrown if a page request fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
for await ( const driver of linxio.drivers. stream ({ clientId, limit: 100 })) {
console. log (driver.id, driver.fullName);
} {
"yield" : "string"
}
Input vehicleIdLinxioId
required Vehicle receiving the driver assignment.
Returns Typed SDK error when assignment fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const assigned = await linxio.drivers. assignToVehicle (vehicleId, driverId);
if (assigned.error) {
throw assigned.error;
} {
"error" : null
}
Input vehicleIdLinxioId
required Returns Typed SDK error when unassignment fails.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
const unassigned = await linxio.drivers. unassignFromVehicle (vehicleId, driverId);
if (unassigned.error) {
throw unassigned.error;
} {
"error" : null
}
Input list() does not take parameters.
Returns Reseller account records.
Show child fields namestring | null
optional Typed SDK error when resellers cannot be loaded.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.
Input resellerIdLinxioId
required Returns Reseller account record.
Show child fields namestring | null
optional Typed SDK error when the reseller cannot be loaded.
Show child fields Original cause when available.
HTTP method when the error came from a request.
API path when the error came from a request.
Request identifier from X-Request-Id when supplied.