Skip to main content

Overview

All CAS parsing endpoints return a unified JSON structure regardless of source (CDSL, NSDL, CAMS, KFintech).

Top-Level Structure

{
  "meta": { ... },
  "investor": { ... },
  "summary": { ... },
  "demat_accounts": [ ... ],
  "mutual_funds": [ ... ],
  "insurance": { ... },
  "nps": [ ... ]
}

Meta Object

Contains metadata about the CAS document and parsing operation.
{
  "meta": {
    "cas_type": "CDSL",
    "statement_period": {
      "from": "2024-01-01",
      "to": "2024-01-31"
    },
    "generated_at": "2024-02-01T10:30:00Z"
  }
}
FieldTypeDescription
cas_typestringCDSL, NSDL, or CAMS_KFINTECH (uppercase)
statement_periodobjectPeriod covered by the statement
statement_period.fromstringStart date of statement (YYYY-MM-DD)
statement_period.tostringEnd date of statement (YYYY-MM-DD)
generated_atstringWhen the response was generated (ISO 8601)

Investor Object

Contains personal details of the investor extracted from the CAS.
{
  "investor": {
    "name": "John Doe",
    "pan": "ABCDE1234F",
    "email": "john@example.com",
    "address": "123 Main St, Mumbai 400001",
    "pincode": "400001",
    "mobile": "9876543210",
    "cas_id": "CAS123456"
  }
}
FieldTypeDescription
namestringFull name of investor
panstringPAN (Permanent Account Number)
emailstringEmail address (may be null)
addressstringFull postal address (may be null)
pincodestringPostal/ZIP code (may be null)
mobilestringMobile number (may be null)
cas_idstringCAS ID (only for NSDL and CDSL, may be null)

Summary Object

Provides aggregated portfolio metrics and account counts.
{
  "summary": {
    "total_value": 2547832.50,
    "accounts": {
      "demat": {
        "count": 2,
        "total_value": 1500000.00
      },
      "mutual_funds": {
        "count": 5,
        "total_value": 950000.00
      },
      "insurance": {
        "count": 1,
        "total_value": 50000.00
      },
      "nps": {
        "count": 1,
        "total_value": 47832.50
      }
    }
  }
}
FieldTypeDescription
total_valuenumberTotal portfolio value across all accounts
accountsobjectBreakdown by account type
accounts.demat.countintegerNumber of demat accounts
accounts.demat.total_valuenumberTotal value of demat holdings
accounts.mutual_funds.countintegerNumber of mutual fund folios
accounts.mutual_funds.total_valuenumberTotal value of MF holdings
accounts.insurance.countintegerNumber of insurance policies
accounts.insurance.total_valuenumberTotal value of insurance
accounts.nps.countintegerNumber of NPS accounts
accounts.nps.total_valuenumberTotal value of NPS holdings

Demat Accounts Array

Array of demat (dematerialized) accounts holding equities, bonds, ETFs, and other securities.
{
  "demat_accounts": [
    {
      "demat_type": "CDSL",
      "dp_id": "12345678",
      "dp_name": "HDFC Bank Limited",
      "client_id": "1234567890123456",
      "bo_id": "1234567890123456",
      "value": 1500000.00,
      "linked_holders": [
        {
          "name": "John Doe",
          "pan": "ABCDE1234F"
        }
      ],
      "holdings": {
        "equities": [ ... ],
        "corporate_bonds": [ ... ],
        "government_securities": [ ... ],
        "aifs": [ ... ],
        "demat_mutual_funds": [ ... ]
      },
      "additional_info": {
        "bo_status": "Active",
        "bo_type": "Individual",
        "bsda": "No",
        "email": "john@example.com",
        "status": "Active",
        "nominee": "Jane Doe"
      }
    }
  ]
}

Demat Account Fields

FieldTypeDescription
demat_typestringNSDL or CDSL
dp_idstringDepository Participant ID
dp_namestringDP name (e.g., “HDFC Bank”)
client_idstringClient ID
bo_idstringBeneficiary Owner ID (primarily for CDSL)
valuenumberTotal value of this demat account
linked_holdersarrayAccount holders linked to this account
holdingsobjectHoldings grouped by asset class
additional_infoobjectAccount-specific metadata (varies by type)

Equity Object

Holdings in equities (stocks).
{
  "isin": "INE002A01018",
  "name": "Reliance Industries Ltd",
  "units": 100.0,
  "value": 250000.00,
  "transactions": [
    {
      "date": "2023-06-15",
      "type": "PURCHASE",
      "description": "Purchase",
      "units": 50.0,
      "nav": 2400.00,
      "amount": 120000.00,
      "balance": 100.0
    }
  ],
  "additional_info": {
    "open_units": 50.0,
    "close_units": 100.0
  }
}
FieldTypeDescription
isinstringISIN code (12 characters)
namestringSecurity name
unitsnumberNumber of shares currently held
valuenumberCurrent market value
transactionsarrayTransaction history (beta feature)
additional_infoobjectOpening/closing units for statement period

Corporate Bond Object

Holdings in corporate bonds.
{
  "isin": "INE123A01234",
  "name": "HDFC Ltd 8.5% Bond",
  "units": 10.0,
  "value": 10500.00,
  "transactions": [ ... ],
  "additional_info": {
    "open_units": 10.0,
    "close_units": 10.0
  }
}
FieldTypeDescription
isinstringISIN code
namestringBond name/description
unitsnumberNumber of units held
valuenumberCurrent market value
transactionsarrayTransaction history (beta feature)
additional_infoobjectOpening/closing units for statement period

Mutual Funds Array

Array of mutual fund folios with schemes and transactions.
{
  "mutual_funds": [
    {
      "folio_number": "1234567890",
      "amc": "HDFC Mutual Fund",
      "registrar": "Computer Age Management Services",
      "value": 451000.88,
      "linked_holders": [
        {
          "name": "John Doe",
          "pan": "ABCDE1234F"
        }
      ],
      "schemes": [
        {
          "isin": "INF179K01234",
          "name": "HDFC Equity Fund - Growth",
          "type": "Equity",
          "units": 1000.50,
          "nav": 450.75,
          "value": 451000.88,
          "cost": 400000.00,
          "gain": {
            "absolute": 51000.88,
            "percentage": 12.75
          },
          "transactions": [ ... ],
          "nominees": ["Jane Doe"],
          "additional_info": {
            "advisor": "XYZ Advisors",
            "rta_code": "HDC001",
            "amfi": "100123",
            "open_units": 900.50,
            "close_units": 1000.50
          }
        }
      ],
      "additional_info": {
        "pan": "ABCDE1234F",
        "pankyc": "OK",
        "kyc": "OK"
      }
    }
  ]
}

Mutual Fund Folio Fields

FieldTypeDescription
folio_numberstringFolio number
amcstringAsset Management Company name
registrarstringRegistrar and Transfer Agent name
valuenumberTotal value of the folio
linked_holdersarrayAccount holders linked to this folio
schemesarrayList of schemes in this folio
additional_infoobjectPAN, KYC status, etc.

Scheme Object

FieldTypeDescription
isinstringISIN code
namestringScheme name
typestringEquity, Debt, Hybrid, or Other
unitsnumberUnits held
navnumberNet Asset Value per unit
valuenumberCurrent value (units × NAV)
costnumberCost of investment
gainobjectGain/loss metrics
gain.absolutenumberAbsolute gain or loss
gain.percentagenumberPercentage gain or loss
transactionsarrayTransaction history
nomineesarrayList of nominee names
additional_infoobjectAdvisor, RTA code, AMFI code, opening/closing units

Transaction Object

Unified transaction schema for all holdings (mutual funds, equities, bonds, etc.).
{
  "date": "2023-06-15",
  "description": "Purchase",
  "type": "PURCHASE",
  "amount": 10000.00,
  "units": 22.18,
  "nav": 450.86,
  "balance": 1000.50,
  "dividend_rate": null,
  "additional_info": {
    "stamp_duty": 5.00,
    "order_no": "ORD123456"
  }
}
FieldTypeDescription
datestringTransaction date (YYYY-MM-DD)
descriptionstringTransaction description/particulars
typestringTransaction type (see below)
amountnumberTransaction amount in currency (may be null)
unitsnumberNumber of units involved
navnumberNAV/price per unit on transaction date (may be null)
balancenumberBalance units after transaction
dividend_ratenumberDividend rate (for DIVIDEND_PAYOUT, may be null)
additional_infoobjectAdditional transaction-specific fields
Transaction Types: PURCHASE, PURCHASE_SIP, REDEMPTION, SWITCH_IN, SWITCH_IN_MERGER, SWITCH_OUT, SWITCH_OUT_MERGER, DIVIDEND_PAYOUT, DIVIDEND_REINVEST, SEGREGATION, STAMP_DUTY_TAX, TDS_TAX, STT_TAX, MISC, REVERSAL, UNKNOWN

Insurance Object

Contains insurance policies (currently only life insurance).
{
  "insurance": {
    "life_insurance_policies": [
      {
        "policy_number": "POL123456",
        "provider": "HDFC Life",
        "policy_name": "Click 2 Protect Life",
        "life_assured": "John Doe",
        "status": "Active",
        "sum_assured": 10000000,
        "premium_amount": 15000,
        "premium_frequency": "Annual",
        "additional_info": { }
      }
    ]
  }
}
FieldTypeDescription
policy_numberstringInsurance policy number
providerstringInsurance company name
policy_namestringName of the insurance policy
life_assuredstringName of the life assured
statusstringPolicy status (e.g., Active, Lapsed)
sum_assurednumberSum assured amount
premium_amountnumberPremium amount
premium_frequencystringFrequency (Annual, Monthly, etc.)
additional_infoobjectAdditional policy-specific information

NPS Array

National Pension System accounts (only available in NSDL CAS).
{
  "nps": [
    {
      "pran": "123456789012",
      "cra": "NSDL",
      "value": 228472.84,
      "funds": [
        {
          "name": "SBI Equity Fund",
          "units": 5000.50,
          "nav": 45.67,
          "value": 228472.84,
          "cost": 200000.00,
          "additional_info": {
            "tier": 1,
            "manager": "SBI Pension Funds"
          }
        }
      ],
      "linked_holders": [
        {
          "name": "John Doe",
          "pan": "ABCDE1234F"
        }
      ],
      "additional_info": { }
    }
  ]
}
FieldTypeDescription
pranstringPermanent Retirement Account Number
crastringCentral Record Keeping Agency name
valuenumberTotal value of the NPS account
fundsarrayList of NPS funds
linked_holdersarrayAccount holders linked to this NPS account
additional_infoobjectAdditional NPS account metadata

NPS Fund Object

FieldTypeDescription
namestringName of the NPS fund
unitsnumberNumber of units held
navnumberNet Asset Value per unit
valuenumberCurrent market value
costnumberCost of investment
additional_info.tiernumberNPS tier (1, 2, or null)
additional_info.managerstringFund manager name

Error Response

When parsing fails, the API returns a failed status with a descriptive error message.
{
  "status": "failed",
  "msg": "Invalid password for PDF"
}
FieldTypeDescription
statusstringAlways failed for errors (or error for system errors)
msgstringHuman-readable error message
Note: All responses include an X-Request-ID header (format: req_<alphanumeric>) for debugging and support.

Common Error Messages

MessageCauseSolution
Invalid password for PDFWrong PDF passwordVerify password format (often PAN-based)
Invalid PDF fileCorrupted or scanned PDFUse original digitally-generated PDF
Unsupported CAS typeWrong endpoint for CAS typeUse /v4/smart/parse to auto-detect
API quota exceededCredit limit reachedUpgrade plan or wait for reset
Authentication failedMissing/invalid API keyCheck x-api-key header

Next Steps