Add New Vehicle API
Require Authentication
This API is used to add new vehicle for the company based on combination of deviceID and token.
URL
api/manageassets/addvehicle
Required parameter (POST)
- deviceID
- token
- vehicleNo «contains vehicle license plate that want to be added. Vehicle license plate should be unique in company.»
Optional parameter
- vehicleName
- vehicleType
- vehicleDescription
- vehicleColor
- vehicleYear «in number»
Example JSON Payload
{
"deviceID": "ABCD-EFGH-IJKL-MNOP",
"token": "bb602ab13b8090268cd6e3bb9dfa39e2",
"vehicleNo": "N14DR",
"vehicleName": "My Future Car",
"vehicleType": "BMW",
"vehicleDescription": "Future car",
"vehicleColor": "Black",
"vehicleYear": "2028"
}
Possible return HTTP status code
- 201
- 400
- 401
- 405
Return message, contains newly created vehicle
{
"status": "success",
"message": {
"vehicleID": "3",
"companyID": 1,
"vehicleName": "My Future Car",
"vehicleType": "BMW",
"vehicleNo": "N14DR",
"vehicleDescription": "Future car",
"vehicleColor": "Black",
"vehicleYear": 2028,
"createdDate": 1467819009,
"updatedDate": 1467819009,
"createdByUserID": 3,
"updatedByUserID": 3
}
}