Edit User

Edit User

General Information


Service

API

Method

Service

API

Method

urac

/admin/editUser

POST

 

Data Models: UsersGroups

Workflow: Edit User Flow

Input


Type: application/json

 

Name

Source

Mandatory

Type

Special Format

Description

 

Name

Source

Mandatory

Type

Special Format

Description

uId

Query

YES

String

N/A

 

username

Body

YES

String

alphanumeric with _ , - characters only

 

firstName

Body

YES

String

N/A

 

lastName

Body

YES

String

N/A

 

email

Body

YES

String

Email Address Format (JSON Schema Validation)

 

status

Body

YES

String - Enum

'active', 'inactive'

restricted to either 'active' OR 'inactive'

groups

Body

NO

Array

Array of Strings

array of group code values

profile

Body

NO

Object

N/A

 

password

body

NO

String

 

 

confirmation

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:

  • id (String)

  • code (String)

  • pin (Object)

    • code (Boolean)

    • allowed (Boolean)

groups

Body

NO

Array





Example of config:

config
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


Valid Response

Valid Response Sample
{ "result": true, "data": true }

 

Invalid Response

Error Response Sample
{ "result":false, "errors":{ "codes":[405], "details":[ { "code":405, "message":"Unable to find User. Please try again." } ] } }



Error Codes


 

Code

Description

Code

Description

405

Unable to find User. Please try again.

407

Problem validating Request. Please try again.

410

username taken, please choose another username

411

invalid user id provided

415

Unable to find group.

500

This record in locked. You cannot modify or delete it

Example (CURL)


Request

Calling Edit User API
 > 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

Edit User API response
{ "result": true, "data": true }