UK Motorbike plate lookup #API added
Our RegCheck API was limited initally to Cars and Vans, but now we’ve added Motorbikes, via a seperate endpoint. – It won’t fall through to return a motorbike unexpectedly, if you’re expecting a car.
If the registration number of the vehicle you are checking is a MotorBike, rather than a car or van, then you should call the “CheckMotorBikeUK” endpoint instead. This returns some basic information about the motorbike, and you can use this data to call the UKMOT endpoint, for further information, if required. The basic data are:
- Make and Model
- Year of Registration
- Engine Size
- Variant
- Colour
Sample JSON:
{“Description”:”KAWASAKI KLE 500 B1P”,”RegistrationYear”:”2005″,”CarMake”:{“CurrentTextValue”:”KAWASAKI”},”CarModel”:{“CurrentTextValue”:”KLE 500 B1P”},”MakeDescription”:{“CurrentTextValue”:”KAWASAKI”},”ModelDescription”:{“CurrentTextValue”:”KLE 500 B1P”}, “EngineSize”:{“CurrentTextValue”:”498cc”},”Variant”:”n/a”,”Colour”:”BLACK”}
Here is some sample code in PHP showing how to call the UK motorbike API:
$username = ‘*****’;
$regNumber = ‘LJ05FHV’;
$xmlData = file_get_contents(“https://www.regcheck.org.uk/api/reg.asmx/CheckMotorBikeUK?RegistrationNumber=” . $regNumber .”&username=” . $username);
$xml=simplexml_load_string($xmlData);
$strJson = $xml->vehicleJson;
$json = json_decode($strJson);
print_r($json->Description);
LikeLike