This page details the Car queries available from the API
Get Car Details
Returns the details of the car based on the specified Car ID or Vehicle Registration Mark (VRM), otherwise referred to as Car Registration Number.
The returned details include whether MBMC have the necessary measurements available to determine if a buggy or other item will fit in the boot. boot_measurement_available returns a Yes or No response. A Yes confirms that this car will be able to return helpful results from the comparison APIs
Note, the carid must be identified using the Car ID Lookup searches. Alternatively, you could use the vrm parameter to perform this lookup.
A valid carid. The carid corresponds to a car id that can be identified using the Car ID Lookup searches. Alternatively, use the vrm parameter
vrm
String
Yes (or carid)
An alternative to the carid parameter. A valid UK registered car Vehicle Registration Mark (Car Registration Number).
Counts against quota: Yes
curl--requestGET \--url'https://api.mybuggymycar.com/api/search.php?s=getcar&vrm=[VRM]' \--header'authorization: Basic YOUR_BASE64_KEY'# alternatively replace vrm=[VRM] for carid=[CARID] to search by Car ID number (see [Car ID Lookup](#carid-lookups) details)
<?phprequire_once'HTTP/Request2.php';$request =newHTTP_Request2();$request->setUrl('https://api.mybuggymycar.com/api/search.php?s=getcar&vrm=[VRM]');// alternatively replace vrm=[VRM] for carid=[CARID] to search by Car ID number (see [Car ID Lookup](#carid-lookups) details)$request->setMethod(HTTP_Request2::METHOD_GET);$request->setConfig(array('follow_redirects'=>TRUE));$request->setHeader(array('Authorization'=>'Basic YOUR_BASE64_KEY'));try { $response = $request->send();if ($response->getStatus()==200) {echo $response->getBody(); }else {echo'Unexpected HTTP status: '. $response->getStatus().' '. $response->getReasonPhrase(); }}catch(HTTP_Request2_Exception $e) {echo'Error: '. $e->getMessage();}
import http.clientconn = http.client.HTTPSConnection("api.mybuggymycar.com")payload =''headers ={'Authorization':'Basic YOUR_BASE64_KEY'}conn.request("GET", "/api/search.php?s=getcar&vrm=[VRM]]", payload, headers)# alternatively replace vrm=[VRM] for carid=[CARID] to search by Car ID number (see [Car ID Lookup](#carid-lookups) details)res = conn.getresponse()data = res.read()print(data.decode("utf-8"))
var data =null;var xhr =newXMLHttpRequest();xhr.withCredentials =true;xhr.addEventListener("readystatechange",function () {if (this.readyState ===this.DONE) {console.log(this.responseText); }});xhr.open("GET","https://api.mybuggymycar.com/api/search.php?s=getcar&vrm=[VRM]");xhr.setRequestHeader("authorization","Basic YOUR_BASE64_KEY");xhr.send(data);// alternatively replace vrm=[VRM] for carid=[CARID] to search by Car ID number (see [Car ID Lookup](#carid-lookups) details)
[VRM] can be replaced with a valid [CARID] that can be obtained by using the Car ID Lookup queries. Note, if both are supplied, vrm will be taken in preference. YOUR_BASE64_KEY needs to be replaced with your API key.
The above command returns JSON structured like this:
In the event that a Car Registration number isn't known or is not being returned as expected (perhaps because of a new car registration not having propagated across all systems yet), the 5 CarID Lookup queries can be used to identify a carID
The searches are 'cumulative' and all 5 components are required to return the correct ID for the car to be searched with.
A possible UI workflow could be that the data returned from each of these queries be surfaced via a set of drop down lists (or similar) with the value from each then being used to complete the parameters of the subsequent searches.
CarID Lookup 1 - getMakes
Returns a list of all Car Manufacturers. This query should be 1 of 5 to identify a valid carid
There are no mandatory or optional parameters for this query.
var xhr =newXMLHttpRequest();xhr.withCredentials =true;xhr.addEventListener("readystatechange",function() {if(this.readyState ===4) {console.log(this.responseText); }});xhr.open("GET","https://api.mybuggymycar.com/api/search.php?s=getmodels&make=<MAKE>");xhr.setRequestHeader("Authorization","Basic YOUR_BASE64_KEY");xhr.send();
<MAKE> should be replaced with the name of a Car Manufacturer returned from the getMakes query. YOUR_BASE64_KEY needs to be replaced with your API key.
The above command returns JSON structured like this:
var xhr =newXMLHttpRequest();xhr.withCredentials =true;xhr.addEventListener("readystatechange",function() {if(this.readyState ===4) {console.log(this.responseText); }});xhr.open("GET","https://api.mybuggymycar.com/api/search.php?s=getfueltype&make=<MAKE>&model=<MODEL>");xhr.setRequestHeader("Authorization","Basic YOUR_BASE64_KEY");xhr.send();
<MAKE> should be replaced with the name of a Car Manufacturer returned from the getMakes query. <MODEL> should be replaced witht he name of a Car Model returned from the getModels query YOUR_BASE64_KEY needs to be replaced with your API key.
The above command returns JSON structured like this:
{"account": {"subscriber":"YOUR_SUBSCRIPTION_KEY","name":"YOUR NAME","subscription_active":"active","subscription_plan_name":"Executive","subscription_renewal_date":"22-02-2021","no_api_calls_allowed":2000,"no_api_calls_used":"52" },"response": {"code":"200","code_description":"Ok","message":"Query successful" },"search": {"type":"Return Car Model Fuel Types","manufacturer":"MERCEDES","model":"E-CLASS ESTATE" },"results": [ {"fuel_type":"Diesel" }, {"fuel_type":"Hybrid Diesel" }, {"fuel_type":"Mild Hybrid Electric Diesel" }, {"fuel_type":"Mild Hybrid Electric Petrol" }, {"fuel_type":"Petrol" }, {"fuel_type":"Plug In Hybrid Diesel" } ]}
CarID Lookup 4 - getYears
Returns a list of all Years that the specified car model was available between. This query should be 4 of 5 to identify a valid carid
var xhr =newXMLHttpRequest();xhr.withCredentials =true;xhr.addEventListener("readystatechange",function() {if(this.readyState ===4) {console.log(this.responseText); }});xhr.open("GET","https://api.mybuggymycar.com/api/search.php?s=getyears&make=<MAKE>&model=<MODEL>&fuel=<FUELTYPE>");xhr.setRequestHeader("Authorization","Basic YOUR_BASE64_KEY");xhr.send();
<MAKE> should be replaced with the name of a Car Manufacturer returned from the getMakes query. <MODEL> should be replaced with the name of a Car Model returned from the getModels query. <FUELTYPE> should be replace with one of the Fuel Types returned from the getFuelType query. YOUR_BASE64_KEY needs to be replaced with your API key.
The above command returns JSON structured like this:
var xhr =newXMLHttpRequest();xhr.withCredentials =true;xhr.addEventListener("readystatechange",function() {if(this.readyState ===4) {console.log(this.responseText); }});xhr.open("GET","https://api.mybuggymycar.com/api/search.php?s=getderivatives&make=<MAKE>&model=<MODEL>&fuel=<FUELTYPE>&year=<YEARID>");xhr.setRequestHeader("Authorization","Basic YOUR_BASE64_KEY");xhr.send();
<MAKE> should be replaced with the name of a Car Manufacturer returned from the getMakes query. <MODEL> should be replaced witht he name of a Car Model returned from the getModels query <FUELTYPE> should be replace with one of the Fuel Types returned from the getFuelType query. <YEARID> should be replaced with year_group_id returned from the getYears query YOUR_BASE64_KEY needs to be replaced with your API key.
The above command returns JSON structured like this: