{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/users.json","auth":"required","examples":{"codes":[]},"method":"post","params":[{"name":"userTypeName","type":"string","default":"","desc":"Type of user. For this API, userTypeName=user","required":true,"in":"body","ref":"","_id":"57f1f4de3cbc492200262b5b"},{"name":"firstName","type":"string","default":"","desc":"First name of the user","required":true,"in":"body","ref":"","_id":"57ed07045760ab190017b3fb"},{"name":"lastName","type":"string","default":"","desc":"Last name of the user","required":true,"in":"body","ref":"","_id":"57ed07045760ab190017b3fa"},{"name":"roleId","type":"string","default":"","desc":"Unique identifier representing the role of the user","required":true,"in":"body","ref":"","_id":"57ed07045760ab190017b3f9"},{"name":"primaryContactNumber","type":"string","default":"","desc":"Primary phone number of the user, preceded by \"+\" and the country code","required":false,"in":"body","ref":"","_id":"57ed07045760ab190017b3f8"},{"name":"password","type":"string","default":"","desc":"Account password of the user","required":true,"in":"body","ref":"","_id":"57ed07045760ab190017b3f7"},{"name":"email","type":"string","default":"","desc":"Email address of the user. This address is the username for the user's account","required":true,"in":"body","ref":"","_id":"57ed07045760ab190017b3f6"},{"name":"timeZone","type":"string","default":"","desc":"User’s timezone","required":true,"in":"body","ref":"","_id":"57ed07045760ab190017b3f5"},{"name":"groupIds","type":"string","default":"","desc":"IDs of the groups associated with the user","required":true,"in":"body","ref":"","_id":"57ed07045760ab190017b3f4"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{  \n   \"restResponseVO\":{  \n      \"code\":200,\n      \"message\":\"Success\",\n      \"reason\":null,\n      \"generatedAt\":\"Sep-26-2016, 08:53 AM UTC\",\n      \"currentPage\":null,\n      \"totalPages\":null,\n      \"result\":\"c241203a-83c6-11e6-9111-5525c5d5301d\"\n   }\n}\n\n"}]},"settings":"559288b86bf22f170075b794"},"next":{"description":"","pages":[]},"title":"Create","type":"endpoint","slug":"create-1","excerpt":"Use this API to create a user. Users are people in your organization who use Azuga for tracking vehicles and reporting on performance and productivity. Users include drivers, as well, who are given limited access to the application. \n\nAlong with creating a user, this API also generates a unique user ID for this user. This ID will serve as a reference while making calls for updating and deleting information related to this user.","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Sample Request\",\n  \"body\": \"https://api.azuga.com/azuga-ws/v1/users.json\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n  \\\"userTypeName\\\":\\\"user\\\",\\n  \\\"firstName\\\":\\\"Gereth\\\",\\n   \\\"lastName\\\":\\\"Kent\\\",\\n   \\\"roleId\\\":\\\"c33155b8-8672-11e2-b42f-b5c21df73708\\\",\\n   \\\"primaryContactNumber\\\":\\\"+14084806655\\\",\\n   \\\"password\\\":\\\"MyP:::at:::ssW0rd\\\",\\n   \\\"email\\\":\\\"[email protected]\\\",\\n   \\\"timeZone\\\":\\\"US/Alaska\\\",\\n   \\\"groupIds\\\":[  \\n      \\\"65e376af-4fa9-11e3-89ec-5f7577f0d464\\\",\\n      \\\"52c1827c-a880-11e2-b8eb-4b0b74b2ae0d\\\",\\n      \\\"77bc3115-b84a-11e4-9a7a-398fa44c646c\\\"\\n   ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Sample Payload\"\n    }\n  ]\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    \"2-0\": \"reason\",\n    \"3-0\": \"generatedAt\",\n    \"4-0\": \"currentPage\",\n    \"5-0\": \"totalPages\",\n    \"6-0\": \"result\",\n    \"0-1\": \"API status code\",\n    \"1-1\": \"API Message (Success/Failure)\",\n    \"2-1\": \"Reason for failure\",\n    \"3-1\": \"API generation timestamp in UTC\",\n    \"4-1\": \"Current page of the paginated result\",\n    \"5-1\": \"Total number of pages of the paginated result\",\n    \"6-1\": \"Unique identifier representing the user\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]","updates":[],"order":0,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"57ed05d6c404eb0e004ab599","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"},"githubsync":"","parentDoc":null,"project":"55926c913735880d005f7c65","user":"5656a3dd5656350d001d83a0","__v":3,"createdAt":"2016-09-29T12:15:18.706Z","category":{"sync":{"isSync":false,"url":""},"pages":["5630a1f83998420d00a50a09"],"title":"USER","slug":"users","order":4,"from_sync":false,"reference":true,"_id":"5594342f0c33bd0d000595a3","__v":1,"createdAt":"2015-07-01T18:40:47.006Z","project":"55926c913735880d005f7c65","version":"559286c6c39c4b2d00127a71"}}

postCreate

Use this API to create a user. Users are people in your organization who use Azuga for tracking vehicles and reporting on performance and productivity. Users include drivers, as well, who are given limited access to the application. Along with creating a user, this API also generates a unique user ID for this user. This ID will serve as a reference while making calls for updating and deleting information related to this user.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

userTypeName:
required
string
Type of user. For this API, userTypeName=user
firstName:
required
string
First name of the user
lastName:
required
string
Last name of the user
roleId:
required
string
Unique identifier representing the role of the user
primaryContactNumber:
string
Primary phone number of the user, preceded by "+" and the country code
password:
required
string
Account password of the user
email:
required
string
Email address of the user. This address is the username for the user's account
timeZone:
required
string
User’s timezone
groupIds:
required
string
IDs of the groups associated with the user

Result Format


Documentation

[block:callout] { "type": "info", "title": "Sample Request", "body": "https://api.azuga.com/azuga-ws/v1/users.json" } [/block] [block:code] { "codes": [ { "code": "{ \n \"userTypeName\":\"user\",\n \"firstName\":\"Gereth\",\n \"lastName\":\"Kent\",\n \"roleId\":\"c33155b8-8672-11e2-b42f-b5c21df73708\",\n \"primaryContactNumber\":\"+14084806655\",\n \"password\":\"[email protected]\",\n \"email\":\"[email protected]\",\n \"timeZone\":\"US/Alaska\",\n \"groupIds\":[ \n \"65e376af-4fa9-11e3-89ec-5f7577f0d464\",\n \"52c1827c-a880-11e2-b8eb-4b0b74b2ae0d\",\n \"77bc3115-b84a-11e4-9a7a-398fa44c646c\"\n ]\n}", "language": "json", "name": "Sample Payload" } ] } [/block] ##API Response explanation [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "0-0": "code", "1-0": "message", "2-0": "reason", "3-0": "generatedAt", "4-0": "currentPage", "5-0": "totalPages", "6-0": "result", "0-1": "API status code", "1-1": "API Message (Success/Failure)", "2-1": "Reason for failure", "3-1": "API generation timestamp in UTC", "4-1": "Current page of the paginated result", "5-1": "Total number of pages of the paginated result", "6-1": "Unique identifier representing the user" }, "cols": 2, "rows": 7 } [/block]

User Information

Try It Out

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