{"_id":"56d7f4bf7a04df0b00ddefdb","githubsync":"","project":"56d54a77075dfa0b00be98d5","user":"56cf3e935267d70b00494c47","__v":63,"category":{"_id":"570cefd98da5b62b00d57e3c","project":"56d54a77075dfa0b00be98d5","version":"56d54a77075dfa0b00be98d8","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-04-12T12:53:45.366Z","from_sync":false,"order":1,"slug":"unit","title":"Unit"},"parentDoc":null,"version":{"_id":"56d54a77075dfa0b00be98d8","__v":13,"project":"56d54a77075dfa0b00be98d5","createdAt":"2016-03-01T07:53:27.479Z","releaseDate":"2016-03-01T07:53:27.479Z","categories":["56d54a78075dfa0b00be98d9","56d6bbf046d19315000f8ea2","56d6bbfc46d19315000f8ea3","570cefd98da5b62b00d57e3c","571491a74007610e00c803ae","5714dcd837b7e00e00de5684","5715ea6ac016190e00f04272","5715f27fc016190e00f0429f","5715f7b9893cbe0e002d74da","5715f8c2c016190e00f042b8","5715fd49a9055c0e0015fbe7","57160c7e893cbe0e002d753a","5716136a893cbe0e002d7552"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-03T08:24:31.621Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"[block:html]\n{\n  \"html\": \"<h3>GetUnit</h3>\"\n}\n[/block]\nWill list parameters on specific unit.\n[block:html]\n{\n  \"html\": \"<h4><b>Parameters</b></h4>\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Data type\",\n    \"h-2\": \"Unit of measurement\",\n    \"h-3\": \"Note\",\n    \"0-0\": \"`id` <span style=\\\"color:red\\\">*</span>\",\n    \"0-1\": \"String\",\n    \"0-2\": \"N/A\",\n    \"0-3\": \"If supplied, we return only that unit. If not, we return all units (taking into account other parameters).\",\n    \"1-0\": \"`serialNumber`\",\n    \"1-1\": \"String\",\n    \"1-2\": \"N/A\",\n    \"2-0\": \"`referenceNumber`\",\n    \"2-1\": \"String\",\n    \"2-2\": \"N/A\",\n    \"1-3\": \"\",\n    \"2-3\": \"If supplied, we only return units that belong to a specified reference number.\",\n    \"3-0\": \"`categoryId`\",\n    \"3-3\": \"If supplied, we only return units that belong to a specified category.\",\n    \"4-0\": \"`clientId`\",\n    \"4-3\": \"If supplied, we only return units that belong to a specified client.\",\n    \"5-0\": \"`groupId`\",\n    \"5-3\": \"If supplied, we only return units that belong to a specified group.\",\n    \"6-0\": \"`zoneId`\",\n    \"6-3\": \"If supplied, we return only units currently located inside a specified zone.\",\n    \"7-0\": \"`pointId`\",\n    \"7-3\": \"If supplied, we return only units currently located close to a specified point. If this is supplied, the user may also supply a radius to search within.\",\n    \"8-0\": \"`point`\",\n    \"8-1\": \"Location\",\n    \"8-2\": \"Decimal degrees. Latitude = [-90, 90], Longitude = [-180, 180].\",\n    \"8-3\": \"Same as with PointId. Specify location by use of a Lat/Lon.\",\n    \"9-0\": \"`radius`\",\n    \"9-3\": \"Radius to search within. Default value is 1 kilometer. Valid value is > 0 and < 40000 km.\",\n    \"3-1\": \"String\",\n    \"4-1\": \"String\",\n    \"5-1\": \"String\",\n    \"6-1\": \"String\",\n    \"7-1\": \"String\",\n    \"9-1\": \"double\",\n    \"9-2\": \"km\",\n    \"3-2\": \"N/A\",\n    \"4-2\": \"N/A\",\n    \"5-2\": \"N/A\",\n    \"6-2\": \"N/A\",\n    \"7-2\": \"N/A\"\n  },\n  \"cols\": 4,\n  \"rows\": 10\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Errors</b></h4>\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Error Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`unitNotFound`\",\n    \"0-1\": \"Unit with supplied “Id” was not found.\",\n    \"1-0\": \"`categoryNotFound`\",\n    \"1-1\": \"Category with supplied “CategoryId” was not found.\",\n    \"2-0\": \"`clientNotFound`\",\n    \"2-1\": \"Client with supplied “ClientId” was not found.\",\n    \"3-0\": \"`groupNotFound`\",\n    \"3-1\": \"Group with supplied “GroupId” was not found.\",\n    \"4-0\": \"`zoneNotFound`\",\n    \"4-1\": \"Zone with supplied “ZoneId” was not found.\",\n    \"5-0\": \"`pointNotFound`\",\n    \"5-1\": \"Point with supplied “PointId” was not found.\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Columns</b></h4>\"\n}\n[/block]\nRefer to the following table for description of parameters:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Data type\",\n    \"h-2\": \"Unit of measurement\",\n    \"h-3\": \"Nullability\",\n    \"h-4\": \"Note\",\n    \"0-0\": \"`id`\",\n    \"0-1\": \"String\",\n    \"0-2\": \"N/A\",\n    \"0-3\": \"FALSE\",\n    \"0-4\": \"Unique identifier.\",\n    \"1-0\": \"`serialNumber`\",\n    \"1-1\": \"String\",\n    \"1-2\": \"N/A\",\n    \"1-3\": \"FALSE\",\n    \"1-4\": \"Unit GSM number.\",\n    \"2-0\": \"`phoneNumber`\",\n    \"2-1\": \"String\",\n    \"2-2\": \"N/A\",\n    \"2-3\": \"TRUE\",\n    \"3-0\": \"`vehicleType`\",\n    \"3-1\": \"String\",\n    \"3-2\": \"N/A\",\n    \"3-3\": \"FALSE\",\n    \"4-0\": \"`deviceType`\",\n    \"4-1\": \"String\",\n    \"4-2\": \"N/A\",\n    \"4-3\": \"FALSE\",\n    \"4-4\": \"The model of the unit.\",\n    \"5-0\": \"`deviceModel`\",\n    \"5-1\": \"String\",\n    \"5-2\": \"N/A\",\n    \"5-3\": \"FALSE\",\n    \"5-4\": \"The model of the unit\",\n    \"6-0\": \"`name`\",\n    \"6-1\": \"String\",\n    \"6-2\": \"N/A\",\n    \"6-3\": \"FALSE\",\n    \"7-0\": \"`displayName`\",\n    \"7-1\": \"String\",\n    \"7-2\": \"N/A\",\n    \"7-3\": \"FALSE\",\n    \"7-4\": \"The full display name with category name prefixed.\",\n    \"8-0\": \"`referenceNumber`\",\n    \"8-1\": \"String\",\n    \"8-2\": \"N/A\",\n    \"8-3\": \"TRUE\",\n    \"9-0\": \"`note`\",\n    \"9-1\": \"String\",\n    \"9-2\": \"N/A\",\n    \"9-3\": \"TRUE\",\n    \"10-0\": \"`createdAt`\",\n    \"10-1\": \"DateTime\",\n    \"10-2\": \"N/A\",\n    \"10-3\": \"TRUE\",\n    \"10-4\": \"Time of creation.\",\n    \"11-0\": \"`input1Name`\",\n    \"11-1\": \"String\",\n    \"11-2\": \"N/A\",\n    \"12-0\": \"`input2Name`\",\n    \"12-1\": \"String\",\n    \"12-2\": \"N/A\",\n    \"11-3\": \"TRUE\",\n    \"12-3\": \"TRUE\",\n    \"13-0\": \"`input3Name`\",\n    \"13-1\": \"String\",\n    \"13-2\": \"N/A\",\n    \"13-3\": \"TRUE\",\n    \"14-0\": \"`input4Name`\",\n    \"14-1\": \"String\",\n    \"14-2\": \"N/A\",\n    \"14-3\": \"TRUE\",\n    \"15-0\": \"`categoryId`\",\n    \"15-1\": \"String\",\n    \"15-2\": \"N/A\",\n    \"15-3\": \"TRUE\",\n    \"16-0\": \"`clientId`\",\n    \"16-1\": \"String\",\n    \"16-2\": \"N/A\",\n    \"16-3\": \"TRUE\",\n    \"17-0\": \"`keyId`\",\n    \"17-1\": \"String\",\n    \"17-2\": \"N/A\",\n    \"17-3\": \"NULL\\nIf unit never reported it or there is no driver logged in.\",\n    \"18-0\": \"`gpsFixTime`\",\n    \"18-1\": \"DateTime\",\n    \"18-2\": \"UTC time\",\n    \"18-3\": \"NULL\\nIf unit never reported valid GPS fix.\",\n    \"19-0\": \"`messageTime`\",\n    \"19-1\": \"DateTime\",\n    \"19-2\": \"UTC time\",\n    \"19-3\": \"NULL\\nIf unit never reported at all.\",\n    \"20-0\": \"`location`\",\n    \"20-1\": \"Location\",\n    \"20-2\": \"N/A\",\n    \"20-3\": \"TRUE\",\n    \"21-0\": \"`altitude`\",\n    \"21-1\": \"Double\",\n    \"21-2\": \"km\",\n    \"21-3\": \"TRUE\",\n    \"21-4\": \"Above sea level.\",\n    \"22-0\": \"`heading`\",\n    \"22-1\": \"Int\",\n    \"22-2\": \"Degrees\",\n    \"22-3\": \"TRUE\",\n    \"22-4\": \"0 to 359 degrees. 0 means straight north direction, 90 - straight east etc.\",\n    \"23-0\": \"`speed`\",\n    \"23-1\": \"Double\",\n    \"23-2\": \"km/h\",\n    \"23-3\": \"TRUE\",\n    \"23-4\": \"Current speed.\",\n    \"24-0\": \"`address`\",\n    \"24-1\": \"Address\",\n    \"24-2\": \"N/A\",\n    \"24-3\": \"TRUE\",\n    \"25-0\": \"`temperature1`\",\n    \"25-1\": \"Double\",\n    \"25-2\": \"Celcius degrees\",\n    \"25-3\": \"TRUE\",\n    \"25-4\": \"Temperature sensor 1 value.\",\n    \"26-0\": \"`temperature2`\",\n    \"26-1\": \"Double\",\n    \"26-2\": \"Celcius degrees\",\n    \"26-3\": \"TRUE\",\n    \"26-4\": \"Temperature sensor 2 value.\",\n    \"27-0\": \"`gsmLevel`\",\n    \"27-1\": \"Double\",\n    \"27-2\": \"N/A\",\n    \"27-3\": \"TRUE\",\n    \"27-4\": \"GSM signal level.\",\n    \"28-0\": \"`gsmSignalQuality`\",\n    \"28-1\": \"String\",\n    \"28-2\": \"N/A\",\n    \"28-3\": \"TRUE\",\n    \"28-4\": \"GSM signal quality, i.e. “Good” / “Bad”.\",\n    \"29-0\": \"`gpsSignalQuality`\",\n    \"29-1\": \"String\",\n    \"29-2\": \"N/A\",\n    \"29-3\": \"TRUE\",\n    \"29-4\": \"GPS signal quality, i.e. “Good” / “Bad”.\",\n    \"30-0\": \"`batteryLevel`\",\n    \"30-1\": \"Double\",\n    \"30-2\": \"Percent\",\n    \"30-3\": \"TRUE\",\n    \"30-4\": \"Internal battery level.\",\n    \"31-0\": \"`externalPower`\",\n    \"31-1\": \"Double\",\n    \"31-2\": \"Volt\",\n    \"31-3\": \"TRUE\",\n    \"31-4\": \"External power voltage.\",\n    \"32-0\": \"`preRun1`\",\n    \"32-1\": \"Double\",\n    \"32-2\": \"Seconds\",\n    \"32-3\": \"FALSE\",\n    \"32-4\": \"Fixed value to append to hour meter on input 1.\",\n    \"33-0\": \"`preRun2`\",\n    \"33-1\": \"Double\",\n    \"33-2\": \"Seconds\",\n    \"33-3\": \"TRUE\",\n    \"33-4\": \"Fixed value to append to hour meter on input 2.\",\n    \"34-0\": \"`run1`\",\n    \"34-1\": \"Double\",\n    \"34-2\": \"Seconds\",\n    \"34-3\": \"TRUE\",\n    \"34-4\": \"Hour meter to Input 1.\",\n    \"35-0\": \"`run2`\",\n    \"35-1\": \"Double\",\n    \"35-2\": \"Seconds\",\n    \"35-3\": \"TRUE\",\n    \"35-4\": \"Hour meter to Input 2.\",\n    \"36-4\": \"Hour meter to Input 3.\",\n    \"37-4\": \"Hour meter to Input 4.\",\n    \"36-0\": \"`run3`\",\n    \"37-0\": \"`run4`\",\n    \"36-1\": \"Double\",\n    \"37-1\": \"Double\",\n    \"36-2\": \"Seconds\",\n    \"37-2\": \"Seconds\",\n    \"36-3\": \"TRUE\",\n    \"37-3\": \"TRUE\",\n    \"38-0\": \"`runOdo`\",\n    \"38-1\": \"Double\",\n    \"38-2\": \"Km\",\n    \"38-3\": \"FALSE\",\n    \"38-4\": \"Hou rmeter for driving.\",\n    \"39-0\": \"`preKm`\",\n    \"39-1\": \"Double\",\n    \"39-2\": \"Km\",\n    \"39-3\": \"FALSE\",\n    \"39-4\": \"Fixed value to append to Km.\",\n    \"40-0\": \"`km`\",\n    \"40-1\": \"Double\",\n    \"40-2\": \"Km\",\n    \"40-3\": \"TRUE\",\n    \"40-4\": \"Total km driven.\",\n    \"41-0\": \"`input1`\",\n    \"41-1\": \"Bool\",\n    \"41-2\": \"N/A\",\n    \"41-3\": \"TRUE\",\n    \"41-4\": \"Status of input 1.\",\n    \"42-4\": \"Status of input 2.\",\n    \"43-4\": \"Status of input 3.\",\n    \"44-4\": \"Status of input 4.\",\n    \"45-4\": \"Status of input 5.\",\n    \"46-4\": \"Status of input 6.\",\n    \"47-4\": \"Status of input 7.\",\n    \"48-4\": \"Status of input 8.\",\n    \"49-4\": \"Status of input 9.\",\n    \"50-4\": \"Status of input 10.\",\n    \"42-0\": \"`input2`\",\n    \"43-0\": \"`input3`\",\n    \"44-0\": \"`input4`\",\n    \"45-0\": \"`input5`\",\n    \"46-0\": \"`input6`\",\n    \"47-0\": \"`input7`\",\n    \"48-0\": \"`input8`\",\n    \"49-0\": \"`input9`\",\n    \"50-0\": \"`input10`\",\n    \"42-1\": \"Bool\",\n    \"43-1\": \"Bool\",\n    \"44-1\": \"Bool\",\n    \"45-1\": \"Bool\",\n    \"46-1\": \"Bool\",\n    \"47-1\": \"Bool\",\n    \"48-1\": \"Bool\",\n    \"49-1\": \"Bool\",\n    \"50-1\": \"Bool\",\n    \"42-2\": \"N/A\",\n    \"43-2\": \"N/A\",\n    \"44-2\": \"N/A\",\n    \"45-2\": \"N/A\",\n    \"46-2\": \"N/A\",\n    \"47-2\": \"N/A\",\n    \"48-2\": \"N/A\",\n    \"49-2\": \"N/A\",\n    \"50-2\": \"N/A\",\n    \"42-3\": \"TRUE\",\n    \"43-3\": \"TRUE\",\n    \"44-3\": \"TRUE\",\n    \"45-3\": \"TRUE\",\n    \"46-3\": \"TRUE\",\n    \"47-3\": \"TRUE\",\n    \"48-3\": \"TRUE\",\n    \"49-3\": \"TRUE\",\n    \"50-3\": \"TRUE\",\n    \"51-0\": \"`output1`\",\n    \"52-0\": \"`output2`\",\n    \"53-0\": \"`output3`\",\n    \"54-0\": \"`output4`\",\n    \"55-0\": \"`output5`\",\n    \"51-1\": \"Bool\",\n    \"52-1\": \"Bool\",\n    \"53-1\": \"Bool\",\n    \"54-1\": \"Bool\",\n    \"55-1\": \"Bool\",\n    \"51-2\": \"N/A\",\n    \"52-2\": \"N/A\",\n    \"53-2\": \"N/A\",\n    \"54-2\": \"N/A\",\n    \"55-2\": \"N/A\",\n    \"51-3\": \"TRUE\",\n    \"52-3\": \"TRUE\",\n    \"53-3\": \"TRUE\",\n    \"54-3\": \"TRUE\",\n    \"55-3\": \"TRUE\",\n    \"51-4\": \"Status of output 1.\",\n    \"52-4\": \"Status of output 2.\",\n    \"53-4\": \"Status of output 3.\",\n    \"54-4\": \"Status of output 4.\",\n    \"55-4\": \"Status of output 5.\",\n    \"56-0\": \"`analogInput1`\",\n    \"56-1\": \"Double\",\n    \"56-2\": \"Volt\",\n    \"56-3\": \"TRUE\",\n    \"56-4\": \"Voltage on analog input 1.\",\n    \"57-0\": \"`analogInput2`\",\n    \"57-1\": \"Double\",\n    \"57-2\": \"Volt\",\n    \"57-3\": \"TRUE\",\n    \"58-0\": \"`analogInput4`\",\n    \"58-1\": \"Double\",\n    \"58-2\": \"Volt\",\n    \"58-3\": \"TRUE\",\n    \"57-4\": \"Voltage on analog input 2.\",\n    \"58-4\": \"Voltage on analog input 4.\",\n    \"59-0\": \"`input1ChangeCounter`\",\n    \"59-1\": \"Int\",\n    \"59-2\": \"N/A\",\n    \"59-3\": \"TRUE\",\n    \"59-4\": \"Number of input cycles on input 1.\",\n    \"60-0\": \"`input2ChangeCounter`\",\n    \"61-0\": \"`input3ChangeCounter`\",\n    \"62-0\": \"`input4ChangeCounter`\",\n    \"60-1\": \"Int\",\n    \"61-1\": \"Int\",\n    \"62-1\": \"Int\",\n    \"60-2\": \"N/A\",\n    \"61-2\": \"N/A\",\n    \"62-2\": \"N/A\",\n    \"60-3\": \"TRUE\",\n    \"61-3\": \"TRUE\",\n    \"62-3\": \"TRUE\",\n    \"60-4\": \"Number of input cycles on input 2.\",\n    \"61-4\": \"Number of input cycles on input 3.\",\n    \"62-4\": \"Number of input cycles on input 4.\",\n    \"63-2\": \"N/A\",\n    \"63-0\": \"`isActive`\",\n    \"63-1\": \"Bool\",\n    \"63-3\": \"FALSE\",\n    \"63-4\": \"Indicates whether unit is active or inactive.\",\n    \"64-0\": \"`isOwn`\",\n    \"64-1\": \"Bool\",\n    \"64-2\": \"N/A\",\n    \"64-3\": \"TRUE\",\n    \"64-4\": \"Indicates whether the unit is owned by customer using the API, or not.\",\n    \"65-0\": \"`currentStop`\",\n    \"65-1\": \"Double\",\n    \"65-2\": \"Seconds\",\n    \"65-3\": \"TRUE\",\n    \"65-4\": \"Current stop time in seconds.\"\n  },\n  \"cols\": 5,\n  \"rows\": 66\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Important\",\n  \"body\": \"Not all of the above parameters are available for all unit types.\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Request (example)</b></h4>\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"39670\\\"\\n} \",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Response</b></h4>\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" {\\n           \\\"list\\\":[\\n              {\\n                 \\\"id\\\": \\\"39670\\\",\\n                 \\\"serialNumber\\\": \\\"216990\\\",\\n                 \\\"phoneNumber\\\": \\\"4511794299\\\",\\n                 \\\"name\\\": \\\"Petra Wollerslev\\\",\\n                 \\\"displayName\\\": \\\"CADDY Petra Wollerslev\\\",\\n                 \\\"referenceNumber\\\": \\\"1100\\\",\\n                 \\\"note\\\": \\\"\\\",\\n                 \\\"createdAt\\\": \\\"2011-07-11T10:33:21.9670000Z\\\",\\n                 \\\"input1Name\\\": \\\"Power outlet\\\",\\n                 \\\"input2Name\\\": \\\"Ignition\\\",\\n                 \\\"input3Name\\\": \\\"Input 3\\\",\\n                 \\\"input4Name\\\": \\\"Input 4\\\",\\n                 \\\"categoryId\\\": \\\"30559\\\",\\n                 \\\"gpsFixTime\\\": \\\"2013-08-26T08:58:40.0000000\\\",\\n                 \\\"messageTime\\\": \\\"2013-08-26T08:58:40.0000000\\\",\\n                 \\\"location\\\": {\\n                    \\\"latitude\\\": 56.0800566666667,\\n                    \\\"longitude\\\": 12.537155\\n                 },\\n                 \\\"altitude\\\": 0,\\n                 \\\"heading\\\": 35,\\n                 \\\"speed\\\": 0,\\n                 \\\"address\\\": {\\n                    \\\"country\\\": \\\"DK\\\",\\n                    \\\"zipCode\\\": \\\"3140\\\",\\n                    \\\"city\\\": \\\"Ålsgårde\\\",\\n                    \\\"streetAddress\\\": \\\"Nordre Strandvej 227\\\"\\n                 },\\n                 \\\"gsmLevel\\\": 100,\\n                 \\\"gpsSignalQuality\\\": \\\"Good\\\",\\n                 \\\"batteryLevel\\\": 90,\\n                 \\\"externalPower\\\": 12.747,\\n                 \\\"preRun1\\\": 0,\\n                 \\\"preRun2\\\": 0,\\n                 \\\"run1\\\": 0,\\n                 \\\"run2\\\": 2443680,\\n                 \\\"run3\\\": 0,\\n                 \\\"run4\\\": 0,\\n                 \\\"runOdo\\\": 2185980,\\n                 \\\"preKm\\\": 0,\\n                 \\\"km\\\": 29087,\\n                 \\\"input1\\\": false,\\n                 \\\"input2\\\": false,\\n                 \\\"input3\\\": false,\\n                 \\\"input4\\\": false,\\n                 \\\"input5\\\": false,\\n                 \\\"input6\\\": true,\\n                 \\\"input7\\\": false,\\n                 \\\"input8\\\": false,\\n                 \\\"input9\\\": false,\\n                 \\\"input10\\\": false,\\n                 \\\"output1\\\": false,\\n                 \\\"output2\\\": true,\\n                 \\\"output3\\\": false,\\n                 \\\"output4\\\": true,\\n                 \\\"output5\\\": false,\\n                 \\\"isActive\\\": true,\\n                 \\\"isOwn\\\": true\\n              }\\n           ]\\n        }\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"&nbsp;\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h3>UpdateUnit</h3>\"\n}\n[/block]\nWill update parameters on any of the existing units. \n[block:html]\n{\n  \"html\": \"<h4><b>Parameters</b></h4>\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Data type\",\n    \"h-2\": \"Unit of measurement\",\n    \"h-3\": \"Description\",\n    \"0-0\": \"`id` <span style=\\\"color:red\\\">*</span>\",\n    \"0-1\": \"String\",\n    \"0-3\": \"Id of unit to update.\",\n    \"1-0\": \"`name`\",\n    \"1-1\": \"String\",\n    \"1-3\": \"Name of unit.\",\n    \"2-0\": \"`referenceNumber`\",\n    \"2-1\": \"String\",\n    \"2-3\": \"Specify empty string to clear current value.\",\n    \"3-0\": \"`vehicleType`\",\n    \"3-1\": \"String\",\n    \"3-3\": \"Unit type, either `car`, `machine` or `boat`\",\n    \"4-0\": \"`clientId`\",\n    \"4-1\": \"String\",\n    \"4-3\": \"Id of new client. Specify empty string to clear current value.\",\n    \"5-0\": \"`preKm`\",\n    \"5-1\": \"Double\",\n    \"5-2\": \"Kilometers\",\n    \"6-0\": \"`preRun1`\",\n    \"6-1\": \"Double\",\n    \"6-2\": \"Seconds\",\n    \"7-0\": \"`preRun2`\",\n    \"7-1\": \"Double\",\n    \"7-2\": \"Seconds\",\n    \"8-0\": \"`note`\",\n    \"8-1\": \"String\",\n    \"8-2\": \"\",\n    \"8-3\": \"Specify empty string to clear current value.\",\n    \"9-0\": \"`isActive`\",\n    \"9-1\": \"Bool\",\n    \"10-0\": \"`input1Name`\",\n    \"11-0\": \"`input2Name`\",\n    \"12-0\": \"`input3Name`\",\n    \"13-0\": \"`input4Name`\",\n    \"10-1\": \"String\",\n    \"11-1\": \"String\",\n    \"12-1\": \"String\",\n    \"13-1\": \"String\",\n    \"10-3\": \"Specify empty string to clear current value.\",\n    \"11-3\": \"Specify empty string to clear current value.\",\n    \"12-3\": \"Specify empty string to clear current value.\",\n    \"13-3\": \"Specify empty string to clear current value.\",\n    \"14-0\": \"`lock`\",\n    \"14-1\": \"Bool\",\n    \"14-3\": \"Lock of unit. Specify true for lock and false for unlock.\"\n  },\n  \"cols\": 4,\n  \"rows\": 15\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Errors</b></h4>\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Error Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`unitNotFound`\",\n    \"1-0\": \"`clientNotFound`\",\n    \"2-0\": \"`categoryNotFound`\",\n    \"3-0\": \"`The unit can't be locked`\",\n    \"4-0\": \"`Locking/Unlocking of unit failed because it already is locked/unlocked`\",\n    \"3-1\": \"Returned if user does not have the rights to lock/unlock unit with specified id.\",\n    \"4-1\": \"Other parameters are still updated when this error code is returned.\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Parameters</b></h4>\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Data type\",\n    \"h-2\": \"Note\",\n    \"0-0\": \"id <span style=\\\"color:red\\\">*</span>\",\n    \"0-1\": \"String\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Request (example)</b></h4>\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"39670\\\",\\n  \\\"name\\\": \\\"Peter Andersson\\\",\\n  \\\"categoryId\\\": \\\"30556\\\"\\n} \",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Response</b></h4>\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"A **Unit** corresponds to a GPS device, which may be installed on various types of machines, vehicles or other forms of hardware. Such a GPS device is typically identified by it's unique serial number, which also denotes the model version.\n\nURL Structure is: \n`https://api.trackunit.com/public/Unit`","slug":"unit","type":"basic","title":"Unit"}

Unit

A **Unit** corresponds to a GPS device, which may be installed on various types of machines, vehicles or other forms of hardware. Such a GPS device is typically identified by it's unique serial number, which also denotes the model version. URL Structure is: `https://api.trackunit.com/public/Unit`

[block:html] { "html": "<h3>GetUnit</h3>" } [/block] Will list parameters on specific unit. [block:html] { "html": "<h4><b>Parameters</b></h4>" } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Data type", "h-2": "Unit of measurement", "h-3": "Note", "0-0": "`id` <span style=\"color:red\">*</span>", "0-1": "String", "0-2": "N/A", "0-3": "If supplied, we return only that unit. If not, we return all units (taking into account other parameters).", "1-0": "`serialNumber`", "1-1": "String", "1-2": "N/A", "2-0": "`referenceNumber`", "2-1": "String", "2-2": "N/A", "1-3": "", "2-3": "If supplied, we only return units that belong to a specified reference number.", "3-0": "`categoryId`", "3-3": "If supplied, we only return units that belong to a specified category.", "4-0": "`clientId`", "4-3": "If supplied, we only return units that belong to a specified client.", "5-0": "`groupId`", "5-3": "If supplied, we only return units that belong to a specified group.", "6-0": "`zoneId`", "6-3": "If supplied, we return only units currently located inside a specified zone.", "7-0": "`pointId`", "7-3": "If supplied, we return only units currently located close to a specified point. If this is supplied, the user may also supply a radius to search within.", "8-0": "`point`", "8-1": "Location", "8-2": "Decimal degrees. Latitude = [-90, 90], Longitude = [-180, 180].", "8-3": "Same as with PointId. Specify location by use of a Lat/Lon.", "9-0": "`radius`", "9-3": "Radius to search within. Default value is 1 kilometer. Valid value is > 0 and < 40000 km.", "3-1": "String", "4-1": "String", "5-1": "String", "6-1": "String", "7-1": "String", "9-1": "double", "9-2": "km", "3-2": "N/A", "4-2": "N/A", "5-2": "N/A", "6-2": "N/A", "7-2": "N/A" }, "cols": 4, "rows": 10 } [/block] [block:html] { "html": "<h4><b>Errors</b></h4>" } [/block] [block:parameters] { "data": { "h-0": "Error Code", "h-1": "Description", "0-0": "`unitNotFound`", "0-1": "Unit with supplied “Id” was not found.", "1-0": "`categoryNotFound`", "1-1": "Category with supplied “CategoryId” was not found.", "2-0": "`clientNotFound`", "2-1": "Client with supplied “ClientId” was not found.", "3-0": "`groupNotFound`", "3-1": "Group with supplied “GroupId” was not found.", "4-0": "`zoneNotFound`", "4-1": "Zone with supplied “ZoneId” was not found.", "5-0": "`pointNotFound`", "5-1": "Point with supplied “PointId” was not found." }, "cols": 2, "rows": 6 } [/block] [block:html] { "html": "<h4><b>Columns</b></h4>" } [/block] Refer to the following table for description of parameters: [block:parameters] { "data": { "h-0": "Name", "h-1": "Data type", "h-2": "Unit of measurement", "h-3": "Nullability", "h-4": "Note", "0-0": "`id`", "0-1": "String", "0-2": "N/A", "0-3": "FALSE", "0-4": "Unique identifier.", "1-0": "`serialNumber`", "1-1": "String", "1-2": "N/A", "1-3": "FALSE", "1-4": "Unit GSM number.", "2-0": "`phoneNumber`", "2-1": "String", "2-2": "N/A", "2-3": "TRUE", "3-0": "`vehicleType`", "3-1": "String", "3-2": "N/A", "3-3": "FALSE", "4-0": "`deviceType`", "4-1": "String", "4-2": "N/A", "4-3": "FALSE", "4-4": "The model of the unit.", "5-0": "`deviceModel`", "5-1": "String", "5-2": "N/A", "5-3": "FALSE", "5-4": "The model of the unit", "6-0": "`name`", "6-1": "String", "6-2": "N/A", "6-3": "FALSE", "7-0": "`displayName`", "7-1": "String", "7-2": "N/A", "7-3": "FALSE", "7-4": "The full display name with category name prefixed.", "8-0": "`referenceNumber`", "8-1": "String", "8-2": "N/A", "8-3": "TRUE", "9-0": "`note`", "9-1": "String", "9-2": "N/A", "9-3": "TRUE", "10-0": "`createdAt`", "10-1": "DateTime", "10-2": "N/A", "10-3": "TRUE", "10-4": "Time of creation.", "11-0": "`input1Name`", "11-1": "String", "11-2": "N/A", "12-0": "`input2Name`", "12-1": "String", "12-2": "N/A", "11-3": "TRUE", "12-3": "TRUE", "13-0": "`input3Name`", "13-1": "String", "13-2": "N/A", "13-3": "TRUE", "14-0": "`input4Name`", "14-1": "String", "14-2": "N/A", "14-3": "TRUE", "15-0": "`categoryId`", "15-1": "String", "15-2": "N/A", "15-3": "TRUE", "16-0": "`clientId`", "16-1": "String", "16-2": "N/A", "16-3": "TRUE", "17-0": "`keyId`", "17-1": "String", "17-2": "N/A", "17-3": "NULL\nIf unit never reported it or there is no driver logged in.", "18-0": "`gpsFixTime`", "18-1": "DateTime", "18-2": "UTC time", "18-3": "NULL\nIf unit never reported valid GPS fix.", "19-0": "`messageTime`", "19-1": "DateTime", "19-2": "UTC time", "19-3": "NULL\nIf unit never reported at all.", "20-0": "`location`", "20-1": "Location", "20-2": "N/A", "20-3": "TRUE", "21-0": "`altitude`", "21-1": "Double", "21-2": "km", "21-3": "TRUE", "21-4": "Above sea level.", "22-0": "`heading`", "22-1": "Int", "22-2": "Degrees", "22-3": "TRUE", "22-4": "0 to 359 degrees. 0 means straight north direction, 90 - straight east etc.", "23-0": "`speed`", "23-1": "Double", "23-2": "km/h", "23-3": "TRUE", "23-4": "Current speed.", "24-0": "`address`", "24-1": "Address", "24-2": "N/A", "24-3": "TRUE", "25-0": "`temperature1`", "25-1": "Double", "25-2": "Celcius degrees", "25-3": "TRUE", "25-4": "Temperature sensor 1 value.", "26-0": "`temperature2`", "26-1": "Double", "26-2": "Celcius degrees", "26-3": "TRUE", "26-4": "Temperature sensor 2 value.", "27-0": "`gsmLevel`", "27-1": "Double", "27-2": "N/A", "27-3": "TRUE", "27-4": "GSM signal level.", "28-0": "`gsmSignalQuality`", "28-1": "String", "28-2": "N/A", "28-3": "TRUE", "28-4": "GSM signal quality, i.e. “Good” / “Bad”.", "29-0": "`gpsSignalQuality`", "29-1": "String", "29-2": "N/A", "29-3": "TRUE", "29-4": "GPS signal quality, i.e. “Good” / “Bad”.", "30-0": "`batteryLevel`", "30-1": "Double", "30-2": "Percent", "30-3": "TRUE", "30-4": "Internal battery level.", "31-0": "`externalPower`", "31-1": "Double", "31-2": "Volt", "31-3": "TRUE", "31-4": "External power voltage.", "32-0": "`preRun1`", "32-1": "Double", "32-2": "Seconds", "32-3": "FALSE", "32-4": "Fixed value to append to hour meter on input 1.", "33-0": "`preRun2`", "33-1": "Double", "33-2": "Seconds", "33-3": "TRUE", "33-4": "Fixed value to append to hour meter on input 2.", "34-0": "`run1`", "34-1": "Double", "34-2": "Seconds", "34-3": "TRUE", "34-4": "Hour meter to Input 1.", "35-0": "`run2`", "35-1": "Double", "35-2": "Seconds", "35-3": "TRUE", "35-4": "Hour meter to Input 2.", "36-4": "Hour meter to Input 3.", "37-4": "Hour meter to Input 4.", "36-0": "`run3`", "37-0": "`run4`", "36-1": "Double", "37-1": "Double", "36-2": "Seconds", "37-2": "Seconds", "36-3": "TRUE", "37-3": "TRUE", "38-0": "`runOdo`", "38-1": "Double", "38-2": "Km", "38-3": "FALSE", "38-4": "Hou rmeter for driving.", "39-0": "`preKm`", "39-1": "Double", "39-2": "Km", "39-3": "FALSE", "39-4": "Fixed value to append to Km.", "40-0": "`km`", "40-1": "Double", "40-2": "Km", "40-3": "TRUE", "40-4": "Total km driven.", "41-0": "`input1`", "41-1": "Bool", "41-2": "N/A", "41-3": "TRUE", "41-4": "Status of input 1.", "42-4": "Status of input 2.", "43-4": "Status of input 3.", "44-4": "Status of input 4.", "45-4": "Status of input 5.", "46-4": "Status of input 6.", "47-4": "Status of input 7.", "48-4": "Status of input 8.", "49-4": "Status of input 9.", "50-4": "Status of input 10.", "42-0": "`input2`", "43-0": "`input3`", "44-0": "`input4`", "45-0": "`input5`", "46-0": "`input6`", "47-0": "`input7`", "48-0": "`input8`", "49-0": "`input9`", "50-0": "`input10`", "42-1": "Bool", "43-1": "Bool", "44-1": "Bool", "45-1": "Bool", "46-1": "Bool", "47-1": "Bool", "48-1": "Bool", "49-1": "Bool", "50-1": "Bool", "42-2": "N/A", "43-2": "N/A", "44-2": "N/A", "45-2": "N/A", "46-2": "N/A", "47-2": "N/A", "48-2": "N/A", "49-2": "N/A", "50-2": "N/A", "42-3": "TRUE", "43-3": "TRUE", "44-3": "TRUE", "45-3": "TRUE", "46-3": "TRUE", "47-3": "TRUE", "48-3": "TRUE", "49-3": "TRUE", "50-3": "TRUE", "51-0": "`output1`", "52-0": "`output2`", "53-0": "`output3`", "54-0": "`output4`", "55-0": "`output5`", "51-1": "Bool", "52-1": "Bool", "53-1": "Bool", "54-1": "Bool", "55-1": "Bool", "51-2": "N/A", "52-2": "N/A", "53-2": "N/A", "54-2": "N/A", "55-2": "N/A", "51-3": "TRUE", "52-3": "TRUE", "53-3": "TRUE", "54-3": "TRUE", "55-3": "TRUE", "51-4": "Status of output 1.", "52-4": "Status of output 2.", "53-4": "Status of output 3.", "54-4": "Status of output 4.", "55-4": "Status of output 5.", "56-0": "`analogInput1`", "56-1": "Double", "56-2": "Volt", "56-3": "TRUE", "56-4": "Voltage on analog input 1.", "57-0": "`analogInput2`", "57-1": "Double", "57-2": "Volt", "57-3": "TRUE", "58-0": "`analogInput4`", "58-1": "Double", "58-2": "Volt", "58-3": "TRUE", "57-4": "Voltage on analog input 2.", "58-4": "Voltage on analog input 4.", "59-0": "`input1ChangeCounter`", "59-1": "Int", "59-2": "N/A", "59-3": "TRUE", "59-4": "Number of input cycles on input 1.", "60-0": "`input2ChangeCounter`", "61-0": "`input3ChangeCounter`", "62-0": "`input4ChangeCounter`", "60-1": "Int", "61-1": "Int", "62-1": "Int", "60-2": "N/A", "61-2": "N/A", "62-2": "N/A", "60-3": "TRUE", "61-3": "TRUE", "62-3": "TRUE", "60-4": "Number of input cycles on input 2.", "61-4": "Number of input cycles on input 3.", "62-4": "Number of input cycles on input 4.", "63-2": "N/A", "63-0": "`isActive`", "63-1": "Bool", "63-3": "FALSE", "63-4": "Indicates whether unit is active or inactive.", "64-0": "`isOwn`", "64-1": "Bool", "64-2": "N/A", "64-3": "TRUE", "64-4": "Indicates whether the unit is owned by customer using the API, or not.", "65-0": "`currentStop`", "65-1": "Double", "65-2": "Seconds", "65-3": "TRUE", "65-4": "Current stop time in seconds." }, "cols": 5, "rows": 66 } [/block] [block:callout] { "type": "info", "title": "Important", "body": "Not all of the above parameters are available for all unit types." } [/block] [block:html] { "html": "<h4><b>Request (example)</b></h4>" } [/block] [block:code] { "codes": [ { "code": "{\n \"id\": \"39670\"\n} ", "language": "json" } ] } [/block] [block:html] { "html": "<h4><b>Response</b></h4>" } [/block] [block:code] { "codes": [ { "code": " {\n \"list\":[\n {\n \"id\": \"39670\",\n \"serialNumber\": \"216990\",\n \"phoneNumber\": \"4511794299\",\n \"name\": \"Petra Wollerslev\",\n \"displayName\": \"CADDY Petra Wollerslev\",\n \"referenceNumber\": \"1100\",\n \"note\": \"\",\n \"createdAt\": \"2011-07-11T10:33:21.9670000Z\",\n \"input1Name\": \"Power outlet\",\n \"input2Name\": \"Ignition\",\n \"input3Name\": \"Input 3\",\n \"input4Name\": \"Input 4\",\n \"categoryId\": \"30559\",\n \"gpsFixTime\": \"2013-08-26T08:58:40.0000000\",\n \"messageTime\": \"2013-08-26T08:58:40.0000000\",\n \"location\": {\n \"latitude\": 56.0800566666667,\n \"longitude\": 12.537155\n },\n \"altitude\": 0,\n \"heading\": 35,\n \"speed\": 0,\n \"address\": {\n \"country\": \"DK\",\n \"zipCode\": \"3140\",\n \"city\": \"Ålsgårde\",\n \"streetAddress\": \"Nordre Strandvej 227\"\n },\n \"gsmLevel\": 100,\n \"gpsSignalQuality\": \"Good\",\n \"batteryLevel\": 90,\n \"externalPower\": 12.747,\n \"preRun1\": 0,\n \"preRun2\": 0,\n \"run1\": 0,\n \"run2\": 2443680,\n \"run3\": 0,\n \"run4\": 0,\n \"runOdo\": 2185980,\n \"preKm\": 0,\n \"km\": 29087,\n \"input1\": false,\n \"input2\": false,\n \"input3\": false,\n \"input4\": false,\n \"input5\": false,\n \"input6\": true,\n \"input7\": false,\n \"input8\": false,\n \"input9\": false,\n \"input10\": false,\n \"output1\": false,\n \"output2\": true,\n \"output3\": false,\n \"output4\": true,\n \"output5\": false,\n \"isActive\": true,\n \"isOwn\": true\n }\n ]\n }", "language": "json" } ] } [/block] [block:html] { "html": "&nbsp;" } [/block] [block:html] { "html": "<h3>UpdateUnit</h3>" } [/block] Will update parameters on any of the existing units. [block:html] { "html": "<h4><b>Parameters</b></h4>" } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Data type", "h-2": "Unit of measurement", "h-3": "Description", "0-0": "`id` <span style=\"color:red\">*</span>", "0-1": "String", "0-3": "Id of unit to update.", "1-0": "`name`", "1-1": "String", "1-3": "Name of unit.", "2-0": "`referenceNumber`", "2-1": "String", "2-3": "Specify empty string to clear current value.", "3-0": "`vehicleType`", "3-1": "String", "3-3": "Unit type, either `car`, `machine` or `boat`", "4-0": "`clientId`", "4-1": "String", "4-3": "Id of new client. Specify empty string to clear current value.", "5-0": "`preKm`", "5-1": "Double", "5-2": "Kilometers", "6-0": "`preRun1`", "6-1": "Double", "6-2": "Seconds", "7-0": "`preRun2`", "7-1": "Double", "7-2": "Seconds", "8-0": "`note`", "8-1": "String", "8-2": "", "8-3": "Specify empty string to clear current value.", "9-0": "`isActive`", "9-1": "Bool", "10-0": "`input1Name`", "11-0": "`input2Name`", "12-0": "`input3Name`", "13-0": "`input4Name`", "10-1": "String", "11-1": "String", "12-1": "String", "13-1": "String", "10-3": "Specify empty string to clear current value.", "11-3": "Specify empty string to clear current value.", "12-3": "Specify empty string to clear current value.", "13-3": "Specify empty string to clear current value.", "14-0": "`lock`", "14-1": "Bool", "14-3": "Lock of unit. Specify true for lock and false for unlock." }, "cols": 4, "rows": 15 } [/block] [block:html] { "html": "<h4><b>Errors</b></h4>" } [/block] [block:parameters] { "data": { "h-0": "Error Code", "h-1": "Description", "0-0": "`unitNotFound`", "1-0": "`clientNotFound`", "2-0": "`categoryNotFound`", "3-0": "`The unit can't be locked`", "4-0": "`Locking/Unlocking of unit failed because it already is locked/unlocked`", "3-1": "Returned if user does not have the rights to lock/unlock unit with specified id.", "4-1": "Other parameters are still updated when this error code is returned." }, "cols": 2, "rows": 5 } [/block] [block:html] { "html": "<h4><b>Parameters</b></h4>" } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Data type", "h-2": "Note", "0-0": "id <span style=\"color:red\">*</span>", "0-1": "String" }, "cols": 3, "rows": 1 } [/block] [block:html] { "html": "<h4><b>Request (example)</b></h4>" } [/block] [block:code] { "codes": [ { "code": "{\n \"id\": \"39670\",\n \"name\": \"Peter Andersson\",\n \"categoryId\": \"30556\"\n} ", "language": "json" } ] } [/block] [block:html] { "html": "<h4><b>Response</b></h4>" } [/block] [block:code] { "codes": [ { "code": "{}", "language": "json" } ] } [/block]