Avatar

Need API Code samples for extracting Odometer Reading

0

Hi All,

I am new to this. Our organisation recently installed these devices. 

We manage predictive maintenance using an ERP software.

This ERP system needs the meter readings for managing and calculating the scheduled services.

We are currently typing in these readings which we want to avoid.

The expectation is that the GEOTAB device would allow us to avoid the manual entry.

So we have setup the Securatrak system with the same identifying codes as the ERP software

 

We are looking for code samples that will allow us to extract the meter readings (variously referred to as mileage, kms etc)

Can you give us some direction?

If someone has a code it would be just great otherwise, even if we identify which apis gets etc are to be used, that will be next best thing.

 

Shai

Shai Bedarkar

Please sign in to leave a comment.

3 comments

0
Avatar

See the SDK for code samples:

don't forget to add appropriate error checking.

You can create multiple calls using the Multicall object to limit your external calls.

API _api = new API("username", "password", null, "database", "server");
_api.Authenticate();
List<Device> deviceList = _api.Call<List<Device>>("Get", typeof(Device), new
{
search = new DeviceSearch
{
Name = "myDeviceName"
}
});

List<StatusData> list = _api.Call<List<StatusData>>("Get", typeof(StatusData), new
{
search = new StatusDataSearch
{
DeviceSearch = new DeviceSearch { Id = deviceList[0].Id },
FromDate = DateTime.UtcNow,
DiagnosticSearch = new DiagnosticSearch { Id = KnownId.DiagnosticOdometerAdjustmentId}
}
});

Michael Head 0 votes
0
Avatar

If you want us to manage that and push you data, we can set that up.  

For a cheap solution, just create an odometer and engine hours report from geotab and upload it into your system assuming your system can take an Excel or CSV file and your needs are not real-time but weekly or monthly.

Michael Head 0 votes