Update vehicle or asset
Allows to update a specific vehicle or asset.
Parameters
id
The ID of the vehicle to update. This ID is included in the URL of the request.
Example:
https://v2api.frotcom.com/v2/vehicles/12345
edit
This in the json structure that define the new values of the vehicle's properties. It must be specified in the body of the HTTP/S request.
{
"LicensePlate": "ABC-1234",
"ClassId": 4,
"EngineNumber": "EN123456789",
"DriverId": 123,
"CoDriverId": 456,
"DepartmentId": 10,
"SegmentId": 20,
"TypeId": 5,
"Manufacturer": "Volvo",
"Model": "FH16",
"Year": 2022,
"Odometer": 123456.7,
"Chronometer": 98765.4,
"Field1": "Primary vehicle",
"Field2": "Route A",
"Field3": "",
"Field4": "",
"Field5": "",
"EngineId": 300,
"CruiseControl": true,
"UseCanbusMileage": false,
"Icon": 7,
"Vin": "1HGBH41JXMN109186",
"Width": 2.5,
"Height": 3.0,
"Length": 12.0,
"Pallets": 20.0,
"DoubleDeck": false,
"PalletCarrier": true,
"MeatRail": false,
"SecuringStraps": "4 straps",
"Refrigerated": true,
"RefrigeratedFrom": -20.0,
"RefrigeratedTo": 5.0,
"Bitemperature": false,
"BitemperatureFrom": null,
"BitemperatureTo": null,
"Acquisition": "2023-03-15T09:30:00Z",
"DriversWhiteList": [123, 456],
"Whitelist": {
"LastChanged": "2023-03-15T09:30:00Z",
"LastConfigured": "2023-03-16T10:00:00Z",
"Drivers": [123, 456]
},
"TerminalId": 200,
"AssetId": 300,
"GrossWeight": 25000.0,
"CurbWeight": 18000.0,
"CostKm": 0.75,
"CostHour": 15.0,
"Fuel100Km": 30.5,
"FuelHour": 8.0,
"FuelTank": 400.0,
"CanbusFuelTank": 380.0,
"FuelManagement": true,
"FuelConsumption": 1,
"Sensor1": true,
"Sensor2": false,
"Sensor3": false,
"SensorCanbus": true,
"UseOneMinRule": false,
"VehicleAssetType": 3,
"UseDriversWLRestrictions": true,
"TachographType": "Digital",
"TollSystemEmissionStandard": 4,
"TollSystemEngine": 4,
"TollSystemNumberOfAxles": 5,
"TollSystemCoEmission": 200,
"TollSystemGrossWeight": 25000,
"TollSystemKerbWeight": 18000,
"TollSystemVehicleClass": 4,
"TollSystemFirstAxleHeight": 1200,
"TollSystemVehicleTrainWeight": 30000,
"InteractAuthorization": 3,
"PercMinIncrease": 5,
"PercMinDecrease": 5,
"VehicleStatusName": "Active",
"Payload": 7000.0,
"EntityCost": [
{
"CostTypeId": 1,
"EntityId": 500,
"CostType": 2
}
]
}
Field | Description | ||||||||
LicensePlate | Vehicle license plate
|
||||||||
ClassId |
The ID of the class of the vehicle. The list of vehicle classes can be found here. |
||||||||
EngineNumber | Vehicle engine number
|
||||||||
DriverId | Driver id to be associated to the vehicle
|
||||||||
CoDriverId | CoDriver id to be associated to the vehicle
|
||||||||
DepartmentId | Department of the vehicle
|
||||||||
SegmentId | Segment of the vehicle
|
||||||||
TypeId | Vehicle type id
|
||||||||
Manufacturer | Vehicle manufacturer
|
||||||||
Model | Vehicle model
|
||||||||
Year | Year of production of this vehicle
|
||||||||
Odometer | Vehicle odometer
|
||||||||
Chronometer | Vehicle chronometer
|
||||||||
Field1 | Any vehicle information
|
||||||||
Field2 | Any vehicle information
|
||||||||
Field3 | Any vehicle information
|
||||||||
Field4 | Any vehicle information
|
||||||||
Field5 | Any vehicle information
|
||||||||
EngineId | Id of the engine type
|
||||||||
CruiseControl | True if vehicle has cruise control
|
||||||||
UseCanbusMileage | True if it is to use CANbus mileage
|
||||||||
Icon | Identifies the vehicle icon used in Frotcom interface
|
||||||||
Vin | Vehicle identification number
|
||||||||
Width | Vehicle width
|
||||||||
Height | Vehicle height
|
||||||||
Length | Vehicle length
|
||||||||
Pallets | Number of pallets
|
||||||||
DoubleDeck | True if vehicle has double deck
|
||||||||
PalletCarrier | True if vehicle has pallet carrier
|
||||||||
MeatRail | True if vehicle has meat rail
|
||||||||
SecuringStraps | If vehicle has securing straps, how many.
|
||||||||
Refrigerated | True if vehicle has refrigeration system
|
||||||||
RefrigeratedFrom | Minimum cooling temperature
|
||||||||
RefrigeratedTo | Maximum cooling temperature
|
||||||||
Bitemperature | True if vehicle has bitemperature system
|
||||||||
BitemperatureFrom | Minimum bitemp. cooling temperature
|
||||||||
BitemperatureTo | Maximum bitemp. cooling temperature
|
||||||||
Acquisition | Vehicle acquisition date
|
||||||||
DriversWhiteList | If null all drivers can drive; otherwise only listed drivers
|
||||||||
Whitelist |
|
||||||||
TerminalId | Terminal Id to associate to the vehicle
|
||||||||
AssetId | Id of the asset associated to the vehicle
|
||||||||
GrossWeight | Vehicle gross weight
|
||||||||
CurbWeight | Vehicle curb weight
|
||||||||
CostKm | Cost per km
|
||||||||
CostHour | Cost per hour
|
||||||||
Fuel100Km | Fuel consumption per 100 km
|
||||||||
FuelHour | Fuel consumption per hour
|
||||||||
FuelTank | Fuel tank capacity
|
||||||||
CanbusFuelTank | CANbus fuel tank capacity
|
||||||||
FuelManagement | True if vehicle has fuel management
|
||||||||
FuelConsumption | 1=Use CANbus total fuel, 2=Calc from level, 3=Use fixed consumption
|
||||||||
Sensor1 | True if ANA1 has fuel level sensor
|
||||||||
Sensor2 | True if ANA2 has fuel level sensor
|
||||||||
Sensor3 | True if ANA3 has fuel level sensor
|
||||||||
SensorCanbus | True if fuel level from CANbus is considered
|
||||||||
UseOneMinRule | Enable one‑minute rule for driving-time calculator
|
||||||||
VehicleAssetType |
The kind of tracking that is applied to the vehicle.
Find the list of kinds of traking here
|
||||||||
UseDriversWLRestrictions | True if using drivers white list restrictions
|
||||||||
TachographType | Vehicle tachograph type
|
||||||||
TollSystemEmissionStandard | NoCategory=0,Euro_1=1,Euro_2=2,Euro_3=3,Euro_4=4,Euro_5=5,Euro_6=6,EEV=15
|
||||||||
TollSystemEngine | NoEngine=1,PetrolUnleaded=2,PetrolLeaded=3,Diesel=4,IPG=5,Battery=6,Solar=7,Hybrid=8,Hydrogen=9,CNG=10,LNG=11,Electric=12
|
||||||||
TollSystemNumberOfAxles | Toll system number of axles
|
||||||||
TollSystemCoEmission | Toll system CO emission
|
||||||||
TollSystemGrossWeight | Toll system gross weight
|
||||||||
TollSystemKerbWeight | Toll system kerb weight
|
||||||||
TollSystemVehicleClass | NoInformation=0,M1=1,M2=2,M3=3,N1=4,N2=5,N3=6,L=7,AnyVehicle=8
|
||||||||
TollSystemFirstAxleHeight | Toll system first axle height
|
||||||||
TollSystemVehicleTrainWeight | Toll system vehicle train weight
|
||||||||
InteractAuthorization | 1=NotAuthorized,2=ReceivedOnly,3=SendAndReceived
|
||||||||
PercMinIncrease | Minimum increase in fuel level for auto refuelling detection
|
||||||||
PercMinDecrease | Minimum decrease in fuel level for auto drainage detection
|
||||||||
VehicleStatusName | Vehicle status name
|
||||||||
Payload | Vehicle payload
|
||||||||
EntityCost |
|
Return
true
, if the update was successfull ; false
otherwise.
Response HTTP Codes
200 - OK
- The update was executed successfully
400 - Bad request
- If a valid
edit
json structure is not provided - If the
licencesePlate
is null, empty or undefined - If the
licensePlate
is too long - If Year greated then 9999 or lower then 0
- If EngineNumber.Length lower then 20
- If Width bigger then 999999999.99
- If Height bigger then 999999999.99
- If Length bigger then 999999999.99
- If Pallets bigger then 999999999.99
- If GrossWeight bigger then 999999999.99
- If CurbWeight bigger then 999999999.99
- If Vehicle Kind is 'A' and have a driver or codriver associated
- If the DriversWhiteList is not null and the drivers ids do not belong to the company
- If TachographType.Length is bigger then 50
- If PercMinIncrease is lower then 1
- If PercMinDecrease is lower then 1
403 - Forbidden
- If the user doesn't have permission to Manage Vehicles
404 - Not found
- If the vehicle ID specified could not be found