# MDMS Overview

## Overview

MDMS stands for Master Data Management Service. MDMS is One of the applications in the eGov DIGIT core group of services. This service aims to reduce the time spent by developers on writing codes to store and fetch master data (primary data needed for module functionality) which doesn’t have any business logic associated with them.

## Pre-requisites

Before you proceed with the configuration, make sure the following pre-requisites are met -

* Prior Knowledge of Java/J2EE.
* Prior Knowledge of Spring Boot.
* Prior Knowledge of REST APIs and related concepts like path parameters, headers, JSON, etc.
* Prior knowledge of Git.
* Advanced knowledge of how to operate JSON data would be an added advantage to understanding the service.

## Key Functionalities

* The MDMS service reads the data from a set of JSON files from a pre-specified location.
* It can either be an online location (readable JSON files from online) or offline (JSON files stored in local memory).
* The JSON files will be in a prescribed format and store the data on a map. The **tenantID** of the file serves as a key and a map of master data details as values.
* Once the data is stored in the map the same can be retrieved by making an API request to the MDMS service. Filters can be applied in the request to retrieve data based on the existing fields of JSON.

## Deployment Details

* For deploying the changes in MDMS data, the service needs to be restarted.
* The changes in MDMS data could be adding new data, updating existing data, or deletion.

## Configuration Details

The config JSON files to be written should follow the listed rules

* The config files should have JSON extension
* The file should mention the tenantId, module name, and the master name first before defining the data

```
{
  "tenantId": "uk",
  "moduleName": "BillingService",
  "{$MasterName}":[ ]
}
```

<table><thead><tr><th width="177">Title</th><th>Description</th></tr></thead><tbody><tr><td>tenantId</td><td>Serves as a Key</td></tr><tr><td>moduleName</td><td>Name of the module to which the master data belongs</td></tr><tr><td>MasterName</td><td>The Master Name will be substituted by the actual name of the master data. The array succeeding it will contain the actual data.</td></tr></tbody></table>

Example Config JSON for “Billing Service”

```
{
  "tenantId": "pb",
  "moduleName": "BillingService",
 "BusinessService": 
 [
    {
      "businessService": "PropertyTax",
      "code": "PT",
      "collectionModesNotAllowed": [ "DD" ],
      "partPaymentAllowed": true,
      "isAdvanceAllowed": true,
      "isVoucherCreationEnabled": true
    }
]
}
```

## Reference Docs

### Doc Links

| Link                                                                                                                                          |
| --------------------------------------------------------------------------------------------------------------------------------------------- |
| [MDMS-Service](https://docs.digit.org/core/platform/core-services/mdms-v2-master-data-management-service/mdms-master-data-management-service) |
| [MDMS-Rewritten](https://docs.digit.org/core/platform/core-services/mdms-v2-master-data-management-service)                                   |

### API List

| Description            | Link                                                                                                |
| ---------------------- | --------------------------------------------------------------------------------------------------- |
| API Contract Reference | <https://raw.githubusercontent.com/egovernments/egov-services/master/docs/mdms/contract/v1-0-0.yml> |

[![Creative Commons License](https://i.creativecommons.org/l/by/4.0/80x15.png)](http://creativecommons.org/licenses/by/4.0/)All content on this page by [eGov Foundation ](https://egov.org.in/)is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digit.org/local-governance/deploy/configure-digit/setting-up-master-data/mdms-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
