{"_id":"59516ae6fafb63003375d55a","category":{"_id":"59516ae6fafb63003375d550","version":"59516ae6fafb63003375d54e","project":"5425e663ffd4411c319a65b4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-09-29T20:18:57.785Z","from_sync":false,"order":1,"slug":"reference","title":"Reference"},"project":"5425e663ffd4411c319a65b4","user":"5425e31affd4411c319a65b1","version":{"_id":"59516ae6fafb63003375d54e","project":"5425e663ffd4411c319a65b4","__v":1,"createdAt":"2017-06-26T20:13:26.122Z","releaseDate":"2017-06-26T20:13:26.122Z","categories":["59516ae6fafb63003375d54f","59516ae6fafb63003375d550"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.4.0","version":"2.4"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-09-29T21:29:00.269Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":9,"body":"Administrators are users who perform actions via the dashboard. An organization has one administrator of type ```super``` and zero or more of type ```standard``` (also known as *dispatchers* in the dashboard).  Administrators manage workers based on membership in the organization’s teams.\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"Create administrator\"\n}\n[/block]\nCreates a new administrator in your organization. An email will be sent for this administrator to confirm and configure their account. \n\nTo establish which teams an administrator can manage, see [Teams](doc:teams).\n\nBody parameters\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"name\",\n    \"0-1\": \"string\",\n    \"0-2\": \"The administrator’s complete name.\",\n    \"1-0\": \"email\",\n    \"1-1\": \"string\",\n    \"1-2\": \"The administrator’s email address.\",\n    \"2-0\": \"phone\",\n    \"2-1\": \"string\",\n    \"2-2\": \"Optional. The administrator's phone number.\",\n    \"3-0\": \"isReadOnly\",\n    \"3-1\": \"boolean\",\n    \"3-2\": \"Optional. Whether this administrator can perform write operations.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ curl -X POST \\\"https://onfleet.com/api/v2/admins\\\" \\\\\\n       -u \\\"cd3b3de84cc1ee040bf06512d233719c:\\\" \\\\\\n       -d '{\\\"name\\\":\\\"Chelsea M\\\",\\\"email\\\":\\\"cm:::at:::onf.lt\\\"}'\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"8AxaiKwMd~np7I*YP2NfukBE\\\",\\n  \\\"timeCreated\\\": 1455156651000,\\n  \\\"timeLastModified\\\": 1455156651779,\\n  \\\"organization\\\": \\\"yAM*fDkztrT3gUcz9mNDgNOL\\\",\\n  \\\"email\\\": \\\"cm@onf.lt\\\",\\n  \\\"type\\\": \\\"standard\\\",\\n  \\\"name\\\": \\\"Chelsea M\\\",\\n  \\\"isActive\\\": false,\\n  \\\"metadata\\\": []\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n```isActive``` denotes whether the administrator has completed their account registration, whereas `type` indicates if this administrator is the organization's creator (`super`) or a dispatcher (`standard`).\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"List administrators\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ curl -X GET \\\"https://onfleet.com/api/v2/admins\\\" \\\\\\n       -u \\\"cd3b3de84cc1ee040bf06512d233719c:\\\"\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[\\n\\t// ...\\n  {\\n    \\\"id\\\": \\\"tbVmEoNQwN9K92bsITQNUtWY\\\",\\n    \\\"timeCreated\\\": 1455048957000,\\n    \\\"timeLastModified\\\": 1455048957461,\\n    \\\"organization\\\": \\\"yAM*fDkztrT3gUcz9mNDgNOL\\\",\\n    \\\"email\\\": \\\"st@onfleet.com\\\",\\n    \\\"type\\\": \\\"standard\\\",\\n    \\\"name\\\": \\\"Sergey Tupolev\\\",\\n    \\\"isActive\\\": false,\\n    \\\"phone\\\": \\\"+16505557710\\\",\\n    \\\"metadata\\\": []\\n  },\\n  {\\n    \\\"id\\\": \\\"jBOlwJTkN0JzfE9Rj5vEL~UT\\\",\\n    \\\"timeCreated\\\": 1455048990000,\\n    \\\"timeLastModified\\\": 1455048990578,\\n    \\\"organization\\\": \\\"yAM*fDkztrT3gUcz9mNDgNOL\\\",\\n    \\\"email\\\": \\\"is@onfleet.com\\\",\\n    \\\"type\\\": \\\"standard\\\",\\n    \\\"name\\\": \\\"Iñaki Smith\\\",\\n    \\\"isActive\\\": false,\\n    \\\"phone\\\": \\\"+14155556327\\\",\\n    \\\"metadata\\\": []\\n  },\\n  {\\n    \\\"id\\\": \\\"8AxaiKwMd~np7I*YP2NfukBE\\\",\\n    \\\"timeCreated\\\": 1455156651000,\\n    \\\"timeLastModified\\\": 1455156651779,\\n    \\\"organization\\\": \\\"yAM*fDkztrT3gUcz9mNDgNOL\\\",\\n    \\\"email\\\": \\\"cm@onf.lt\\\",\\n    \\\"type\\\": \\\"standard\\\",\\n    \\\"name\\\": \\\"Chelsea M\\\",\\n    \\\"isActive\\\": false,\\n    \\\"metadata\\\": []\\n  },\\n  // ...\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"put\",\n  \"title\": \"Update administrator\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ curl -X PUT \\\"https://onfleet.com/api/v2/admins/8AxaiKwMd~np7I*YP2NfukBE\\\" \\\\\\n       -u \\\"cd3b3de84cc1ee040bf06512d233719c:\\\" \\\\\\n       -d '{\\\"name\\\":\\\"C Manning\\\"}'\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"8AxaiKwMd~np7I*YP2NfukBE\\\",\\n  \\\"timeCreated\\\": 1455156651000,\\n  \\\"timeLastModified\\\": 1455156652494,\\n  \\\"organization\\\": \\\"yAM*fDkztrT3gUcz9mNDgNOL\\\",\\n  \\\"email\\\": \\\"cm@onf.lt\\\",\\n  \\\"type\\\": \\\"standard\\\",\\n  \\\"name\\\": \\\"C Manning\\\",\\n  \\\"isActive\\\": false,\\n  \\\"metadata\\\": []\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"delete\",\n  \"title\": \"Delete administrator\"\n}\n[/block]\nThe ```super``` administrator cannot be deleted. ```standard``` administrators can be deleted so long as they are not a team's sole manager, as teams must always have at least one managing administrator.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ curl -X DELETE \\\"https://onfleet.com/api/v2/admins/8AxaiKwMd~np7I*YP2NfukBE\\\" \\\\\\n       -u \\\"cd3b3de84cc1ee040bf06512d233719c:\\\"\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"administrators","type":"basic","title":"Administrators"}
Administrators are users who perform actions via the dashboard. An organization has one administrator of type ```super``` and zero or more of type ```standard``` (also known as *dispatchers* in the dashboard). Administrators manage workers based on membership in the organization’s teams. [block:api-header] { "type": "post", "title": "Create administrator" } [/block] Creates a new administrator in your organization. An email will be sent for this administrator to confirm and configure their account. To establish which teams an administrator can manage, see [Teams](doc:teams). Body parameters [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-0": "name", "0-1": "string", "0-2": "The administrator’s complete name.", "1-0": "email", "1-1": "string", "1-2": "The administrator’s email address.", "2-0": "phone", "2-1": "string", "2-2": "Optional. The administrator's phone number.", "3-0": "isReadOnly", "3-1": "boolean", "3-2": "Optional. Whether this administrator can perform write operations." }, "cols": 3, "rows": 4 } [/block] [block:code] { "codes": [ { "code": "$ curl -X POST \"https://onfleet.com/api/v2/admins\" \\\n -u \"cd3b3de84cc1ee040bf06512d233719c:\" \\\n -d '{\"name\":\"Chelsea M\",\"email\":\"cm@onf.lt\"}'", "language": "shell" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"id\": \"8AxaiKwMd~np7I*YP2NfukBE\",\n \"timeCreated\": 1455156651000,\n \"timeLastModified\": 1455156651779,\n \"organization\": \"yAM*fDkztrT3gUcz9mNDgNOL\",\n \"email\": \"cm@onf.lt\",\n \"type\": \"standard\",\n \"name\": \"Chelsea M\",\n \"isActive\": false,\n \"metadata\": []\n}", "language": "json" } ] } [/block] ```isActive``` denotes whether the administrator has completed their account registration, whereas `type` indicates if this administrator is the organization's creator (`super`) or a dispatcher (`standard`). [block:api-header] { "type": "get", "title": "List administrators" } [/block] [block:code] { "codes": [ { "code": "$ curl -X GET \"https://onfleet.com/api/v2/admins\" \\\n -u \"cd3b3de84cc1ee040bf06512d233719c:\"", "language": "shell" } ] } [/block] [block:code] { "codes": [ { "code": "[\n\t// ...\n {\n \"id\": \"tbVmEoNQwN9K92bsITQNUtWY\",\n \"timeCreated\": 1455048957000,\n \"timeLastModified\": 1455048957461,\n \"organization\": \"yAM*fDkztrT3gUcz9mNDgNOL\",\n \"email\": \"st@onfleet.com\",\n \"type\": \"standard\",\n \"name\": \"Sergey Tupolev\",\n \"isActive\": false,\n \"phone\": \"+16505557710\",\n \"metadata\": []\n },\n {\n \"id\": \"jBOlwJTkN0JzfE9Rj5vEL~UT\",\n \"timeCreated\": 1455048990000,\n \"timeLastModified\": 1455048990578,\n \"organization\": \"yAM*fDkztrT3gUcz9mNDgNOL\",\n \"email\": \"is@onfleet.com\",\n \"type\": \"standard\",\n \"name\": \"Iñaki Smith\",\n \"isActive\": false,\n \"phone\": \"+14155556327\",\n \"metadata\": []\n },\n {\n \"id\": \"8AxaiKwMd~np7I*YP2NfukBE\",\n \"timeCreated\": 1455156651000,\n \"timeLastModified\": 1455156651779,\n \"organization\": \"yAM*fDkztrT3gUcz9mNDgNOL\",\n \"email\": \"cm@onf.lt\",\n \"type\": \"standard\",\n \"name\": \"Chelsea M\",\n \"isActive\": false,\n \"metadata\": []\n },\n // ...\n]", "language": "json" } ] } [/block] [block:api-header] { "type": "put", "title": "Update administrator" } [/block] [block:code] { "codes": [ { "code": "$ curl -X PUT \"https://onfleet.com/api/v2/admins/8AxaiKwMd~np7I*YP2NfukBE\" \\\n -u \"cd3b3de84cc1ee040bf06512d233719c:\" \\\n -d '{\"name\":\"C Manning\"}'", "language": "shell" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"id\": \"8AxaiKwMd~np7I*YP2NfukBE\",\n \"timeCreated\": 1455156651000,\n \"timeLastModified\": 1455156652494,\n \"organization\": \"yAM*fDkztrT3gUcz9mNDgNOL\",\n \"email\": \"cm@onf.lt\",\n \"type\": \"standard\",\n \"name\": \"C Manning\",\n \"isActive\": false,\n \"metadata\": []\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "delete", "title": "Delete administrator" } [/block] The ```super``` administrator cannot be deleted. ```standard``` administrators can be deleted so long as they are not a team's sole manager, as teams must always have at least one managing administrator. [block:code] { "codes": [ { "code": "$ curl -X DELETE \"https://onfleet.com/api/v2/admins/8AxaiKwMd~np7I*YP2NfukBE\" \\\n -u \"cd3b3de84cc1ee040bf06512d233719c:\"", "language": "shell" } ] } [/block] [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK", "language": "http" } ] } [/block]