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 existThe 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 correctassetType.
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)
| Field | Required | Notes |
|---|---|---|
userId | yes | Unity user ID from Create User. |
assetType | yes | MUTUALFUND. |
holdings | yes (for MF) | Non-empty array of MF holdings. Each entry uses the same shape as the holdings[] array in Create unity user. |
holdingsLastFetchedAt | conditional | Required when holdings is non-empty (ISO 8601 / RFC 3339). |
name, age, isNri | no | Optional 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)
| Field | Required | Notes |
|---|---|---|
userId | yes | Unity user ID from Create User. |
assetType | yes | STOCKS. |
stockHoldings | yes (for stocks) | Non-empty array of stock holdings. For LAS, only stockHoldings are considered. |
name, age, isNri | no | Optional 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 status | code | message / scenario |
|---|---|---|
| 400 | 4000 | invalid_request — invalid JSON or validation failure (e.g. MF: empty holdings; Stocks: empty stockHoldings; holdings non-empty but holdingsLastFetchedAt missing). |
| 400 | 4000 | invalid_request:userId — invalid or unknown userId. |
| 400 | 4013 | no_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. |
| 500 | 2000 | internal_server_error. |