Entity description
A role is a named set of default permissions for a business account. For example, admin, manager, etc.
Properties
Name | Description | Type | Example |
---|---|---|---|
uid | The unique identifier (UID) of the BusinessRole | string | d290f1ee-6c54-4b01-90e6-d701748f0851 |
business_uid | The unique identifier (UID) of the business account | string | b290f1ee-6c54-4b01-90e6-d701748f0851 |
code | A unique readable code for the role | string | admin |
name | The role name as it's presented in the UI. By default, it will be assigned from the original permission, but can be overridden for a specific business | string | Admin |
description | The role description as it’s presented in the UI. By default, it will be assigned from the original permission, but can be overridden for a specific business | string | Admin role. Typically has access to all features in the system |
permissions_list | A list of permissions that are assigned to the BusinessRole. Each permission includes a unique identifier (UID) and a flag indicating if the permission is by default assigned to the role | array | [{"uid": "payments.invoices.export", "allow": true}, {"uid": "payments.invoices.import", "allow": true}, {"uid": "payments.invoices.view", "allow": true}, {"uid": "payments.invoices.delete", "allow": true}, {"uid": "payments.invoices.create", "allow": false}] |
is_editable | A flag to indicate if the role can be edited by the business. By default, system roles are not editable | boolean | true |
created_at | Date the BusinessRole was created | string | 2021-07-20T14:00:00.000Z |
updated_at | Date the BusinessRole was last updated | string | 2021-07-20T14:00:00.000Z |
Example
{
"uid": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"business_uid": "b290f1ee-6c54-4b01-90e6-d701748f0851",
"code": "admin",
"name": "Admin",
"description": "Admin role. Typically has access to all features in the system",
"is_editable": true,
"permissions_list": [
{
"uid": "payments.invoices.export",
"allow": true
},
{
"uid": "payments.invoices.import",
"allow": true
},
{
"uid": "payments.invoices.view",
"allow": true
},
{
"uid": "payments.invoices.delete",
"allow": true
},
{
"uid": "payments.invoices.create",
"allow": true
}
],
"created_at": "2021-07-20T14:00:00.000Z",
"updated_at": "2021-07-20T14:00:00.000Z"
}