Labels Configuration
  • 19 Jan 2023
  • 3 Minutes To Read
  • Dark
    Light
  • PDF

Labels Configuration

  • Dark
    Light
  • PDF

Early Access Feature
If you would like to request early access to this feature, please get in touch with your Mambu Customer Success Manager to discuss your requirements. For more information, see Mambu Release Cycle - Feature Release Status.

Labels refer to various element types in the Mambu UI. For example, client, group, and branch are default labels in Mambu. If you use different terminology to refer to these elements, you can change the labels.

The default labels that can be changed are clients, groups, branches, centres, credit officers, interest, fees and loan. For more information, see Labels.

With Configuration as Code (CasC), you may batch configure your labels via the API using YAML. For general information on CasC, see Configuration as Code Overview.

API Operations

CasC for holidays supports two operations.

Action Endpoint Description
GET /configuration/labels.yaml Get current label configuration.
PUT /configuration/labels.yaml Write a new label configuration to Mambu.
Please Note

If you PUT a configuration to Mambu, any current configuration settings not included in the new YAML configuration will be deleted. PATCH requests are not currently supported.

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/labels.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/labels.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Content-Type: application/yaml' \
-H 'Authorization: Basic {auth}' \
--data-binary @labels.yaml

{auth} is the base-64-encoded value of username:password. For more information, see Authentication in our API reference.

“@labels.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

Please be Aware

For brevity, we have only included two languages in the below sample response. However, your YAML file will include all of the languages specified in the YAML file.

objectLabels:
- language: "BURMESE"
  labels:
  - type: "BRANCH"
    singularValue: "ဘဏ်ခွဲ"
    pluralValue: "ဘဏ်ခွဲများ"
  - type: "CENTRE"
    singularValue: "စင်တာ"
    pluralValue: "စင်တာများ"
  - type: "CLIENT"
    singularValue: "ငွေချေးသူ"
    pluralValue: "ငွေချေးသူများ"
  - type: "CREDIT_OFFICER"
    singularValue: "ချေးငွေအရာရှိ"
    pluralValue: "ချေးငွေအရာရှိများ"
  - type: "FEE"
    singularValue: "အခကြေးငွေ"
    pluralValue: "ဝန်ဆောင်ခများ"
  - type: "GROUP"
    singularValue: "အုပ်စု"
    pluralValue: "အုပ်စုများ"
  - type: "INTEREST"
    singularValue: "အတိုး"
    pluralValue: "အတိုးများ"
  - type: "LOAN"
    singularValue: "ချေးငွေ"
    pluralValue: "ချေးငွေများ"
- language: "CHINESE"
  labels:
  - type: "BRANCH"
    singularValue: "分行"
    pluralValue: "分行"
  - type: "CENTRE"
    singularValue: "中心"
    pluralValue: "中心"
  - type: "CLIENT"
    singularValue: "客户"
    pluralValue: "客户"
  - type: "CREDIT_OFFICER"
    singularValue: "信贷员"
    pluralValue: "信贷员"
  - type: "FEE"
    singularValue: "费用"
    pluralValue: "收费"
  - type: "GROUP"
    singularValue: "小组"
    pluralValue: "小组"
  - type: "INTEREST"
    singularValue: "利息"
    pluralValue: "利息"
  - type: "LOAN"
    singularValue: "贷款"
    pluralValue: "贷款"

Attributes

Name Type Description Required
language String The language of the label it is for.
labels List A list of the values for each label.
type String The element type the label is for.
singularValue String The value for the label in singular form.
pluralValue String The value for the label in plural form.

Replies

If you do not receive a 200 OK response then fix any validation errors and make another PUT request until you receive a 200 OK response.

Please Note

If you PUT a valid YAML configuration to the API and you do not receive a 200 OK status code within 60 seconds, you may receive a 504 Gateway Timeout status code. We expect all responses to be below 60 seconds.

If you encounter this issue, please contact us through Mambu Support so we can investigate it.

Validations

General validations

With all use cases, a validation of the uploaded file will be done, checking the following:

  • Syntax is correct as per YAML standards and the template for holidays.
  • Minimum requirements indicates the line with the syntax error.
  • Content is correct.

Configuration settings may be specified in any order.

Content validations

The submitted configuration is subject to the following validation:

  • All available languages must be present inside the configuration file.
  • There should be no duplicate object label pair.
  • All possible object label pairs have to be present inside the configuration file.

Field validations

Name Description
language The language must not be blank, must be part of the available language list and must be unique in the entire labels configuration.
labels The list must not be null.
type The type must not be blank, must be part of the available type list and must be unique inside the labels list.
singularValue It is required, it must not be empty.
pluralValue It is required, it must not be empty.

Was this article helpful?