{"_id":"56d6cbeb47f18a2d0088d63d","category":{"_id":"56d6bbf046d19315000f8ea2","version":"56d54a77075dfa0b00be98d8","project":"56d54a77075dfa0b00be98d5","__v":4,"pages":["56d6bc9947f18a2d0088d612","56d6cb47c6473c0b00ba8881","56d6cbeb47f18a2d0088d63d","56d6e080a9e4480b00efb80f"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-02T10:09:52.766Z","from_sync":false,"order":0,"slug":"introduction","title":"Main APIs"},"githubsync":"","user":"56cf3e935267d70b00494c47","__v":31,"project":"56d54a77075dfa0b00be98d5","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":["570c94d639ef110e0014f5ec"],"next":{"pages":[],"description":""},"createdAt":"2016-03-02T11:18:03.141Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"[block:html]\n{\n  \"html\": \"<h3>Authentication</h3>\"\n}\n[/block]\nA login token is required to use the Click & Access feature.\n\nSuch a token can be acquired by utilizing the following GET request.\n\nURL Structure is:\n`https://manager.trackunit.com/GetLoginToken.ashx?userName={USER_NAME}&password={PASSWORD}`\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`{USER_NAME}`\",\n    \"0-1\": \"Your valid username for Trackunit Manager.\",\n    \"1-0\": \"`{PASSWORD}`\",\n    \"1-1\": \"Your password for Trackunit Manager.\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\nParameters `{USER_NAME}` and `{PASSWORD}` must specify valid credentials (also not expired).\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`200`\",\n    \"0-1\": \"If successful, HTTP status code 200 is returned, and a login token returned in the response stream (as plain text string).\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\nThe token has a lifetime of 2 minutes. This means that the token must be used no later than 2 minutes after obtaining it. After this, you can stay logged in for as long as needed. \n[block:html]\n{\n  \"html\": \"&nbsp;\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h3>Protocol</h3>\"\n}\n[/block]\nTo use the Click & Access feature, you must use your login token (see section General) with the following URL format:\n`https://manager.trackunit.com/Open.ashx?token=TOKEN&language={LANGUAGE}{OTHER_PARAMETERS}`\n[block:html]\n{\n  \"html\": \"<h4><b>Supported parameters</b></h4>\"\n}\n[/block]\nSupported parameters are: \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`language`\",\n    \"0-1\": \"Sets the FMS language.\",\n    \"1-0\": \"`tab`\",\n    \"1-1\": \"Sets the actual tab. Set to Map, when tracking single unit.\",\n    \"2-0\": \"`action`\",\n    \"2-1\": \"Set to trackUnit, when tracking a single unit.\",\n    \"3-0\": \"`unit`\",\n    \"3-1\": \"Serial number of unit to show (map level zoomed to fit).\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Supported language codes</b></h4>\"\n}\n[/block]\nSupported language codes are: \n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`ar-AE`\",\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"0-1\": \"Arabic (UAE)\",\n    \"1-0\": \"`cs`\",\n    \"1-1\": \"Czech\",\n    \"2-0\": \"`da`\",\n    \"2-1\": \"Danish\",\n    \"3-0\": \"`de`\",\n    \"3-1\": \"German\",\n    \"4-0\": \"`en-GB`\",\n    \"4-1\": \"English (Great Britain)\",\n    \"5-0\": \"`en-US`\",\n    \"5-1\": \"English (USA)\",\n    \"6-0\": \"`es`\",\n    \"6-1\": \"Spanish\",\n    \"7-0\": \"`fi`\",\n    \"7-1\": \"Finnish\",\n    \"8-0\": \"`fr`\",\n    \"8-1\": \"French\",\n    \"9-0\": \"`hu`\",\n    \"9-1\": \"Hungarian\",\n    \"10-0\": \"`it-IT`\",\n    \"10-1\": \"Italian (Italy)\",\n    \"11-0\": \"`nl`\",\n    \"11-1\": \"Dutch\",\n    \"12-0\": \"`no`\",\n    \"12-1\": \"Norwegian\",\n    \"13-0\": \"`pl`\",\n    \"13-1\": \"Polish\",\n    \"14-0\": \"`ro`\",\n    \"14-1\": \"Romanian\",\n    \"15-0\": \"`ru`\",\n    \"15-1\": \"Russian\",\n    \"16-0\": \"`sk`\",\n    \"16-1\": \"Slovak\",\n    \"17-0\": \"`sv`\",\n    \"17-1\": \"Swedish\",\n    \"18-0\": \"`pt-BR`\",\n    \"18-1\": \"Portuguese (Brazilian)\",\n    \"19-0\": \"`th`\",\n    \"19-1\": \"Thai\"\n  },\n  \"cols\": 2,\n  \"rows\": 20\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Example</b></h4>\"\n}\n[/block]\nExample of URL with specific parameters:\n`https://manager.trackunit.com/Open.ashx?token=f2babbac598d47d6b99ba70c000002db&language=en-GB&tab=map&action=trackUnit&unit=998877`","excerpt":"The **Click & Access** feature allows you to open and login to Trackunit Manager by use of a URL, in connection with a login token.\n\nSelected parameters can be appended to the URL, making it possible to e.g. open Trackunit Manager with specific units pre-selected, and the map level zoomed to fit this selection.","slug":"click-and-access-api","type":"basic","title":"Click and Access API"}

Click and Access API

The **Click & Access** feature allows you to open and login to Trackunit Manager by use of a URL, in connection with a login token. Selected parameters can be appended to the URL, making it possible to e.g. open Trackunit Manager with specific units pre-selected, and the map level zoomed to fit this selection.

[block:html] { "html": "<h3>Authentication</h3>" } [/block] A login token is required to use the Click & Access feature. Such a token can be acquired by utilizing the following GET request. URL Structure is: `https://manager.trackunit.com/GetLoginToken.ashx?userName={USER_NAME}&password={PASSWORD}` [block:parameters] { "data": { "h-0": "Name", "h-1": "Description", "0-0": "`{USER_NAME}`", "0-1": "Your valid username for Trackunit Manager.", "1-0": "`{PASSWORD}`", "1-1": "Your password for Trackunit Manager." }, "cols": 2, "rows": 2 } [/block] Parameters `{USER_NAME}` and `{PASSWORD}` must specify valid credentials (also not expired). [block:parameters] { "data": { "h-0": "Code", "h-1": "Description", "0-0": "`200`", "0-1": "If successful, HTTP status code 200 is returned, and a login token returned in the response stream (as plain text string)." }, "cols": 2, "rows": 1 } [/block] The token has a lifetime of 2 minutes. This means that the token must be used no later than 2 minutes after obtaining it. After this, you can stay logged in for as long as needed. [block:html] { "html": "&nbsp;" } [/block] [block:html] { "html": "<h3>Protocol</h3>" } [/block] To use the Click & Access feature, you must use your login token (see section General) with the following URL format: `https://manager.trackunit.com/Open.ashx?token=TOKEN&language={LANGUAGE}{OTHER_PARAMETERS}` [block:html] { "html": "<h4><b>Supported parameters</b></h4>" } [/block] Supported parameters are: [block:parameters] { "data": { "h-0": "Name", "h-1": "Description", "0-0": "`language`", "0-1": "Sets the FMS language.", "1-0": "`tab`", "1-1": "Sets the actual tab. Set to Map, when tracking single unit.", "2-0": "`action`", "2-1": "Set to trackUnit, when tracking a single unit.", "3-0": "`unit`", "3-1": "Serial number of unit to show (map level zoomed to fit)." }, "cols": 2, "rows": 4 } [/block] [block:html] { "html": "<h4><b>Supported language codes</b></h4>" } [/block] Supported language codes are: [block:parameters] { "data": { "0-0": "`ar-AE`", "h-0": "Name", "h-1": "Description", "0-1": "Arabic (UAE)", "1-0": "`cs`", "1-1": "Czech", "2-0": "`da`", "2-1": "Danish", "3-0": "`de`", "3-1": "German", "4-0": "`en-GB`", "4-1": "English (Great Britain)", "5-0": "`en-US`", "5-1": "English (USA)", "6-0": "`es`", "6-1": "Spanish", "7-0": "`fi`", "7-1": "Finnish", "8-0": "`fr`", "8-1": "French", "9-0": "`hu`", "9-1": "Hungarian", "10-0": "`it-IT`", "10-1": "Italian (Italy)", "11-0": "`nl`", "11-1": "Dutch", "12-0": "`no`", "12-1": "Norwegian", "13-0": "`pl`", "13-1": "Polish", "14-0": "`ro`", "14-1": "Romanian", "15-0": "`ru`", "15-1": "Russian", "16-0": "`sk`", "16-1": "Slovak", "17-0": "`sv`", "17-1": "Swedish", "18-0": "`pt-BR`", "18-1": "Portuguese (Brazilian)", "19-0": "`th`", "19-1": "Thai" }, "cols": 2, "rows": 20 } [/block] [block:html] { "html": "<h4><b>Example</b></h4>" } [/block] Example of URL with specific parameters: `https://manager.trackunit.com/Open.ashx?token=f2babbac598d47d6b99ba70c000002db&language=en-GB&tab=map&action=trackUnit&unit=998877`