To Add / Edit User
Author: Salman Pathan
317 views
Purpose:
Add new user or Edit existing users in Jodo
Use Case:
When new user is created in CRM / Business application, it is pushed to Jodo using this API
User Input Parameters:
Node | M/O | Data type size | Value | Description |
---|---|---|---|---|
method | M | Text | addEditUser | Unique Command for JSON Request. (This method value will not be changed) |
apikey | M | Text | test_org | Unique key assigned to an organisation. (This API key will change per client organisation) |
action | M | Text | add | Action type (1=Add &2=Edit) |
username | M | Text | avhanuser | Username can be alphanumeric |
userimage | O | Text | c2c_clicktocall_201601051003844.jpg | Image of the user |
loginid | M | Text | user12@avhan.com | Email ID of user (need valid email ID) For Edit this field cannot be changed Non-Editable field |
usertype | M | Text | user | Select particular usertype while creating user (User types like user, Admin, Dealer, Stores etc.) |
mediadetails | M | Text(150) | [{“media”:”Voice In”},{“media”:”Email Out”}] | Media details (Media details like VoiceIn, VoiceOut, EmailIn, EmailOut, social, etc.) |
newpassword | O | Text | 12d73bbb7bdf501be4b6595271eac123 | Enter user new password (MD5 encrypted value) |
confirmpassword | O | Text | 12d73bbb7bdf501be4b6595271eac123 | Enter user confirm password (MD5 encrypted value). This field is mandatory when new password parameter is passed |
Output Parameters:
Node | Value | Description |
---|---|---|
method | addEditUser | Unique Command for JSON Response |
revisionno | 1 | Functionality revision no |
status | 3 | Refer the status parameter table |
statusdesc | success | status parameter description |
userid | 136 | New user creation id (whenever new user is created dynamic user ID will be generated) |
resdatetime | 2018-11-12 14:00:05 | Date and Time of the response. (Date format: YYYY-MM-DD hh:mm:ss) |
User type:
Type |
---|
Super Admin |
Administrator |
Supervisor |
Team Leader |
User |
Quality |
Barge-In |
MIS |
Media type:
Type |
---|
Email In |
Email Out |
SMS In |
SMS Out |
Chat |
Voice In |
Voice Out |
Social-Twitter |
Social-Facebook |
Video |
Contact ID Info :
Table: contact_types
Type |
---|
Home Number |
Mobile Number |
Personal Number |
Office Phone |
Office Fax |
Skype |
Personal Email |
Official Email |
JSON Add User Request Format
{
"method":"addEditUser",
"apikey":"test_org",
"action":"add",
"userimage":"c2c_clicktocall_201601051003844.jpg",
"username":"Batman12",
"loginid":"Batman12@avhan.com",
"usertype":"user",
"newpassword":"ecc4208a7778c1d76e7e89c5253128c5",
"confirmpassword":"ecc4208a7778c1d76e7e89c5253128c5",
"mediadetails":[{"media":"Email In"},{"media":"Email Out"}],
"customercode":100783,
"groups":["Avhan_group","Batman_group"],
"gender":"Male",
"dob":"1990-11-13",
"doj":"2014-11-13 ",
"address":"Postal colony, chembur"
"country":"India",
"state":"Maharashtra",
"city":"Chembur",
"language":[
{"languageid":"1","language":"English"},
{"languageid":"2","language":"Hindi"}
],
"contactdetails":[
{"contactid":"facebook","contacttype":"testdemo987@avhan.com"},
{"contactid":"mobile number","contacttype":"8465982541"}
],
"skilldetails":[
{"skillname":"language","skilldetail":"hindi","proficiencyvalue":"4"},
{"skillname":"product","skilldetail":"old","proficiencyvalue":"4"}
],
"reqdatetime":"2018-11-12 14:00:05"
}
JSON Add User Response format
{
"method":”addUser”,
"userid":124,
"revisionno":1,
"status":3,
"statusdesc":"success",
"resdatetime":"2018-11-12 14:00:05"
}
JSON Add User Failed Response format
{
"method":”addUser”,
"revisionno":1,
"status":5,
"statusdesc":"fail",
"resdatetime":"2018-11-12 14:00:05"
}
JSON Edit User Request Format
{
"method":"addEditUser",
"apikey":"test_org",
"action":"edit",
"userimage":"c2c_clicktocall_201601051003844.jpg",
"username":"Batman12",
"loginid":"Batman12@avhan.com",
"usertype":"user",
"newpassword":"ecc4208a7778c1d76e7e89c5253128c5",
"confirmpassword":"ecc4208a7778c1d76e7e89c5253128c5",
"mediadetails":[{"media":"Email In"},{"media":"Email Out"}],
"customercode":100783,
"groups":["Avhan_group","Batman_group"],
"gender":"Male",
"dob":"1990-11-13",
"doj":"2014-11-13 ",
"address":"Postal colony, chembur"
"country":"India",
"state":"Maharashtra",
"city":"Chembur",
"language":[
{"languageid":"1","language":"English"},
{"languageid":"2","language":"Hindi"}
],
"contactdetails":[
{"contactid":"facebook","contacttype":"testdemo987@avhan.com"},
{"contactid":"mobile number","contacttype":"8465982541"}
],
"skilldetails":[
{"skillname":"language","skilldetail":"hindi","proficiencyvalue":"4"},
{"skillname":"product","skilldetail":"old","proficiencyvalue":"4"}
],
"reqdatetime":"2018-11-12 14:00:05"
}
JSON Edit User Response format
{
"method":”addEditUser”,
"userid":136,
"revisionno":1,
"status":3,
"statusdesc":"success",
"resdatetime":"2018-11-12 14:00:05"
}
Status Code Information
Status | Status Description |
---|---|
401 | action not found |
402 | action is blank |
403 | userimage not found |
404 | username not found |
405 | username is blank |
406 | loginid not found |
407 | loginid is blank |
408 | loginid is invalid |
409 | usertype not found |
410 | usertype is blank |
Need Help ? How can we help?
How can we help?
Jodo Help Desk with an integrated Knowledge Base,