{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/users/pairinghistory.json","auth":"required","method":"get","params":[{"name":"startTime","type":"string","default":"","desc":"Trip start timestamp in GMT in milliseconds","required":true,"in":"query","ref":"","_id":"5630aec57581b80d00c51cbf"},{"name":"endTime","type":"string","default":"","desc":"Trip end timestamp in GMT in milliseconds","required":true,"in":"query","ref":"","_id":"5630aec57581b80d00c51cbe"},{"name":"noAssociations","type":"int","default":"5","desc":"Number of times the user has paired with the vehicle","required":false,"in":"query","ref":"","_id":"5630aec57581b80d00c51cbd"}],"results":{"codes":[{"status":200,"language":"json","code":"{  \n   \"trackeeParingHistoryResponse\":{  \n      \"code\":200,\n      \"message\":\"Success\",\n      \"reason\":\"\",\n      \"generatedAt\":\"Dec-01-2015, 11:56 AM UTC\",\n      \"currentPage\":null,\n      \"totalPages\":null,\n      \"trackeeList\":[  \n         {  \n            \"vehicleId\":\"0dbb69e5-260b-11e5-80f3-ed2f4dbc2093\",\n            \"vehicleName\":\"Jane' Car\",\n            \"tripDuration\":2770,\n            \"distanceTravelled\":25,\n            \"fromDate\":1448323200000,\n            \"toDate\":1448989806000,\n            \"assetno\":\"103\",\n            \"model\":\"Mustang\",\n            \"make\":\"Ford\",\n            \"licensePlateNo\":\"TCH 908\",\n            \"year\":2010,\n            \"vin\":\"1FALP42X9TF106528\",\n            \"vehicleType\":1,\n            \"serialNum\":\"5031247166\"\n         }\n      ]\n   }\n}\n                        ","name":null},{"code":"{\nvehicleParingHistoryResponseVo: \n\t{\n\t\tcode: 200\n\t\tmessage: \"Success\"\n\t\treason: \"\"\n\t\tgeneratedAt: \"Jul-08-2015, 11:13 AM IST\"\n\t\tcurrentPage: null\n\t\ttotalPages: null\n\t\tvehicles: [3]\n\t\t0:  {\n\t\tcounter: 0\n\t\tuserId: \"60106fed-e41a-11e4-9dd8-bf5886ca5f04\"\n\t\tvehicleId: \"1f10bb5f-8749-11e4-9e04-4d48faeabb2f\"\n\t\tvehicleName: \"9663088470\"\n\t\tfirstName: \"Driver\"\n\t\tlastName: \"9663088470\"\n\t\tuserName: \"Driver 9663088470\"\n\t\ttripDuration: null\n\t\tdistanceTravelled: null\n\t\tfromDate: 1432790443000\n\t\ttoDate: 1432790750000\n\t\tmodel: \"5 Series\"\n\t\tmake: \"BMW\"\n\t\tlicensePlateNo: \"\"\n\t\t}-\n\t\t1:  {\n\t\tcounter: 0\n\t\tuserId: \"60106fed-e41a-11e4-9dd8-bf5886ca5f04\"\n\t\tvehicleId: \"1f10bb5f-8749-11e4-9e04-4d48faeabb2f\"\n\t\tvehicleName: \"9663088470\"\n\t\tfirstName: \"Driver\"\n\t\tlastName: \"9663088470\"\n\t\tuserName: \"Driver 9663088470\"\n\t\ttripDuration: 21600\n\t\tdistanceTravelled: 47\n\t\tfromDate: 1432686881000\n\t\ttoDate: 1432706993000\n\t\tmodel: \"5 Series\"\n\t\tmake: \"BMW\"\n\t\tlicensePlateNo: \"\"\n\t\t}-\n\t\t2:  {\n\t\tcounter: 0\n\t\tuserId: \"60106fed-e41a-11e4-9dd8-bf5886ca5f04\"\n\t\tvehicleId: \"1f10bb5f-8749-11e4-9e04-4d48faeabb2f\"\n\t\tvehicleName: \"9663088470\"\n\t\tfirstName: \"Driver\"\n\t\tlastName: \"9663088470\"\n\t\tuserName: \"Driver 9663088470\"\n\t\ttripDuration: null\n\t\tdistanceTravelled: null\n\t\tfromDate: 1430129860000\n\t\ttoDate: 1430131869000\n\t\tmodel: \"5 Series\"\n\t\tmake: \"BMW\"\n\t\tlicensePlateNo: \"\"\n\t\t}-\n\t\t-\n\t}\n}\n                         ","language":"json"}]},"settings":"559288b86bf22f170075b794","examples":{"codes":[]}},"next":{"description":"","pages":[]},"title":"Pairing History","type":"endpoint","slug":"view-pairing-history","excerpt":"This API returns the vehicle to driver association history. It provides the distance travelled during the association period and the timestamps.","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Sample Request\",\n  \"body\": \"https://api.azuga.com/azuga-ws/v1/users/pairinghistory.json?startTime=1449273601000&endTime=1449705601000\"\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    \"3-0\": \"generatedAt\",\n    \"4-0\": \"currentPage\",\n    \"5-0\": \"totalPages\",\n    \"0-1\": \"API Status Code\",\n    \"1-1\": \"API Message\",\n    \"3-1\": \"API generation timestamp in UTC\",\n    \"4-1\": \"The current page\",\n    \"5-1\": \"The total number of pages in the result\",\n    \"7-0\": \"vehicleName\",\n    \"8-0\": \"tripDuration\",\n    \"9-0\": \"distanceTravelled\",\n    \"10-0\": \"fromDate\",\n    \"11-0\": \"toDate\",\n    \"14-0\": \"make\",\n    \"15-0\": \"licensePlateNo\",\n    \"16-0\": \"year\",\n    \"7-1\": \"Name of the vehicle\",\n    \"8-1\": \"Total duration of the trip (in seconds)\",\n    \"9-1\": \"Distance driven in that association period (in kilometers)\",\n    \"10-1\": \"Timestamp in milliseconds when the user paired with the vehicle\",\n    \"11-1\": \"Timestamp in milliseconds when the user and vehicle got unpaired\",\n    \"14-1\": \"Make of the vehicle\",\n    \"16-1\": \"Year of manufacture\",\n    \"15-1\": \"License plate number of the vehicle\",\n    \"2-0\": \"reason\",\n    \"2-1\": \"Reason for failure\",\n    \"6-0\": \"vehicleId\",\n    \"6-1\": \"Unique identifier of the vehicle\",\n    \"12-0\": \"assetno\",\n    \"12-1\": \"Asset number of the vehicle\",\n    \"13-0\": \"model\",\n    \"13-1\": \"Model of the vehicle\",\n    \"17-0\": \"vin\",\n    \"17-1\": \"Vehicle Identification Number\",\n    \"18-0\": \"vehicleType\",\n    \"19-0\": \"serialNum\",\n    \"18-1\": \"Type of vehicle\",\n    \"19-1\": \"Serial number of the device plugged in to 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":16,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5630a1f83998420d00a50a09","user":"55926c39cf9cdb2100b57022","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"},"createdAt":"2015-10-28T10:22:48.564Z","editedParams":true,"parentDoc":null,"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"},"project":"55926c913735880d005f7c65","githubsync":"","__v":2,"editedParams2":true}

getPairing History

This API returns the vehicle to driver association history. It provides the distance travelled during the association period and the timestamps.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

startTime:
required
string
Trip start timestamp in GMT in milliseconds
endTime:
required
string
Trip end timestamp in GMT in milliseconds
noAssociations:
integer5
Number of times the user has paired with the vehicle

Result Format


Documentation

[block:callout] { "type": "info", "title": "Sample Request", "body": "https://api.azuga.com/azuga-ws/v1/users/pairinghistory.json?startTime=1449273601000&endTime=1449705601000" } [/block] ##API Response explanation [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "0-0": "code", "1-0": "message", "3-0": "generatedAt", "4-0": "currentPage", "5-0": "totalPages", "0-1": "API Status Code", "1-1": "API Message", "3-1": "API generation timestamp in UTC", "4-1": "The current page", "5-1": "The total number of pages in the result", "7-0": "vehicleName", "8-0": "tripDuration", "9-0": "distanceTravelled", "10-0": "fromDate", "11-0": "toDate", "14-0": "make", "15-0": "licensePlateNo", "16-0": "year", "7-1": "Name of the vehicle", "8-1": "Total duration of the trip (in seconds)", "9-1": "Distance driven in that association period (in kilometers)", "10-1": "Timestamp in milliseconds when the user paired with the vehicle", "11-1": "Timestamp in milliseconds when the user and vehicle got unpaired", "14-1": "Make of the vehicle", "16-1": "Year of manufacture", "15-1": "License plate number of the vehicle", "2-0": "reason", "2-1": "Reason for failure", "6-0": "vehicleId", "6-1": "Unique identifier of the vehicle", "12-0": "assetno", "12-1": "Asset number of the vehicle", "13-0": "model", "13-1": "Model of the vehicle", "17-0": "vin", "17-1": "Vehicle Identification Number", "18-0": "vehicleType", "19-0": "serialNum", "18-1": "Type of vehicle", "19-1": "Serial number of the device plugged in to 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

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