Assign a role to a user
Assigns a new role to the user. Can be a tenant-wide role or scoped to a specific store.
Required permissions: TENANT_USER_ROLE_ASSIGNMENT
post/tenants/{tenantUid}/users/{tenantUserUid}/roles
Authorizations
AuthorizationstringRequired
Access token recevied after user login with a deviceToken
Path parameters
tenantUidstringRequiredPattern:
Reference to a tenant.
^[A-Za-z0-9-_]+tenantUserUidstringRequiredPattern:
Reference to a TenantUser.
^[A-Za-z0-9-_]+Body
A tenantRole can be assigned at three levels:
- Only set a tenantRoleUid in the request: The role will be assigned at tenant level
- Set organizationUid and tenantRoleUid: The role will be assigned at organization level
- Set storeUid and tenantRoleUid: The role will be assigned at store level
An error occurs if both storeUid and organizationUid is set in the request.
The levels are ranked this way, from top to bottom: tenant, organization, store
A permission set at higher level overrides lower level assignments.
tenantRoleUidstringRequiredPattern:
^[A-Za-z0-9-_]+storeUidstringOptionalPattern:
^[A-Za-z0-9-_]+organizationUidstringOptionalPattern:
^[A-Za-z0-9-_]+Responses
201
Tenant user role assignment response
application/json
assignedAtstring · date-timeRequired
When the role was assigned
assignedBystringRequiredPattern:
^[A-Za-z0-9-_]*createdAtstring · date-timeRequired
lastModifiedAtstring · date-timeRequired
tenantUserRoleAssignmentUidstringRequiredPattern:
^[A-Za-z0-9-_]+isSystemRolebooleanRequired
post/tenants/{tenantUid}/users/{tenantUserUid}/roles
POST /v2/tenants/{tenantUid}/users/{tenantUserUid}/roles HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 67
{
"tenantRoleUid": "text",
"storeUid": "text",
"organizationUid": "text"
}201
Tenant user role assignment response
{
"tenantRole": {
"name": "text",
"tenantRoleUid": "text",
"isSystemRole": true
},
"organization": {
"name": "text",
"organizationUid": "text"
},
"store": {
"name": "text",
"storeUid": "text",
"organizationUid": "text",
"organizationName": "text"
},
"assignedAt": "2026-01-01T00:00:00.000Z",
"assignedBy": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"lastModifiedAt": "2026-01-01T00:00:00.000Z",
"tenantUserRoleAssignmentUid": "text",
"isSystemRole": true
}Last updated
Was this helpful?

