Odometer
Handles Odometer related requests with IMS web services.
Record Odometer Reading
This feature allows applications to upload odometer readings with photographic evidence. Use the following API to upload the odometer image.
UploadOdometerImage
Uploads an odometer snapshot for a vehicle.
Parameters:
vehicleId
: The ID of the vehicle that the odometer snapshot is forimageData
: Image data in JPEG formatdistance
: The number shown on the odometer when the photo is takenutcTimestampMillis
: The Unix epoch UTC timestamp in milliseconds for when the odometer snapshot was takenlatitude
: Optional latitude of the odometer snapshot locationlongitude
: Optional longitude of the odometer snapshot locationcompletionHandler
: Called when the request has completed (iOS only)
Concrete example
let odometerService = OdometerService()
odometerService.uploadOdometerImage(
vehicleId: vehicleId,
imageData: imageData,
distance: distance,
utcTimestampMillis: utcTimestampMillis,
latitude: latitude,
longitude: longitude
) { result in
switch result {
case .success(_):
// upload successful
case .failure(let error):
// error
}
}
Last updated