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.
Input params.limitnumber
optional Number of records to request.
params.pagenumber
optional Page number to request.
Default: 1
params.fieldsFuelRecordField[]
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 dataLinxioFuelRecord[] | null
optional Fuel transaction records for the requested page.
metaLinxioPaginationMeta | null
optional errorLinxioError | null
optional Typed SDK error when records cannot be loaded.
const records = await linxio.fuel. records ({
fields: [ "transactionDate" , "vehicleIds" , "total" ],
limit: 100 ,
});
if (records.error) {
throw records.error;
}
Input paramsLinxioFuelListParams
optional Same filters and field projection as fuel.records().
Returns dataLinxioFuelRecord[] | null
optional Flat array containing every loaded fuel record.
errorLinxioError | null
optional Typed SDK error if any page fails.
const { data : records , error } = await linxio.fuel. iterateRecords ({
limit: 100 ,
});
if (error) {
throw error;
}
Input paramsLinxioFuelListParams
optional Same filters and field projection as fuel.records().
Returns yieldLinxioFuelRecord
optional One fuel record at a time.
throwsLinxioError
optional Thrown if a page request fails.
for await ( const record of linxio.fuel. streamRecords ({ limit: 100 })) {
console. log (record.transactionDate, record.total);
}
Input paramsLinxioFuelListParams
optional Pagination, field projection, and report filters such as date range or vehicle filters when supported.
Returns dataLinxioFuelSummaryRecord[] | null
optional Summary rows with depot, groups, mileage, refueled, regNo, and total when supplied.
metaLinxioPaginationMeta | null
optional errorLinxioError | null
optional Typed SDK error when summary rows cannot be loaded.
const summary = await linxio.fuel. summary ({
limit: 100 ,
startDate: "2026-06-01T00:00:00+08:00" ,
endDate: "2026-06-08T00:00:00+08:00" ,
});
if (summary.error) {
throw summary.error;
}
Input paramsLinxioFuelListParams
optional Pagination, field projection, and vehicle/date filters accepted by Linxio.
Returns dataLinxioFuelRecord[] | null
optional Fuel records from the by-vehicle endpoint.
metaLinxioPaginationMeta | null
optional errorLinxioError | null
optional Typed SDK error when records cannot be loaded.
const records = await linxio.fuel. recordsByVehicle ({
vehicleId,
limit: 100 ,
});
if (records.error) {
throw records.error;
}
Input paramsLinxioFuelListParams
optional Pagination, field projection, sorting, and dashboard-derived filters.
Returns dataLinxioFuelCard[] | null
optional Fuel card records with id, cardNumber, and vehicleId when supplied.
metaLinxioPaginationMeta | null
optional errorLinxioError | null
optional Typed SDK error when cards cannot be loaded.
const cards = await linxio.fuel. cards ({ limit: 100 });
if (cards.error) {
throw cards.error;
}
Input fuelTypes() does not take parameters.
Returns dataLinxioRecord[] | null
optional Fuel type records. Shape can vary by tenant.
errorLinxioError | null
optional Typed SDK error when fuel types cannot be loaded.
const fuelTypes = await linxio.fuel. fuelTypes ();
if (fuelTypes.error) {
throw fuelTypes.error;
}
Input Fuel transaction record identifier.
vehicleIdLinxioId
required Vehicle identifier to assign to the transaction.
Returns dataLinxioFuelRecord | null
optional Updated fuel transaction record.
errorLinxioError | null
optional Typed SDK error when assignment fails.
const assigned = await linxio.fuel. assignTransaction (recordId, vehicleId);
if (assigned.error) {
throw assigned.error;
}