Update a role
Updates a user role's name, role key or status. A blank role key keeps the current one. Permissions are changed separately with Update features assigned to a role.
How to use it
- Get the role ID from List roles.
- Send the name and, if changing them, roleKey and status; a blank roleKey keeps the current key.
- The role key is upper-cased with spaces turned to underscores; users keep the role and its permissions.
BearerAuthAuthorizationBearer <JWT>id*integerID of the record.
int64application/json- body
id?|Role ID. Set by the server.
int64name*stringRole name, unique across the merchant. Required.
roleKey*stringStable key for the role, e.g. CASHIER. Upper-cased with spaces turned to underscores; built from the name when left blank.
status*stringRole status text. Defaults to active.
modifiedTime*stringWhen the role was last changed. Set by the server.
date-timeOK
*/*- response
id?|Role ID. Set by the server.
int64name*stringRole name, unique across the merchant. Required.
roleKey*stringStable key for the role, e.g. CASHIER. Upper-cased with spaces turned to underscores; built from the name when left blank.
status*stringRole status text. Defaults to active.
modifiedTime*stringWhen the role was last changed. Set by the server.
date-timecurl -X PUT 'https://beta.iotoms.com/api/v1/management/roles/0' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "roleKey": "string", "status": "string", "modifiedTime": "2019-08-24T14:15:22Z"}'{ "id": 0, "name": "string", "roleKey": "string", "status": "string", "modifiedTime": "2019-08-24T14:15:22Z"}