# Adopt New MDMS - Steps

## Overview

This guide details the steps to promote a master to MDMS v2. It includes defining a schema with a unique identifier, creating the schema via an API endpoint, and verifying the created schema. Once verified, data can be added and searched using corresponding API endpoints.

## Steps

1. Define a schema for the master that you want to promote to MDMS v2.
2. Ensure that the schema has a unique field (a unique field can also be composite) which enforces the data being added against that schema to be unique.
3. If the data does not have the scope for having unique identifiers. For example - complex masters like - <https://github.com/egovernments/health-campaign-mdms/blob/QA/data/default/health/project-task-configuration.json> - consider adding a redundant field which can serve as the unique identifier.
4. Hit the following API endpoint to create schema in the system - */mdms-v2/schema/v1/\_create*
5. Now that the schema has been created, verify the created schema by searching for it using the following API endpoint - */mdms-v2/schema/v1/\_search*
6. Once the schema is in place, data can be created against the created schema using the following API endpoint - */mdms-v2/v2/\_create/{schemaCode}*
7. Once the data is created, data can be verified by searching it by using the following API endpoint - */mdms-v2/v2/\_search*


---

# 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://workbench.digit.org/setup/configurations/services/mdms-v2-master-data-management-service/adopt-new-mdms-steps.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.
