Odometer
Handles Odometer related requests with IMS web services.
Last updated
Handles Odometer related requests with IMS web services.
Last updated
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 for
imageData
: Image data in JPEG format
distance
: The number shown on the odometer when the photo is taken
utcTimestampMillis
: The Unix epoch UTC timestamp in milliseconds for when the odometer snapshot was taken
latitude
: Optional latitude of the odometer snapshot location
longitude
: Optional longitude of the odometer snapshot location
completionHandler
: 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
}
}