On uploading Mileage and OBD2


This tutorial is the recommended next reading after adding your first vehicle. It will explain how to upload vital information in order to access all of our services. Especially if you’re looking to access Maintenance or Diagnostic information.

Important note about mileage
In order for CarMD to assure our customers of accurate maintenance and diagnostic results, it is important for us to receive regular mileage inputs. Missing, outdated or incorrect mileage degrades our ability to provide accurate maintenance recommendations and predicted repairs. A determination of wear and tear, mileage can also affect the fix. This is similar to how a doctor might treat a baby versus a senior citizen with similar symptoms.

To help assure the accuracy of scheduled maintenance, predictive diagnostics and recommended fix when you need it most, we ask that you report mileage to us at least daily for each vehicle.

Service availability

Several of our services require updated data on the vehicle. Here are the services organized by their requirements:

VIN only:

  • Safety Recalls
  • TSBs
  • Vehicle Warranties
  • OBD2 Plugin Location
  • Decode VIN

VIN + Mileage:

  • Maintenance Services
  • Predictive Failures

VIN + Mileage + OBD2

  • Diagnostic Information



The VIN or Vehicle Identification Number, is available on all 1996 and newer vehicles sold in US and Canada. When adding a vehicle, you may have noticed that it only accepts VINs as identification limiting our service to regions that have the US format. While we do plan on expanding our coverage to other regions such as Asia and Europe, currently our focus is on providing the best service available for vehicles in the US and Canada.


Mileage is the current odometer reading of a vehicle. It can be found through the OBD2 port using some dongles, or provided as an approximation through GPS readings, or entered manually by the user. Since VIN and Mileage do not require a dongle to attain, all services with just these requirements do not necessitate additional hardware (such as an OBD2 dongle).

OBD2 Data

This is attained by pulling data from a vehicle’s computer using a dongle or tool made for that purpose. It can only be attained by hardware or until OEMs make cars that output this data wirelessly. CarMD looks at several layers of information to derive it’s diagnostic data.

Using this data CarMD is able to determine if a vehicle has been recently erased to clear the check engine light or provide the cost/parts/labor of its repair.

Sending us Mileage

When a vehicle is initially added, we request the VIN and initial mileage. However as the vehicle continues to be of use, our system requires regular updates in mileage and/or OBD2 data in order to provide updates such as new maintenance schedules, notices of upcoming possible failures, or diagnostic information.

We’ll go through uploading some sample Mileage information:

POST Upload Payload


payload['vehicleID']	=	addVehicleResponse['data']['vehicleID']
payload['mileage']	=	500


response['message']['code']	==	0	// success!

That wasn’t so bad. Now just with this, you’re all set up to start using our Scheduled Maintenance Module.

Continue reading for how to provide us OBD2 information.

Sending us OBD2 Data

Our service accepts OBD2 data in either raw format or as parsed content. If your tool/dongle is able to provide j1979 raw format, then you’re in luck. Its a straight pass through to us. However if not or if the tool/dongle provides a modified raw format, then there is some effort involved in parsing the data before passing it through to us.

Raw format upload
POST Upload Payload


payload['vehicleID']	=	addVehicleResponse['data']['vehicleID']
payload['mileage']	=	500
payload['rawType'] = 0
payload['rawData'] = 'yourrawdatahere'


response['message']['code']	==	0	// success!

Parsed format upload
POST Upload Payload


payload['vehicleID']  =	addVehicleResponse['data']['vehicleID']
payload['mileage']    =	500

The most important parts are:


pwrPrimary is the primary or check engine light code. This is the main code that the vehicle has determined is the main cause of the check engine light. There will only be one. If pulling codes and several codes are provided, those are typically the secondary codes. If the check engine light is off, then there will not be a primary code.

monitor these are tests the vehicle will run to determine the status of the vehicle. This field accepts the raw monitor values pulled from the obd. No additional formatting is necessary.

freezeFrame this is a list of information about the status of the car when the primary code was thrown. The parsing of this field is as follows:

For most dongles the process to pull this information looks something like this:


response['message']['code']	==	0	// success!

That’s it for setting up and uploading data to CarMD SaaS.

vinhnExplanation on VIN and Mileage and OBD2