This end point gives you access to get vehicle information
authorization
|
Set value to Bearer SECRET_KEY |
content-type
|
Set value to application/json |
Vehicle Plate Number
|
The Plate Number of the car |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.motorafrica.co/api/vehicle-info/ABC123YZ',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer 1|XDdyTiTi3ueXgjyIp7RbmdVIqvWAyTapOnR7kq5u'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
curl --location 'https://api.motorafrica.co/api/vehicle-info/ABC123YZ' \
--header 'Authorization: Bearer 1|XDdyTiTi3ueXgjyIp7RbmdVIqvWAyTapOnR7kq5u'
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.motorafrica.co/api/vehicle-info/ABC123YZ',
'headers': {
'Authorization': 'Bearer 1|XDdyTiTi3ueXgjyIp7RbmdVIqvWAyTapOnR7kq5u'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import http.client
conn = http.client.HTTPSConnection("api.motorafrica.co")
payload = ''
headers = {
'Authorization': 'Bearer 1|XDdyTiTi3ueXgjyIp7RbmdVIqvWAyTapOnR7kq5u'
}
conn.request("GET", "/api/vehicle-info/ABC123YZ", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"status": true,
"message": "Fetched Successfully",
"data":
{
"vehiclePlateNo": "FST956HX",
"bodytypename": "Bolt Basic",
"longitude": "",
"latitude": "",
"dateDue": "2023-12-07 23:59:59",
"lastPaymentDate": "2023-12-04 23:29:58",
"lastPaymentAmount": "35000",
"lastUpdate": "",
"startDate": "2023-06-20",
"brandName": null,
"package": "",
"remainingDay": "2 days from now",
"location": "Not Available",
"driverName": " ",
"driverPhone": "",
"colour": "GREY",
"amount": "35000",
"mile": "",
"created_at": null,
"upated_at": null,
"make": "TOYOTA COROLLA",
"licenseExpiry": "",
"insuranceExpiry": "",
"roadExpiry": "",
"status": "Success",
"oilChangeAmt": "0",
"responsiblity": "Driver"
}
}