...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
General Information
...
Service | API | Method | Data Models | Workflow |
---|---|---|---|---|
urac | /admin/editUseruser | PUT |
...
...
Description
This API updates a user record that matches the id sent in the query.
Input
...
Type: application/json
Name | Source | Mandatory | Type | Special Format | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
uIdid | QueryBody | YES | String | N/A | User ID | ||||||||||||||||
username | Body | YESNO | String | alphanumeric with _ , - characters only | Username | ||||||||||||||||
firstName | Body | YESNO | String | N/A | First Name | ||||||||||||||||
lastName | Body | YESNO | String | N/A | Last Name | ||||||||||||||||
Body | YESNO | String | Email Address Format (JSON Schema Validation) | ||||||||||||||||||
status | Body | YESNO | String - Enum | 'active', 'inactive' , 'pendingNew' | restricted to either 'active' OR , 'inactive', or 'pendingNew' | ||||||||||||||||
groups | Body | NO | Array | Array of Strings | array of group code values | ||||||||||||||||
profile | Body | NO | Object | N/A | passwordProfile | body | NO | String | confirmation | body||||||||||||
ln | Body | NO | String | Same Password Value | pin | body | NO | code | NO | Boolean | set to True to change pin to a random generated code | allowed | NO | Boolean | config | Body | NO | Object | N/A | ||
Name | Source | Mandatory | Type | Special Format | Description | ||||||||||||||||
keys | Body | NO | Object | N/A | Additional Properties: acl (Object) | packages | Body | NO | Object | N/A | allowedTenants | Body | NO | Array | array of allowedTenant objects | ||||||
Name | Source | Mandatory | Type | Special Format | Description | tenant | Body | NO | Object | Properties:
| groups | Body | NO | Array |
Code Block | ||||
---|---|---|---|---|
| ||||
config: {
packages: {},
keys: {},
allowedTenants: [
{"tenant": {
id: "THYME_tID",
code: "THYME_CODE",
pin: {"code": "1235", "allowed": true}
},
groups: ["waiter"]
},
{tenant: {
id: "ELVIRA_tID",
code: "ELVIRA_CODE"
},
groups: ["manager]
}
]
}, |
Output
language | ||||||
phone | Body | NO | String | Phone number |
Output
...
Response
SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response
Valid Response
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "result": true, "data": true } |
Invalid Response
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "result":false, "errors":{ "codes":[405602], "details":[ { "code":405602, "message":"UnableModel toerror: find User. Please try again.+ %model_error%" } ] } } |
Code | Description |
---|
Example (CURL)
Request
Code Block | ||||
---|---|---|---|---|
| ||||
> CURL -X POST http://127.0.0.1:4000/urac/admin/editUser?uId=123 -d 'username=john&firstName=John&lastName=Doe&email=johndoe@domain.com&status=active' |
Response
...
language | js |
---|---|
title | Edit User API response |
...
400 | Business logic required data are missing |
602 | Model error: + %model_error% |