---
updatedAt: 2026-07-09T11:56:56.000Z
agentTools:
  projectIndex: https://developers.gateway.smallcase.com/llms.txt
---

# DIY integration via API - MF Holdings Import

A backend-to-backend integration - plug our APIs with your UI to suit your system's design 👨‍🎨 💻📈

With smallcase Gateway, you can easily import the latest snapshot and transaction details of a user’s mutual fund holdings natively in a seamless manner

> 📘 This guide only talks about how to do API-only integration for importing MF holdings
>
> More details about the feature and how it works here - [Standard integration via SDK](https://developers.gateway.smallcase.com/docs/easy-integration-via-sdk).

# Build your flow

#### 1. Create a transactionId by calling the create transaction API 🧑‍💻

Generate a transactionId for the intent `MF_HOLDINGS_IMPORT` using [Create Transaction API](https://developers.gateway.smallcase.com/reference/mutual-fund-holdings-import-transaction).

#### 2. Collect user PAN and mobile in your UI, and trigger mobile OTP using our API 📥

Once you collect user's PAN and mobile, the next step is to verify the mobile number. Use the [Get OTP API](https://developers.gateway.smallcase.com/reference/get-otp-mf-holdings) to trigger OTP on user's mobile number. The user will receive the OTP on the provided phone number from MFCentral. You need to redirect the user to MFC url received in the response.

#### 3. User completes the journey on MFC and verify using our API 🔑

Once the user completes journey on MFC, use the [Validate Request API](https://developers.gateway.smallcase.com/reference/verify-otp-mf-holdings-1) to verify the same. For wealth you need to pass the Base64 of the QR Code downloaded / copied from the MFC page.

#### 4. Consume the holdings data from your webhook endpoint 🪝

After the successful verification of the OTP, your server will receive the holdings response on the registered webhook endpoint.

<br />

<br />

# Sequence diagram

This diagram suggests the sequence of interactions between different entities involved:

* Your Server
* Gateway API
* Gateway MF API

![](https://files.readme.io/2f2dc03-MF_Holdings_via_API.svg "MF Holdings via API.svg")

<br />

<br />

<div style={{ display: "none" }}>
  # Holdings data

  The following data about the user’s MF holdings will be shared in holdings data. It will also include additional analysis and insights into *investment*.

  ### Summary data

  This contains the user's investment consolidated by each of the mutual funds.

  * **Folio No.** under which the MF holdings are held.
  * **MF scheme** in which the user has invested.
  * **ISIN code** of the scheme
  * **KYC status** of the folio.
  * **Broker details** (name and code) through whom the MF was purchased.
  * **Date** of last transaction in the scheme
  * **No. of units** held under the scheme in that folio
  * **Market value** of investment
  * **NAV value**
  * **Date of calculation of NAV value**
  * **Type of asset** i.e. Equity, Debt, Liquid, Cash
  * If the units are in **demat format or not**

  ### Transaction data

  This contains list of the transactions done by the user.

  * **Date** on which the transaction was done & on which the transaction was posted.
  * **MF Scheme** in which the transaction was done
  * **Type of transaction**. Ex : Purchase, Redemption, Switch, SIP etc.
  * **Transaction amount**
  * **Transacted units**
  * **Charges** for the transaction. Ex : STT, other taxes, stamp duty etc.
</div>

# Response structure

Refer [here](https://developers.gateway.smallcase.com/docs/easy-integration-via-sdk#response-structure)

<br />

# Sample response

Refer [here](https://developers.gateway.smallcase.com/docs/easy-integration-via-sdk#sample-response)

<br />

# Analytics

smallcase Gateway also provides **analytics** in the webhook response as described in the above response structure for each and every import done by the user

One can also get updated analytics periodically by using the same holdings import snapshot using the [Analytics API](https://developers.gateway.smallcase.com/docs/mf-analytics-api) provided by smallcase Gateway

<br />