Parse CAS
Upload a CAMS or KFintech CAS PDF. The parser returns a snapshot with funds, units, NAV, and allocations.
Endpoint
Section titled “Endpoint”POST https://api.portfoliointel.co.in/api/v1/parse
Authentication
Section titled “Authentication”X-API-Key: sk_live_* or Authorization: Bearer sk_live_*.
| Client type | Auth model |
|---|---|
| Claude Desktop / ChatGPT | OAuth 2.1 + PKCE |
| Claude Code / Cursor / Copilot | Bearer token in config |
| REST clients | Bearer token or X-API-Key |
Request
Section titled “Request”curl -X POST https://api.portfoliointel.co.in/api/v1/parse \ -H "X-API-Key: sk_live_..." \ -F "file=@cas.pdf" \ -F "password=optional-pdf-password"const form = new FormData();form.append('file', pdfBlob, 'cas.pdf');
const res = await fetch('https://api.portfoliointel.co.in/api/v1/parse', { method: 'POST', headers: { 'X-API-Key': process.env.PI_KEY! }, body: form,});r = requests.post( 'https://api.portfoliointel.co.in/api/v1/parse', headers={'X-API-Key': os.environ['PI_KEY']}, files={'file': open('cas.pdf', 'rb')},)Request body options
Section titled “Request body options”- Multipart form upload with
fileand optionalpassword - JSON body with
pdf_base64and optionalpassword - Sandbox reference with
pdf_ref: "sample_cams_2024"for test keys
Response
Section titled “Response”Returns { data: { snapshot_id, mutual_funds[], analytics } }.
{ "success": true, "data": { "snapshot_id": "snap_abc123", "investor_name": "ADITYA SHARMA", "as_of_date": "2024-12-31", "source": "CAMS", "statement_type": "DETAILED", "total_value": 1250000, "folio_count": 3, "mutual_funds": [ { "name": "Axis Bluechip Fund - Direct Growth", "isin": "INF846K01EW2", "units": 500.123, "nav": 52.34, "value": 26174.44 } ], "confidence": { "document": 0.95, "level": "HIGH" } }}