Client and Group Roles Configuration
A client models any customer that is just an individual. A group models any customer that is not an individual.
You can specify particular client roles and group roles, which are also referred to as client types and group types. For more information, see Clients and Groups Overview.
With Configuration as Code (CasC), you may batch configure your client and group role configuration via the API using YAML. For general information on CasC, see Configuration as Code Overview.
Although the path for this API is /configuration/clientroles.yaml, it is used for both client roles and group roles.
Do not confuse group roles in this article with the group roles names that can be assigned to members of a group, found in the Mambu UI under Administration > General Setup > Group Roles.
API Operations
CasC for client roles and group roles supports two operations.
| Action | Endpoint | Description |
|---|---|---|
GET | /configuration/clientroles.yaml | Get current client roles and group roles configuration. |
PUT | /configuration/clientroles.yaml | Write a new client roles and group roles configuration to Mambu. |
Parameters
To retrieve only client roles or only group roles when making a GET request, you may provide the type parameter with the value CLIENT or GROUP.
The type parameter is not supported for PUT requests. The API determines whether updates affect clients or groups automatically, based on the contents of the rolesConfiguration in the configuration.
Note that this has implications for how roles are deleted - for more information, see Deleting client or group roles below.
Managing configuration files
You may manage YAML configuration files in two ways: either include client roles and group roles in a single file, or store them separately in two files, one for group roles and one for client roles.
Requests
For general information on CasC requests such as authentication and required headers, see Configuration as Code Overview.
The following section shows sample requests using curl and basic authentication. For all examples, replace TENANT_NAME with your actual tenant name.
GET configuration
curl -X GET 'https://TENANT_NAME.mambu.com/api/configuration/clientroles.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Authorization: Basic {auth}'
{auth} is the base-64-encoded value of username:password. For more information, see Authentication in our API reference.
PUT configuration
curl -X PUT 'https://TENANT_NAME.mambu.com/api/configuration/clientroles.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Content-Type: application/yaml' \
-H 'Authorization: Basic {auth}' \
--data-binary @clientroles.yaml
{auth} is the base-64-encoded value of username:password. For more information, see Authentication in our API reference.
@clientroles.yaml represents the absolute path of the file on your device.
Use “--data-raw” if you want to specify the YAML body inline.
Configuration body example
rolesConfiguration:
- type: "CLIENT"
defaultRole:
id: "default_role_id"
name: "default_role_name"
canOpenAccounts: true
canGuarantee: true
requireIdentificationDocuments: false
useDefaultAddress: true
roles:
- id: "id_1"
name: "Name_1"
description: "Desc 1"
idPattern: "@"
canOpenAccounts: false
canGuarantee: false
requireIdentificationDocuments: false
useDefaultAddress: false
- type: "GROUP"
defaultRole:
id: "default_group_role_id"
name: "default_group_role_name"
canOpenAccounts: true
canGuarantee: true
useDefaultAddress: true
roles:
- id: "id_2"
name: "Name_2"
description: "Desc 2"
idPattern: "##"
canOpenAccounts: false
canGuarantee: true
useDefaultAddress: true
- id: "id_3"
name: "Name_3"
description: "Desc 3"
idPattern: "@#"
canOpenAccounts: true
canGuarantee: true
useDefaultAddress: false
rolesConfiguration attributes
| Name | Type | Description | Required |
|---|---|---|---|
rolesConfiguration | List | List of all roles for available account holder types. | ✔ |
type | String | Defines the role type, it can either be CLIENT or GROUP. | ✔ |
defaultRole | List | The default role for the given type. | ✔ |
roles | List | A list of roles for the given type, except the default role. |