Update DLA Holdings

When holdings data changes (e.g. you've fetched the user's latest MF or stock positions), call this API so eligibility and credit limit stay in sync.

When holdings data changes (e.g. you've fetched the user's latest MF or stock positions), call this API so eligibility and credit limit stay in sync. It's recommended to call it right before starting or resuming a loan journey for a user.

You send the Unity user ID and the asset type. Unity resolves the active pre-submitted loan for that user and asset type and applies the update internally — there's no separate Flow API to call.

📘

Precondition: an active pre-submitted loan must exist

The user must already have been created (via Create unity user) and have a pre-submitted loan application for the given asset type. If there's no active pre-submitted loan for that user and asset type, the call returns no_active_lid_found (4013) — create the user and start the flow first, or check you're sending the correct assetType.

Authentication is the same as every other Unity backend API — see the Unity API authentication for the x-gateway-secret / x-gateway-authtoken headers.

LAMF — Update DLA (mutual funds)

FieldRequiredNotes
userIdyesUnity user ID from Create User.
assetTypeyesMUTUALFUND.
holdingsyes (for MF)Non-empty array of MF holdings. Each entry uses the same shape as the holdings[] array in Create unity user.
holdingsLastFetchedAtconditionalRequired when holdings is non-empty (ISO 8601 / RFC 3339).
name, age, isNrinoOptional user-attribute updates.

stockHoldings can be omitted for standard LAMF.

Example request (LAMF):

{
  "userId": "698ae2148e153234ea982c02",
  "assetType": "MUTUALFUND",
  "holdings": [ // pass all values as received from the user's CAS via RTAs/MFC
    {
      "repository": "CAMS",
      "amcCode": "PP",
      "folio": "16615967",
      "schemeCode": "001ZG",
      "schemeName": "Parag Parikh Flexi Cap Fund",
      "isin": "INF879O01027",
      "schemeType": "EQUITY",
      "units": 131.57,
      "lockInUnits": 13.157,
      "isDemat": false,
      "dpId": "1208160062733129", // mandatory if isDemat is true
      "modeOfHolding": "", // optional - defaults to single holding if not passed
      "lienEligibleUnits": 120.33, // optional - if not passed, eligible units = units - lockInUnits. If passed, these are considered the eligible units for the loan
      "contact": {
        "phone": { "number": "9876543210", "countryCode": "+91" }, // required
        "email": "[email protected]"
      }
    }
  ],
  "holdingsLastFetchedAt": "2023-05-07T00:00:00Z"
}

LAS — Update DLA (stocks)

FieldRequiredNotes
userIdyesUnity user ID from Create User.
assetTypeyesSTOCKS.
stockHoldingsyes (for stocks)Non-empty array of stock holdings. For LAS, only stockHoldings are considered.
name, age, isNrinoOptional user-attribute updates.

holdings can be omitted for standard LAS.

Example request (LAS):

{
  "userId": "698ae2148e153234ea982c02",
  "assetType": "STOCKS",
  "stockHoldings": [
    {
      "name": "SBI Nifty 50 ETF",
      "isin": "INF200KA1FS1",
      "type": "EQUITY",
      "units": 100,
      "isDemat": true,
      "dpId": "1208160075231086"
    },
    {
      "name": "Motherson Sumi Wiring India Ltd.",
      "isin": "INE0FS801015",
      "type": "EQUITY",
      "units": 200,
      "isDemat": true,
      "dpId": "1208160075231086"
    }
  ],
  "name": "Vishal Pal",
  "age": 35,
  "isNri": false
}

Success response (HTTP 200)

{
  "data": null,
  "message": "Holdings updated successfully",
  "code": 0
}

Error responses

HTTP statuscodemessage / scenario
4004000invalid_request — invalid JSON or validation failure (e.g. MF: empty holdings; Stocks: empty stockHoldings; holdings non-empty but holdingsLastFetchedAt missing).
4004000invalid_request:userId — invalid or unknown userId.
4004013no_active_lid_found — no pre-submitted loan for this user and asset type. Create the user and start the flow first, or use the correct asset type.
5002000internal_server_error.
Path Params
string
required
Defaults to gatewaydemo

Your gateway partner name.

Body Params
string
required
Defaults to Unity user ID from Create User.
string
enum
required
Defaults to MUTUALFUND

MUTUALFUND for LAMF, STOCKS for LAS. Allowed: MUTUALFUND, STOCKS.

Allowed:
holdings
array

Required for MUTUALFUND. Non-empty array of MF holdings. When non-empty, holdingsLastFetchedAt is required.

holdings
date

Required when holdings is non-empty. ISO 8601 / RFC 3339.

stockHoldings
array

Required for STOCKS. Non-empty array of stock holdings.

stockHoldings
string

Optional user attribute update.

number

Optional user attribute update.

boolean

Optional user attribute update.

Headers
string
required
Defaults to gatewayDemo_secret

apiSecret shared for authentication.

string
required
Defaults to eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJndWVzdCI6dHJ1ZSwiaWF0IjoxNjU0MzIxMDAwfQ.qiZ_w1yFYXhkdLMlqI28XJOXitfZwr64e2oL-lMEHZU

JWT created with payload {"iss":"<your_gateway_name>"}, signed with the shared secret.

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json