createVehicle ID API Endpoint

ThecreateVehicle API allows the Zendrive backend to create vehicle Ids for fleet vehicles. By doing this, Zendrive makes it possible for trips taken by fleet vehicles to be correctly associated with the vehicle that was driven. This enables Zendrive systems to do the required vehicle analysis in order to provide insights on risky driving to fleet managers.

A vehicle Id can be created or updated using the HTTP PUT method. To retrieve a vehicle Id from the backend, the HTTP GET method is used.

Refer to Zendrive Server APIs for an understanding of how Zendrive server APIs are organized.

API Details

PUT URL: https://api.zendrive.com/v1/vehicle/<vehicle_id>

A vehicle entity can be created or updated using HTTP PUT method.

Headers

Name
Type
Description

Authorization *

String

API KEY <APIKEY>

Content-Type*

String

application/json

Request Body

Name
Type
Description

nickname

String

vehicle nickname

type

String

car, motorcycle, truck

make

String

company name (Audi, BMW)

model

String

car model

model_year

Number

year of manufacture

color

String

color of vehicle

vin*

Number

Vehicle Identification Number

{
 “nickname”: “MyAudi”,
“type”: “Car”,
“make”: “Audi”,
“model”: “A4”,
“model_year”: “2020”,
“color”: “white”,
“vin”: “vin1”}
}

GET URL: https://api.zendrive.com/v1/vehicle/<vehicle_id>

A vehicle entity can be retrieved using the Get method.

Headers

Name
Type
Description

Authorization*

String

API KEY <APIKEY>

{
  "vehicle_id": "vehicle1",
  "nickname": "MyAudi",
  "type": "Car",
  "make": "Audi",
  "model": "A4",
  "model_year": "2020",
  "color": "white",
  "vin": "vin1",
  "last_trip_date": "2023-10-01",
  "first_trip_date": "2023-30-09",
  "pairing": 2
}

Response Body

{
  "vehicle_id": "vehicle1",
  "nickname": "MyAudi",
  "type": "Car",
  "make": "Audi",
  "model": "A4",
  "model_year": "2020",
  "color": "white",
  "vin": "vin1",
  "last_trip_date": "2023-10-01",
  "first_trip_date": "2023-30-09",
  "pairing": 2
}

Was this helpful?