{"_id":"5a305118c8392b0032f6ae12","category":{"_id":"5a305118c8392b0032f6ae09","version":"5a305118c8392b0032f6ae07","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":"5a305118c8392b0032f6ae07","project":"5425e663ffd4411c319a65b4","__v":1,"createdAt":"2017-12-12T21:58:48.080Z","releaseDate":"2017-12-12T21:58:48.080Z","categories":["5a305118c8392b0032f6ae08","5a305118c8392b0032f6ae09"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.6.0","version":"2.6"},"githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-09-29T20:20:05.662Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":0,"body":"Organizations represent the top-most entity on Onfleet. Administrators, teams, workers and tasks all belong to an organization. Further, organizations may be linked to other organizations so that tasks can be assigned across organizational boundaries through the [Connections](http://support.onfleet.com/hc/en-us/sections/200922245-Connections) feature.\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"Get details\"\n}\n[/block]\nRetrieve your own organization's details.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ curl -X GET \\\"https://onfleet.com/api/v2/organization\\\" \\\\\\n       -u \\\"cd3b3de84cc1ee040bf06512d233719c:\\\"\",\n      \"language\": \"shell\",\n      \"name\": \"Request\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"yAM*fDkztrT3gUcz9mNDgNOL\\\",\\n  \\\"timeCreated\\\": 1454634415000,\\n  \\\"timeLastModified\\\": 1455048510514,\\n  \\\"name\\\": \\\"Onfleet Fine Eateries\\\",\\n  \\\"email\\\": \\\"fe:::at:::onfleet.com\\\",\\n  \\\"image\\\": \\\"5cc28fc91d7bc5846c6ce9c1\\\",\\n  \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n  \\\"country\\\": \\\"US\\\",\\n  \\\"delegatees\\\": [\\n    \\\"cBrUjKvQQgdRp~s1qvQNLpK*\\\"\\n  ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    },\n    {\n      \"code\": \"{\\n  \\\"code\\\": \\\"InvalidCredentials\\\",\\n  \\\"message\\\": {\\n    \\\"error\\\": 1102,\\n    \\\"message\\\": \\\"The API key provided is invalid.\\\",\\n    \\\"cause\\\": \\\"The API key provided is not valid. Please contact support@onfleet.com for further assistance.\\\",\\n    \\\"request\\\": \\\"f133921e-89e2-4303-9d53-7f02e7f6a752\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Error - Invalid API key\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\nNote that a delegatee is an organization to which an organization is able to assign tasks.\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"Get delegatee details\"\n}\n[/block]\nRetrieve the details of an organization with which you are connected.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ curl -X GET \\\"https://onfleet.com/api/v2/organizations/cBrUjKvQQgdRp~s1qvQNLpK*\\\" \\\\\\n       -u \\\"cd3b3de84cc1ee040bf06512d233719c:\\\"\",\n      \"language\": \"shell\",\n      \"name\": \"Request\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"cBrUjKvQQgdRp~s1qvQNLpK*\\\",\\n  \\\"name\\\": \\\"Onfleet Engineering\\\",\\n  \\\"email\\\": \\\"dev@onfleet.com\\\",\\n  \\\"timezone\\\": \\\"America/Los_Angeles\\\",\\n  \\\"country\\\": \\\"US\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    },\n    {\n      \"code\": \"{\\n  \\\"code\\\": \\\"MethodNotAllowed\\\",\\n  \\\"message\\\": \\\"GET is not allowed\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Error - Invalid delegatee\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\nIn cases where an invalid ```delegateeID``` is provided, an error message will be thrown.","excerpt":"","slug":"organizations","type":"basic","title":"Organizations"}
Organizations represent the top-most entity on Onfleet. Administrators, teams, workers and tasks all belong to an organization. Further, organizations may be linked to other organizations so that tasks can be assigned across organizational boundaries through the [Connections](http://support.onfleet.com/hc/en-us/sections/200922245-Connections) feature. [block:api-header] { "type": "get", "title": "Get details" } [/block] Retrieve your own organization's details. [block:code] { "codes": [ { "code": "$ curl -X GET \"https://onfleet.com/api/v2/organization\" \\\n -u \"cd3b3de84cc1ee040bf06512d233719c:\"", "language": "shell", "name": "Request" } ], "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"id\": \"yAM*fDkztrT3gUcz9mNDgNOL\",\n \"timeCreated\": 1454634415000,\n \"timeLastModified\": 1455048510514,\n \"name\": \"Onfleet Fine Eateries\",\n \"email\": \"fe@onfleet.com\",\n \"image\": \"5cc28fc91d7bc5846c6ce9c1\",\n \"timezone\": \"America/Los_Angeles\",\n \"country\": \"US\",\n \"delegatees\": [\n \"cBrUjKvQQgdRp~s1qvQNLpK*\"\n ]\n}", "language": "json", "name": "Response" }, { "code": "{\n \"code\": \"InvalidCredentials\",\n \"message\": {\n \"error\": 1102,\n \"message\": \"The API key provided is invalid.\",\n \"cause\": \"The API key provided is not valid. Please contact support@onfleet.com for further assistance.\",\n \"request\": \"f133921e-89e2-4303-9d53-7f02e7f6a752\"\n }\n}", "language": "json", "name": "Error - Invalid API key" } ], "sidebar": true } [/block] Note that a delegatee is an organization to which an organization is able to assign tasks. [block:api-header] { "type": "get", "title": "Get delegatee details" } [/block] Retrieve the details of an organization with which you are connected. [block:code] { "codes": [ { "code": "$ curl -X GET \"https://onfleet.com/api/v2/organizations/cBrUjKvQQgdRp~s1qvQNLpK*\" \\\n -u \"cd3b3de84cc1ee040bf06512d233719c:\"", "language": "shell", "name": "Request" } ], "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"id\": \"cBrUjKvQQgdRp~s1qvQNLpK*\",\n \"name\": \"Onfleet Engineering\",\n \"email\": \"dev@onfleet.com\",\n \"timezone\": \"America/Los_Angeles\",\n \"country\": \"US\"\n}", "language": "json", "name": "Response" }, { "code": "{\n \"code\": \"MethodNotAllowed\",\n \"message\": \"GET is not allowed\"\n}", "language": "json", "name": "Error - Invalid delegatee" } ], "sidebar": true } [/block] In cases where an invalid ```delegateeID``` is provided, an error message will be thrown.