Edit User
URL : v3/user/update/api/{userId}
HTTP Method : POST
Response Format: JSON
Parameters:
Parameter | Data Type | Optional/Required | Description |
first_name | String | Required | It’s the first name of the user |
last_name | String | Required | It’s the last name of the user |
user_name | String | Configurable | It’s the user name of the user and it configurable from backend form settings |
phone_number | String | Configurable | It’s the work phone no of the user and it configurable from backend form settings |
String | Configurable | It’s the email id of the user and it’s configurable from backend form settings | |
mobile | String | Configurable | It’s the mobile phone no of the user and it’s configurable from backend form settings |
custom_id | String/Array | Optional | “custom_(id of the custom field)” |
organization[0] | array | Optional | “Id of the Organisation” |
organisation_department[0] | array | Optional | “Id of the Organisation Department” |
related[0]{‘org_id’:org_id,’org_dept’:org_dept} | array of objects | Optional | “Id of the Organisation and Organization Department” |
Note – if “organisation_department” is passed while making request then it is mandatory to pass “related” data. No of element’s inside “organisation_department” array should be equal with no of element’s inside “related” array. Now onwords user can have multiple organization and organization department so in order to keep track, which departments is related to which organization in “related” array, array of elements passed as combination of organization id and organization department id.
Response
- Response Format: JSON
- Returns JSON which contains below response
Sample JSON Success Response :
{ "success": true, "message": "Updated Successfully" }
Possible Errors/Failures:
{ "success":false, "message":{ "field":"this field is required" } }
{ "success": false, "message": { "email": "This email/username has already been taken", "user_name": "This email/username has already been taken", "mobile_phone": "The mobile phone has already been taken." } }