Renault's Secret Mileage API


Last year I reverse engineered Renault's Electric Car API. One of the curious omissions was mileage - it just doesn't appear there.

However! All is not lost. If you log in to your Renault Account - https://www.renault.co.uk/my-account/my-car.html - you'll get details back about your car including its make, model, date of next service, and mileage!

Website showing my car and its mileage

Why isn't this in the regular API? Who knows. But here's how to get it programmatically.

API

The API to call is:

https://www.renault.co.uk/content/renault_prod/en_GB/index/my-account/my-car/jcr:content.getvehicle.json?vin=VF1ABCDE012345678

You will need to stick your own VIN on the end.

That alone won't get you very far - the API requires authentication (not always a given with automotive services!) See bottom of this page for details.

Data

The data you get back is fairly unexciting:

{
    "lastMileageRefresh": "2017-10-15",
    "mileage": 2052,
    "averageMileage": 1973,
    "lastWorkshopVisitMileage": 1853,
    "portalServices": ["ZEPORTAL", "BATTERY", "RLINK"],
    "detailedVehicleName": "Dynamique Nav",
    "registrationNumber": "PK66LTE",
    "firstRegistrationDate": "2016-08-01",
    "electric": true,
    "vehicleManual": {
        "path": "//www.cdn.renault.com/content/dam/Renault/UK/owner-services/private/zoe/X101VE/manual.pdf",
        "size": "5.46MB",
        "extension": "pdf"
    },
    "upcomingServices": [{
        "year": "2018",
        "month": "september",
        "items": [{
            "date": "2018-08-01",
            "code": "13",
            "name": "Replace the cabin filter"
        }, {
            "date": "2018-08-01",
            "code": "185",
            "name": "Z.E. A service"
        }, {
            "date": "2018-08-01",
            "code": "186",
            "name": "Z.E. B service"
        }]
    }, {
        "year": "2019",
        "month": "september",
        "items": [{
            "date": "2019-08-01",
            "code": "13",
            "name": "Replace the cabin filter"
        }, {
            "date": "2019-08-01",
            "code": "180",
            "name": "Replace 12 V battery"
        }]
    }],
    "vin": "VF1ABCDE012345678",
    "vehicleName": "ZOE",
    "smallImage": "https://3dv1.renault.com/ImageFromBookmark?configuration\u003dSKTPOU%2FSSCALL%2FPRLEX1%2FSTANDA%2FB10%2FEA2%2FDD%2FCAREG%2FVT003%2FRET02%2FRALU16%2FDRAP03%2FOV369%2FRDAR02%2FALEVA%2FSOP02C%2FTRNOR%2FLVAVIP%2FLVAREL%2FNAV3G5%2FRAD06D%2FALAR06%2FSAN913%2FBT4MR1\u0026databaseId\u003da3750aea-330d-4c06-91fd-d2ec8d82e763\u0026bookmarkSet\u003dRSITE\u0026bookmark\u003dEXT_34_AV\u0026profile\u003dHELIOS_OWNERSERVICES_SMALL_V2",
    "largeImage": "https://3dv1.renault.com/ImageFromBookmark?configuration\u003dSKTPOU%2FSSCALL%2FPRLEX1%2FSTANDA%2FB10%2FEA2%2FDD%2FCAREG%2FVT003%2FRET02%2FRALU16%2FDRAP03%2FOV369%2FRDAR02%2FALEVA%2FSOP02C%2FTRNOR%2FLVAVIP%2FLVAREL%2FNAV3G5%2FRAD06D%2FALAR06%2FSAN913%2FBT4MR1\u0026databaseId\u003da3750aea-330d-4c06-91fd-d2ec8d82e763\u0026bookmarkSet\u003dRSITE\u0026bookmark\u003dEXT_34_DESSUS\u0026profile\u003dHELIOS_OWNERSERVICES_LARGE",
    "identifier": "X101VE"
}

Authentication

In order to get these data, you will need a username and password for the Renault website. Once logged in, you should be able to inspect the requests your browser makes. All you need is the X-Mapping and JSESSIONID part of the cookie. You'll end up with a request like:

curl 'https://www.renault.co.uk/content/renault_prod/en_GB/index/my-account/my-car/jcr:content.getvehicle.json?vin=VF1ABCDE012345678' -H 'Cookie: X-Mapping-pjobmcgf=123456789; JSESSIONID=abcdefghij;

If you dig around the Renault site, you'll see they use Apigee and helpfully include their clientKey and apiKey in some of the JSON they send to your browser. I'm sure people smarter than me can figure out how to use them.

The Cake Is A Lie

I am not convinced that this is live data. It looks to me like Renault are using your average yearly mileage and extrapolating what today's mileage will be. But it is better than nothing.


Share this post on…

One thought on “Renault's Secret Mileage API”

  1. AP says:

    French Renault website and I can confirm it : it uses extrapolated data. It's not live. I registered my Zoe today and the initally displayed mileage (or "kilometerage", in France) was not the actual one. You can correct it and provide a yearly mileage estimation, to make further extrapolations more accurate and close to reality.

    Reply

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <p> <pre> <br> <img src="" alt="" title="" srcset="">