Update Specific Vehicle API
Require Authentication
This API is used to update specific vehicle for the company based on combination of deviceID and token.
URL
api/manageassets/updatevehicle/:vehicleID
Required parameter (in URL)
- :vehicleID «contains vehicleID that want to be updated. It must be put in the URL, e.g: api/manageassets/updatevehicle/3»
Required parameter (POST)
- deviceID
- token
Optional parameter
- vehicleNo «contains vehicle license plate that want to be updated. If this value is passed and different from original one, vehicle license plate should be unique in company.»
- vehicleName
- vehicleType
- vehicleDescription
- vehicleColor
- vehicleYear «in number»
Example JSON Payload
{
"deviceID": "ABCD-EFGH-IJKL-MNOP",
"token": "bb602ab13b8090268cd6e3bb9dfa39e2",
"vehicleNo": "N14DR edit",
"vehicleName": "My Future Car edited",
"vehicleType": "BMW",
"vehicleDescription": "Future car edited",
"vehicleColor": "Black",
"vehicleYear": "2028"
}
Possible return HTTP status code
- 200
- 400
- 401
- 404
- 405
Return message
{
"status": "success",
"message": {
"vehicleID": 3,
"companyID": 1,
"vehicleName": "My Future Car edited",
"vehicleType": "BMW",
"vehicleNo": "N14DR edit",
"vehicleDescription": "Future car edited",
"vehicleColor": "Black",
"vehicleYear": 2028,
"createdDate": 1467819009,
"updatedDate": 1467819854,
"createdByUserID": 3,
"updatedByUserID": 3
}
}