{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/fleet/nearestvehicles.json?latitude=:latitude&longitude=:longitude&radius=:radius","auth":"required","method":"post","params":[{"name":"latitude","type":"double","default":"","desc":"The latitude coordinate of the location","required":false,"in":"path","ref":"","_id":"5592bd5a6bf22f170075b854"},{"name":"longitude","type":"double","default":"","desc":"The longitude coordinate of the location","required":false,"in":"path","ref":"","_id":"5592bd5a6bf22f170075b853"},{"name":"radius","type":"double","default":"1","desc":"The radius of search in miles","required":false,"in":"path","ref":"","_id":"5592bd5a6bf22f170075b852"}],"results":{"codes":[{"language":"json","code":"{  \n   \"fleetInfoFeed\":{  \n      \"code\":200,\n      \"message\":\"Success\",\n      \"reason\":null,\n      \"generatedAtInMillis\":1451384683661,\n      \"fleet\":[  \n         {  \n            \"vehicleId\":\"436360c6-4130-11e5-86e6-d1f1364d204d\",\n            \"vehicle\":\"Adams Mini Cooper\",\n            \"deviceId\":\"436360c6-4130-11e5-86e6-c9ca4ad428c1\",\n            \"paired\":true,\n            \"latitude\":37.359489,\n            \"longitude\":-122.050100,\n            \"pairedDriverFirstName\":\"John\",\n            \"pairedDriverLastName\":\"Matthew\",\n            \"pairingStartTime\":1448961186000,\n            \"address\":\"1090 S Mary Ave, Sunnyvale, CA 94087, USA\",\n            \"deviceSerialNumber\":\"5022477202\",\n            \"distance\":1580.48,\n            \"vehicleType\":1,\n            \"licensePlateNum\":null\n         },\n         {  \n            \"vehicleId\":\"4375899f-4130-11e5-b155-a1e00593e7be\",\n            \"vehicle\":\"Daniel SUV\",\n            \"deviceId\":\"4375899f-4130-11e5-b155-6b7a41855b9a\",\n            \"paired\":false,\n            \"latitude\":37.359648,\n            \"longitude\":-122.062845,\n            \"pairedDriverFirstName\":null,\n            \"pairedDriverLastName\":null,\n            \"pairingStartTime\":null,\n            \"address\":\"W Valley Fwy, Los Altos, CA 94024, USA\",\n            \"deviceSerialNumber\":\"5022477210\",\n            \"distance\":205.72,\n            \"vehicleType\":1,\n            \"licensePlateNum\":null\n         }\n      ]\n   }\n}","name":"","status":200}]},"settings":"559288b86bf22f170075b794","examples":{"codes":[]}},"next":{"description":"","pages":[]},"title":"Nearest Vehicles","type":"endpoint","slug":"nearest-vehicles","excerpt":"Use this API to get vehicles closest to your current location. Vehicles will be searched within a defined radius. The response also includes the pairing details of the vehicle, driver name, and distance of the vehicle from your location.","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Sample Request\",\n  \"body\": \"https://api.azuga.com/azuga-ws/v1/fleet/nearestvehicles.json?latitude=37.360165&longitude=-122.059718\"\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    \"1-0\": \"message\",\n    \"2-0\": \"reason\",\n    \"0-1\": \"API Status Code\",\n    \"1-1\": \"API Message\",\n    \"2-1\": \"The reason for failure\",\n    \"3-0\": \"generatedAt\",\n    \"3-1\": \"API generation timestamp in UTC\",\n    \"4-0\": \"generatedAtInMillis\",\n    \"4-1\": \"API generation timestamp in milliseconds\",\n    \"5-0\": \"fleet\",\n    \"6-0\": \"vehicleId\",\n    \"7-0\": \"vehicle\",\n    \"8-0\": \"deviceId\",\n    \"9-0\": \"paired\",\n    \"10-0\": \"latitude\",\n    \"11-0\": \"longitude\",\n    \"12-0\": \"pairedDriverFirstName\",\n    \"13-0\": \"pairedDriverLastName\",\n    \"14-0\": \"pairingStartTime\",\n    \"15-0\": \"address\",\n    \"16-0\": \"deviceSerialNumber\",\n    \"17-0\": \"distance\",\n    \"18-0\": \"vehicleType\",\n    \"19-0\": \"licensePlateNum\",\n    \"5-1\": \"An array of fleet objects\",\n    \"6-1\": \"Unique identifier of the vehicle\",\n    \"9-1\": \"Boolean to indicate if the vehicle is paired or not\",\n    \"7-1\": \"Name of the vehicle\",\n    \"8-1\": \"Unique identifier of the device\",\n    \"10-1\": \"Latitude coordinate of the location of the vehicle\",\n    \"11-1\": \"Longitude coordinate of the location of the vehicle\",\n    \"12-1\": \"First name of the driver who is paired with the vehicle\",\n    \"13-1\": \"Last name of the driver who is paired with the vehicle\",\n    \"14-1\": \"Time when the driver and vehicle got paired\",\n    \"15-1\": \"Address of the location of vehicle\",\n    \"16-1\": \"Serial number of the Azuga device which is plugged into the vehicle\",\n    \"17-1\": \"Distance of the vehicle from the user in feet\",\n    \"18-1\": \"Type of vehicle\",\n    \"19-1\": \"License plate number of the vehicle\"\n  },\n  \"cols\": 2,\n  \"rows\": 20\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"This API provides information only for a driver and does not provide aggregated information for a group of vehicles. Admins should not use these APIs, but should look at other sections of the documentation.\",\n  \"title\": \"Disclaimer\"\n}\n[/block]","updates":[],"order":3,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5592bd5a6bf22f170075b851","category":{"sync":{"isSync":false,"url":""},"pages":["55928fd16bf22f170075b7b4","5592bd5a6bf22f170075b851","56416d6803881c0d00ac214b","5641702a03881c0d00ac214d","56417262b0dc090d00f88396","5641748f9f4ed50d008be04d","56417a76f424a10d00118215","56417c7b9417b40d00c0fbc6","56417f7f9417b40d00c0fbca","5641803203881c0d00ac2153","5641842903881c0d00ac2155","56418c259f4ed50d008be062","56418e30b0dc090d00f883a6","564192599417b40d00c0fbd1","564195c403881c0d00ac2162","5641988502fe811900f076c3","5641b8dc03881c0d00ac217c","5641c06238e37e0d0049fe6b","5656e88da795770d00a2aee0"],"title":"MOBILE","slug":"fleet-mobile","order":1,"from_sync":false,"reference":true,"_id":"55928a98c39c4b2d00127a83","version":"559286c6c39c4b2d00127a71","project":"55926c913735880d005f7c65","__v":19,"createdAt":"2015-06-30T12:24:56.461Z"},"githubsync":"","__v":0,"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"},"project":"55926c913735880d005f7c65","createdAt":"2015-06-30T16:01:30.625Z","editedParams":true,"parentDoc":null,"editedParams2":true,"user":"55926c39cf9cdb2100b57022"}

postNearest Vehicles

Use this API to get vehicles closest to your current location. Vehicles will be searched within a defined radius. The response also includes the pairing details of the vehicle, driver name, and distance of the vehicle from your location.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

latitude:
double
The latitude coordinate of the location
longitude:
double
The longitude coordinate of the location
radius:
double1
The radius of search in miles

Result Format


Documentation

[block:callout] { "type": "info", "title": "Sample Request", "body": "https://api.azuga.com/azuga-ws/v1/fleet/nearestvehicles.json?latitude=37.360165&longitude=-122.059718" } [/block] ##API Response explanation [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "0-0": "code", "1-0": "message", "2-0": "reason", "0-1": "API Status Code", "1-1": "API Message", "2-1": "The reason for failure", "3-0": "generatedAt", "3-1": "API generation timestamp in UTC", "4-0": "generatedAtInMillis", "4-1": "API generation timestamp in milliseconds", "5-0": "fleet", "6-0": "vehicleId", "7-0": "vehicle", "8-0": "deviceId", "9-0": "paired", "10-0": "latitude", "11-0": "longitude", "12-0": "pairedDriverFirstName", "13-0": "pairedDriverLastName", "14-0": "pairingStartTime", "15-0": "address", "16-0": "deviceSerialNumber", "17-0": "distance", "18-0": "vehicleType", "19-0": "licensePlateNum", "5-1": "An array of fleet objects", "6-1": "Unique identifier of the vehicle", "9-1": "Boolean to indicate if the vehicle is paired or not", "7-1": "Name of the vehicle", "8-1": "Unique identifier of the device", "10-1": "Latitude coordinate of the location of the vehicle", "11-1": "Longitude coordinate of the location of the vehicle", "12-1": "First name of the driver who is paired with the vehicle", "13-1": "Last name of the driver who is paired with the vehicle", "14-1": "Time when the driver and vehicle got paired", "15-1": "Address of the location of vehicle", "16-1": "Serial number of the Azuga device which is plugged into the vehicle", "17-1": "Distance of the vehicle from the user in feet", "18-1": "Type of vehicle", "19-1": "License plate number of the vehicle" }, "cols": 2, "rows": 20 } [/block] [block:callout] { "type": "warning", "body": "This API provides information only for a driver and does not provide aggregated information for a group of vehicles. Admins should not use these APIs, but should look at other sections of the documentation.", "title": "Disclaimer" } [/block]

User Information

Try It Out

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