πVehicles
This object represents all drivers registered on the system.
Fetching drivers without query params will return all drivers including approved and not approved.
Fetch all drivers registered
GET https://api.data.tapngogh.com/vehicles/all
Return an array of all vehicles registered both inspected or new registered
Query Parameters
limit
Number
Total number of documents to fetch: Default 50
inspected
Boolean
Fetch vehicles based on approval status
registrationNumber
String
Find a vehicle by the registration Number
driver
_id
Fetch vehicles by the driver
ownerID
_id
Fetch vehicle by Owner _id
[
{
"inspectionChecklist": {
"spareTire": true,
"headlights": true,
"tailLights": true,
"turnSignals": true,
"brakeLights": true,
"fireExtinguisher": true,
"emergencySignals": true,
"seatBelts": true,
"brakes": true,
"licensePlate": true
},
"_id": "632af503d788233a09a97c51",
"ownerID": "632ae602deeb82b5eb2f5b29",
"color": "#000000",
"registrationNumber": "GR-342-342",
"make": "Toyota",
"model": "Corolla",
"makeYear": "2019-02-22T00:00:00.000Z",
"yearOfRegistration": "2022-03-12T00:00:00.000Z",
"capacity": 4,
"grossWeight": 200,
"netWeight": 200,
"type": "taxi",
"fuelCapacity": 123,
"roadWorthyExpiryDate": "2023-04-29T00:00:00.000Z",
"insuranceExpiryDate": "2022-12-23T00:00:00.000Z",
"vin": "1234567",
"inspected": true,
"approved": true,
"createdAt": "2022-09-21T11:26:59.477Z",
"updatedAt": "2022-11-17T23:57:27.029Z",
"__v": 0,
"approvedBy": "632af51ed788233a09a97c55",
"dateApproved": "2022-09-21T11:37:15.334Z",
"dateInspected": "2022-09-21T11:37:15.334Z",
"inspectedBy": "632af51ed788233a09a97c55",
"station": {
"_id": "63717017485e7ce7638bda39",
"name": "General Station",
"transportUnions": [
"6370c662972e191d52079e97",
"6370f085806b0131a82054af",
"6370c3749bb28dd5a97463f2"
],
"zones": [],
"contactNumber": 548215801,
"digitalAddress": "GR-343-20",
"createdAt": "2022-11-13T22:30:47.827Z",
"updatedAt": "2022-12-07T12:25:22.546Z",
"__v": 0
},
"transportUnion": {
"status": "active",
"_id": "6370c662972e191d52079e97",
"name": "Ablekle GPRTU",
"transportUnion": "632af57fd788233a09a97c65",
"digitalAddress": "GM-323-32",
"contactNumber": "0548215801",
"email": "[email protected]",
"createdAt": "2022-11-13T10:26:42.470Z",
"updatedAt": "2022-12-07T12:00:31.697Z",
"__v": 0,
"zones": [
"6373810924aaa20c74acd04f"
]
},
"driver": "63750fb2ab1e69ca3e60b1be"
},
{
"_id": "63717070485e7ce7638bda62",
"ownerID": "632ae602deeb82b5eb2f5b29",
"color": "#000000",
"registrationNumber": "GR-342-3030",
"make": "Benzo",
"model": "GH-342",
"makeYear": "2022-08-05T00:00:00.000Z",
"yearOfRegistration": "2022-11-10T00:00:00.000Z",
"capacity": 5,
"grossWeight": 200,
"netWeight": 20,
"type": "taxi",
"fuelCapacity": 2,
"roadWorthyExpiryDate": "2022-12-02T00:00:00.000Z",
"insuranceExpiryDate": "2022-12-03T00:00:00.000Z",
"vin": "123",
"inspected": false,
"approved": false,
"createdAt": "2022-11-13T22:32:16.799Z",
"updatedAt": "2022-11-13T22:32:16.799Z",
"__v": 0
},
{
"inspectionChecklist": {
"spareTire": true,
"headlights": true,
"tailLights": true,
"turnSignals": true,
"brakeLights": true,
"fireExtinguisher": true,
"emergencySignals": true,
"seatBelts": true,
"brakes": true,
"licensePlate": true
},
"_id": "636a82eb13538a31738b4f59",
"ownerID": "636a80c385d8377e389ca95c",
"color": "#a72525",
"registrationNumber": "GR-3423-2020",
"make": "Toyota",
"model": "Defender",
"makeYear": "2015-06-04T00:00:00.000Z",
"yearOfRegistration": "2022-11-04T00:00:00.000Z",
"capacity": 4,
"grossWeight": 200,
"netWeight": 200,
"type": "taxi",
"fuelCapacity": 2,
"roadWorthyExpiryDate": "2023-03-17T00:00:00.000Z",
"insuranceExpiryDate": "2023-05-26T00:00:00.000Z",
"vin": "12346645",
"inspected": true,
"approved": true,
"createdAt": "2022-11-08T16:25:15.726Z",
"updatedAt": "2022-11-08T16:31:03.754Z",
"__v": 0,
"approvedBy": "632af51ed788233a09a97c55",
"dateApproved": "2022-11-08T16:30:27.126Z",
"dateInspected": "2022-11-08T16:30:27.126Z",
"inspectedBy": "632af51ed788233a09a97c55",
"station": null,
"transportUnion": {
"status": "active",
"_id": "6370c662972e191d52079e97",
"name": "Ablekle GPRTU",
"transportUnion": "632af57fd788233a09a97c65",
"digitalAddress": "GM-323-32",
"contactNumber": "0548215801",
"email": "[email protected]",
"createdAt": "2022-11-13T10:26:42.470Z",
"updatedAt": "2022-12-07T12:00:31.697Z",
"__v": 0,
"zones": [
"6373810924aaa20c74acd04f"
]
}
}
]Add Vehicle
Add a vehicle to to db
POST https://api.data.tapngogh.com/vehicles/add
Headers
Authorization*
String
Authorization
Request Body
ownerID*
_id
Id of vehicle owner
color
String
registrationNumber
String
make
String
model
String
Vehicle Owners
Fetches all vehicle owners
GET https://api.data.tapngogh.com/vehicles/owner/all
Returns an array of all vehicle owners
Headers
Authorization*
String
Search for vehicle owner
Search for vehicle owner by name, phone or email
GET https://api.data.tapngogh.com/vehicles/owner/search
Query Parameters
query*
String
Name, phone or email
Headers
Authorization*
String
Last updated
Was this helpful?