{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/vehicle/:vehicleId.json","auth":"required","results":{"codes":[{"name":"","code":"{  \n   \"restResponseVO\":{  \n      \"code\":200,\n      \"message\":\"Success\",\n      \"reason\":null,\n      \"generatedAt\":\"Sep-26-2018, 09:01 AM UTC\",\n      \"currentPage\":null,\n      \"totalPages\":null,\n      \"result\":\"d16e5cc0-83c7-11e6-8e0e-b7340286a5ae\"\n   }\n}","language":"json","status":200}]},"settings":"559288b86bf22f170075b794","examples":{"codes":[]},"method":"put","params":[{"name":"vehicleName","type":"string","default":"","desc":"Name of the vehicle","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e0061955e"},{"name":"groupName","type":"string","default":"","desc":"Name of the vehicle","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e0061955d"},{"name":"deviceSerialNum","type":"int","default":"","desc":"The serial number of the device plugged into the vehicle","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e0061955c"},{"name":"make","type":"string","default":"","desc":"Make of the vehicle","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e0061955b"},{"name":"model","type":"string","default":"","desc":"Model of the vehicle","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e0061955a"},{"name":"year","type":"int","default":"","desc":"Year of manufacture","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e00619559"},{"name":"userId","type":"string","default":"","desc":"Unique identifier of the driver paired with the vehicle","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e00619558"},{"name":"licensePlate","type":"string","default":"","desc":"License plate number of the vehicle","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e00619557"},{"name":"costPerMile","type":"double","default":"","desc":"Operating cost of the vehicle per Mile","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e00619556"},{"name":"odometerReading","type":"double","default":"","desc":"Initial odometer value in kilometres.","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e00619554"},{"name":"vin","type":"string","default":"","desc":"Vehicle Identification Number","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e00619553"},{"name":"assetno","type":"string","default":"","desc":"Asset number of the vehicle","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e00619552"},{"name":"ownership","type":"string","default":"","desc":"Type of ownership. The following values are valid : Company, Employee, Leased, and Rental","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e00619551"},{"name":"vehicleTypeId","type":"int","default":"","desc":"Unique identifier representing the type of the vehicle. The following values are valid: 1- Car, 2- Truck, 3- School Bus, 4- Coach Bus, 5-Limousine, 6- Van, 7- Car(Sedan), 8- Car(Hatchback), 9- Car(LUV), 10- Car(MUV), 11-Car(SUV)","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e00619550"},{"name":"fuelTypeId","type":"int","default":"","desc":"Unique identifier representing the type of the fuel used. The following values are valid: 1- Gasoline, 2- Diesel, 3- Propane, 4- Hybrid, 5- LPG, 6- CNG, 7- LNG","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e0061954f"},{"name":"fuelTankCapacity","type":"double","default":"","desc":"Capacity of the fuel tank in Litres or Gallons (based on your web settings)","required":false,"in":"body","ref":"","_id":"57ee2b4521ceb20e0061954e"},{"name":"vehicleId","type":"string","default":"","desc":"Unique identifier of the vehicle that needs to be edited.","required":false,"in":"path","ref":"","_id":"5c09a678e680fc004a29d172"},{"name":"tag","type":"array_string","default":"","desc":"Tags associated with the vehicle","required":false,"in":"body","ref":"","_id":"5c09a678e680fc004a29d171"}]},"next":{"description":"","pages":[]},"title":"Edit","type":"endpoint","slug":"edit-2","excerpt":"This API allows you to update information of an existing vehicle. Only one vehicle can be updated in a single API call. Vehicle attributes that needs to be revised only need to be included in the request.","body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Only those vehicle attributes that need to be revised should be included in the request.\",\n  \"title\": \"Request Parameters\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Sample Request\",\n  \"body\": \"https://api.azuga.com/azuga-ws/v1/vehicle/d16e5cc0-83c7-11e6-8e0e-b7340286a5ae.json\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n   \\\"vehicleName\\\": \\\"Adam's Truck\\\",\\n   \\\"groupName\\\": \\\"VMI\\\",\\n   \\\"deviceSerialNum\\\": \\\"8182452911\\\",\\n   \\\"make\\\": \\\"Ford\\\",\\n   \\\"model\\\": \\\"F-150\\\",\\n   \\\"year\\\": 2017,\\n   \\\"userId\\\": \\\"c445bad8-954b-11e8-b2e6-47bcb27b1235\\\",\\n   \\\"costPerMile\\\": 0.54,\\n   \\\"fuelTankCapacity\\\": 45,\\n   \\\"ownership\\\": \\\"Company\\\",\\n   \\\"vin\\\":\\\"1FTUGAD45A1127080\\\",\\n   \\\"licensePlate\\\": \\\"FST 846\\\",\\n   \\\"initialEngineRuntime\\\": 7200,\\n   \\\"odometerReading\\\": 600,\\n   \\\"assetno\\\": \\\"Auto 111\\\",\\n   \\\"vehicleTypeId\\\": 3,\\n   \\\"fuelTypeId\\\": 5,\\n   \\\"tag\\\": [\\\"Dump Truck\\\",\\\"Farm Tractor\\\"]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Sample Payload\"\n    }\n  ]\n}\n[/block]\n##API Response Explanation\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"code\",\n    \"0-1\": \"API status code\",\n    \"1-0\": \"message\",\n    \"1-1\": \"API Message (Success/Failure)\",\n    \"2-0\": \"reason\",\n    \"2-1\": \"Reason for failure\",\n    \"3-0\": \"generatedAt\",\n    \"3-1\": \"API generation timestamp in UTC\",\n    \"4-0\": \"currentPage\",\n    \"4-1\": \"Current page of the paginated result\",\n    \"5-0\": \"totalPages\",\n    \"5-1\": \"Total number of pages in the paginated result\",\n    \"6-0\": \"result\",\n    \"6-1\": \"Unique identifier representing the vehicle\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]","updates":[],"order":2,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"57ee11f90fb3c00e00e1e3d1","githubsync":"","user":"5656a3dd5656350d001d83a0","parentDoc":null,"project":"55926c913735880d005f7c65","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["559286c7c39c4b2d00127a72","55928a98c39c4b2d00127a83","5592bd7b9a68220d00f1c3db","5593dcaf0e82e81700334e25","5594342f0c33bd0d000595a3","563081713998420d00a509e4","5630941c7581b80d00c51c86","56309f4ff1c0580d00fac666","567923b8239fac0d00c7df25","573306dea6a9c40e00e13875","577a288fd051530e00f65563","579af3982b865e17005a4357","57ee06aa1e42900e0014a374","5951f49a63f39000159e7ef1","5951f4c563f39000159e7ef2","598951542a9dfc000fcacd40","5b3375cc98cb500003e4b363","5bbcd4e29667280003084100"],"_id":"559286c6c39c4b2d00127a71","createdAt":"2015-06-30T12:08:38.768Z","project":"55926c913735880d005f7c65","releaseDate":"2015-06-30T12:08:38.768Z","__v":18,"forked_from":"559286b6c39c4b2d00127a6e"},"__v":8,"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"VEHICLE","slug":"vehicle","order":3,"from_sync":false,"reference":true,"_id":"567923b8239fac0d00c7df25","project":"55926c913735880d005f7c65","version":"559286c6c39c4b2d00127a71","createdAt":"2015-12-22T10:19:36.628Z","__v":0},"createdAt":"2016-09-30T07:19:21.435Z"}

putEdit

This API allows you to update information of an existing vehicle. Only one vehicle can be updated in a single API call. Vehicle attributes that needs to be revised only need to be included in the request.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

vehicleId:
string
Unique identifier of the vehicle that needs to be edited.

Body Params

vehicleName:
string
Name of the vehicle
groupName:
string
Name of the vehicle
deviceSerialNum:
integer
The serial number of the device plugged into the vehicle
make:
string
Make of the vehicle
model:
string
Model of the vehicle
year:
integer
Year of manufacture
userId:
string
Unique identifier of the driver paired with the vehicle
licensePlate:
string
License plate number of the vehicle
costPerMile:
double
Operating cost of the vehicle per Mile
odometerReading:
double
Initial odometer value in kilometres.
vin:
string
Vehicle Identification Number
assetno:
string
Asset number of the vehicle
ownership:
string
Type of ownership. The following values are valid : Company, Employee, Leased, and Rental
vehicleTypeId:
integer
Unique identifier representing the type of the vehicle. The following values are valid: 1- Car, 2- Truck, 3- School Bus, 4- Coach Bus, 5-Limousine, 6- Van, 7- Car(Sedan), 8- Car(Hatchback), 9- Car(LUV), 10- Car(MUV), 11-Car(SUV)
fuelTypeId:
integer
Unique identifier representing the type of the fuel used. The following values are valid: 1- Gasoline, 2- Diesel, 3- Propane, 4- Hybrid, 5- LPG, 6- CNG, 7- LNG
fuelTankCapacity:
double
Capacity of the fuel tank in Litres or Gallons (based on your web settings)
tag:
array of strings
Tags associated with the vehicle

Result Format


Documentation

[block:callout] { "type": "warning", "body": "Only those vehicle attributes that need to be revised should be included in the request.", "title": "Request Parameters" } [/block] [block:callout] { "type": "info", "title": "Sample Request", "body": "https://api.azuga.com/azuga-ws/v1/vehicle/d16e5cc0-83c7-11e6-8e0e-b7340286a5ae.json" } [/block] [block:code] { "codes": [ { "code": "{ \n \"vehicleName\": \"Adam's Truck\",\n \"groupName\": \"VMI\",\n \"deviceSerialNum\": \"8182452911\",\n \"make\": \"Ford\",\n \"model\": \"F-150\",\n \"year\": 2017,\n \"userId\": \"c445bad8-954b-11e8-b2e6-47bcb27b1235\",\n \"costPerMile\": 0.54,\n \"fuelTankCapacity\": 45,\n \"ownership\": \"Company\",\n \"vin\":\"1FTUGAD45A1127080\",\n \"licensePlate\": \"FST 846\",\n \"initialEngineRuntime\": 7200,\n \"odometerReading\": 600,\n \"assetno\": \"Auto 111\",\n \"vehicleTypeId\": 3,\n \"fuelTypeId\": 5,\n \"tag\": [\"Dump Truck\",\"Farm Tractor\"]\n}", "language": "json", "name": "Sample Payload" } ] } [/block] ##API Response Explanation [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "0-0": "code", "0-1": "API status code", "1-0": "message", "1-1": "API Message (Success/Failure)", "2-0": "reason", "2-1": "Reason for failure", "3-0": "generatedAt", "3-1": "API generation timestamp in UTC", "4-0": "currentPage", "4-1": "Current page of the paginated result", "5-0": "totalPages", "5-1": "Total number of pages in the paginated result", "6-0": "result", "6-1": "Unique identifier representing the vehicle" }, "cols": 2, "rows": 7 } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}