linxio-js
SDK Reference

Fuel

Fuel transaction records, summaries, vehicle fuel rows, cards, fuel types, and transaction assignment.

Fuel endpoints are dashboard-derived and can include tenant-specific columns. The SDK keeps the common fields typed and leaves additional columns available on the returned record.

fuel.records()

GET

List fuel transactions

/fuel-cards/jsonlinxio.fuel.records(params)

Loads one page of fuel transaction records.

Input

params.limit
number
optional
Number of records to request.
params.page
number
optional
Page number to request.
Default: 1
params.fields
FuelRecordField[]
optional
Optional fields such as transactionDate, vehicleIds, driverId, refueled, total, fuelPrice, or petrolStation.
params.[filter]
QueryValue
optional
Additional fuel report filters forwarded as query parameters.

Returns

data
LinxioFuelRecord[] | null
optional
Fuel transaction records for the requested page.
meta
LinxioPaginationMeta | null
optional
Pagination metadata.
error
LinxioError | null
optional
Typed SDK error when records cannot be loaded.

fuel.iterateRecords()

GET

Load all fuel transactions

/fuel-cards/jsonlinxio.fuel.iterateRecords(params)

Auto-paginates fuel transaction records into one result object.

Input

params
LinxioFuelListParams
optional
Same filters and field projection as fuel.records().

Returns

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

fuel.streamRecords()

GET

Stream fuel transactions

/fuel-cards/jsonlinxio.fuel.streamRecords(params)

Streams fuel records lazily across pages.

Input

params
LinxioFuelListParams
optional
Same filters and field projection as fuel.records().

Returns

yield
LinxioFuelRecord
optional
One fuel record at a time.
throws
LinxioError
optional
Thrown if a page request fails.

fuel.summary()

GET

List fuel summary rows

/fuel-summary-reportlinxio.fuel.summary(params)

Loads one page of fuel summary report rows.

Input

params
LinxioFuelListParams
optional
Pagination, field projection, and report filters such as date range or vehicle filters when supported.

Returns

data
LinxioFuelSummaryRecord[] | null
optional
Summary rows with depot, groups, mileage, refueled, regNo, and total when supplied.
meta
LinxioPaginationMeta | null
optional
Pagination metadata.
error
LinxioError | null
optional
Typed SDK error when summary rows cannot be loaded.

fuel.recordsByVehicle()

GET

List fuel records by vehicle

/fuel-cards-by-vehicle/jsonlinxio.fuel.recordsByVehicle(params)

Loads fuel transaction rows grouped or filtered by vehicle.

Input

params
LinxioFuelListParams
optional
Pagination, field projection, and vehicle/date filters accepted by Linxio.

Returns

data
LinxioFuelRecord[] | null
optional
Fuel records from the by-vehicle endpoint.
meta
LinxioPaginationMeta | null
optional
Pagination metadata.
error
LinxioError | null
optional
Typed SDK error when records cannot be loaded.

fuel.cards()

GET

List fuel cards

/fuel-cards/jsonlinxio.fuel.cards(params)

Lists fuel card records. This endpoint shares the dashboard path used by fuel transaction records, so returned columns can depend on tenant setup.

Input

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

Returns

data
LinxioFuelCard[] | null
optional
Fuel card records with id, cardNumber, and vehicleId when supplied.
meta
LinxioPaginationMeta | null
optional
Pagination metadata.
error
LinxioError | null
optional
Typed SDK error when cards cannot be loaded.

fuel.fuelTypes()

GET

List fuel types

/fuel-typeslinxio.fuel.fuelTypes()

Lists fuel types configured by Linxio.

Input

none
void
optional
fuelTypes() does not take parameters.

Returns

data
LinxioRecord[] | null
optional
Fuel type records. Shape can vary by tenant.
error
LinxioError | null
optional
Typed SDK error when fuel types cannot be loaded.

fuel.assignTransaction()

PATCH

Assign fuel transaction to vehicle

/fuel-cards/record/{recordId}linxio.fuel.assignTransaction(recordId, vehicleId)

Assigns a fuel transaction record to a vehicle.

Input

recordId
LinxioId
required
Fuel transaction record identifier.
vehicleId
LinxioId
required
Vehicle identifier to assign to the transaction.

Returns

data
LinxioFuelRecord | null
optional
Updated fuel transaction record.
error
LinxioError | null
optional
Typed SDK error when assignment fails.

On this page