Business Role

Entity description

A role is a named set of default permissions for a business account. For example, admin, manager, etc.

Properties

NameDescriptionTypeExample
uidThe unique identifier (UID) of the BusinessRolestringd290f1ee-6c54-4b01-90e6-d701748f0851
business_uidThe unique identifier (UID) of the business accountstringb290f1ee-6c54-4b01-90e6-d701748f0851
codeA unique readable code for the rolestringadmin
nameThe 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 businessstringAdmin
descriptionThe 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 businessstringAdmin role. Typically has access to all features in the system
permissions_listA 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 rolearray[{"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_editableA flag to indicate if the role can be edited by the business. By default, system roles are not editablebooleantrue
created_atDate the BusinessRole was createdstring2021-07-20T14:00:00.000Z
updated_atDate the BusinessRole was last updatedstring2021-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"
}