Labels Configuration
  • 03 May 2023
  • 3 Minutes To Read
  • Dark
    Light
  • PDF

Labels Configuration

  • Dark
    Light
  • PDF

Article Summary

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.

ActionEndpointDescription
GET/configuration/labels.yamlGet current label configuration.
PUT/configuration/labels.yamlWrite 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

NameTypeDescriptionRequired
languageStringThe language of the label it is for.
labelsListA list of the values for each label.
typeStringThe element type the label is for.
singularValueStringThe value for the label in singular form.
pluralValueStringThe value for the label in plural form.

Replies

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

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

NameDescription
languageThe language must not be blank, must be part of the available language list and must be unique in the entire labels configuration.
labelsThe list must not be null.
typeThe type must not be blank, must be part of the available type list and must be unique inside the labels list.
singularValueIt is required, it must not be empty.
pluralValueIt is required, it must not be empty.

Was this article helpful?