Skip to content

Enrich

Enrich a list of parsed holdings with 1Y/3Y/5Y fund returns from MFAPI, benchmark returns, AMC exposure, and asset allocation.

The endpoint takes the holdings themselves, not a snapshot_id. From a Parse response, map each mutual_funds[] entry to an instrument and rename value to currentValue. To enrich a stored snapshot by ID, run a skill with include_enrichment: true (REST or the MCP run_skill tool). The MCP enrich tool also takes a holdings array.

POST https://api.portfoliointel.co.in/api/enrich

None. This is the endpoint the Portfolio Intel web and mobile apps call after parsing a statement on the device. Requests are rate-limited per client IP (30 per minute by default).

FieldTypeRequiredNotes
instrumentsobject[]yesHoldings to enrich. At most 500.
statementDatestringyesStatement end date, YYYY-MM-DD. Returns and benchmarks are measured to this date.
statementStartDatestringnoStatement start date, YYYY-MM-DD. Lets returns value units held before the period.
statementTypestringnoSUMMARY or DETAILED.
folioCountnumberyesNumber of folios on the statement. Echoed in the response.
totalValuenumberyesPortfolio value. Used as the denominator for AMC exposure percentages.
investorNamestringnoEchoed in the response. Defaults to Investor.
assetClassCompositionobject[]noNSDL e-CAS composition table. When present, it replaces the category-based asset allocation.
valueTrend, dematAccountsobject[]noNSDL e-CAS metadata, passed through unchanged.

Each entry in instruments:

FieldTypeRequiredNotes
namestringyesScheme name as printed on the statement.
foliostringyesRemoved from the response.
isinstringnoImproves scheme matching. Without it the name is matched against MFAPI.
unitsnumberyes
navnumberyes
currentValuenumberyes
amc, categorystringnoA category from the statement is kept; otherwise it is inferred.
assetClass, productType, …—noNSDL multi-asset fields. Non-mutual-fund holdings are returned without returns or benchmarks.
Terminal window
curl -X POST https://api.portfoliointel.co.in/api/enrich \
-H "Content-Type: application/json" \
-d '{
"instruments": [{
"name": "Axis Bluechip Fund - Direct Growth",
"folio": "12345678",
"isin": "INF846K01EW2",
"units": 500.123,
"nav": 52.34,
"currentValue": 26174.44
}],
"statementDate": "2024-12-31",
"folioCount": 1,
"totalValue": 26174.44
}'

The body is the enriched portfolio. It is not wrapped in { success, data }.

{
"investorName": "Investor",
"statementDate": "2024-12-31",
"folioCount": 1,
"totalValue": 26174.44,
"instruments": [
{
"name": "Axis Bluechip Fund - Direct Growth",
"isin": "INF846K01EW2",
"units": 500.123,
"nav": 52.34,
"currentValue": 26174.44,
"amc": "Axis Mutual Fund",
"category": "Equity Scheme - Large Cap Fund",
"returns": { "oneYear": 12.4, "threeYear": 10.1, "fiveYear": 14.8 },
"oneYearReturn": 12.4,
"benchmarkName": "Nifty 100 TRI",
"benchmarkReturns": { "oneYear": 11.2, "threeYear": 11.9, "fiveYear": 15.3 },
"benchmarkReturn": 11.2
}
],
"amcExposure": [{ "name": "Axis Mutual Fund", "value": 26174.44, "percentage": 100 }],
"assetAllocation": [{ "name": "Equity", "value": 26174.44 }],
"metadata": { "source": "Client-Side Parser", "extractionMethod": "Deterministic", "timestamp": "2025-01-02T10:00:00.000Z" }
}
  • Returns are percentages. A field is absent when MFAPI has no data for that period or the holding is not a mutual fund.
  • Fields prefixed with _ (for example _categorySource) are diagnostics and may change without notice.
StatusCodeCause
400INVALID_INPUTinstruments is missing or not an array.
413TOO_MANY_INSTRUMENTSMore than 500 instruments in one request. Split the list across requests.
429RATE_LIMITEDToo many requests from this IP.
500INTERNAL_ERROREnrichment failed.

Error bodies have the shape { "success": false, "error": { "code": "...", "message": "..." } }.