---
title: "Smart Parse CAS PDF"
method: POST
path: "/v4/smart/parse"
tags: ["CAS Parser"]
---

# Smart Parse CAS PDF

`POST /v4/smart/parse`

## Request

- Base URL: `https://api.casparser.in`
- URL: `https://api.casparser.in/v4/smart/parse`
- Auth: API key in header `x-api-key`

This endpoint parses CAS (Consolidated Account Statement) PDF files from NSDL, CDSL, or CAMS/KFintech and returns data in a unified format.
It auto-detects the CAS type and transforms the data into a consistent structure regardless of the source.

## Request body

- object: Provide either `pdf_file` OR `pdf_url` (one is required)
  - `pdf_file` string, base64: Base64 encoded CAS PDF file (required if pdf_url not provided)
  - `pdf_url` string, uri: URL to the CAS PDF file (required if pdf_file not provided)
  - `password` string: Password for the PDF file (if required)

## Response `200`

Successful operation

- UnifiedResponse
  - `meta` object
    - `cas_type` 'NSDL' | 'CDSL' | 'CAMS_KFINTECH': Type of CAS detected and processed
    - `statement_period` object
      - `from` string, date: Start date of the statement period
      - `to` string, date: End date of the statement period
    - `generated_at` string, date-time: Timestamp when the response was generated
  - `investor` object
    - `name` string: Name of the investor
    - `pan` string: PAN (Permanent Account Number) of the investor
    - `email` string, email: Email address of the investor
    - `address` string: Address of the investor
    - `pincode` string: Postal code of the investor's address
    - `mobile` string: Mobile number of the investor
    - `cas_id` string: CAS ID of the investor (only for NSDL and CDSL)
  - `summary` object
    - `total_value` number, float: Total portfolio value across all accounts
    - `accounts` object
      - `demat` object
        - `count` integer: Number of demat accounts
        - `total_value` number, float: Total value of demat accounts
      - `mutual_funds` object
        - `count` integer: Number of mutual fund folios
        - `total_value` number, float: Total value of mutual funds
      - `insurance` object
        - `count` integer: Number of insurance policies
        - `total_value` number, float: Total value of insurance policies
      - `nps` object
        - `count` integer: Number of NPS accounts
        - `total_value` number, float: Total value of NPS accounts
  - `demat_accounts` DematAccount[]
    - `demat_type` 'NSDL' | 'CDSL': Type of demat account
    - `dp_id` string: Depository Participant ID
    - `dp_name` string: Depository Participant name
    - `client_id` string: Client ID
    - `bo_id` string: Beneficiary Owner ID (primarily for CDSL)
    - `value` number, float: Total value of the demat account
    - `linked_holders` LinkedHolder[]: List of account holders linked to this demat account
      - `name` string: Name of the account holder
      - `pan` string: PAN of the account holder
    - `holdings` object
      - `equities` Equity[]
        - `isin` string: ISIN code of the equity
        - `name` string: Name of the equity
        - `units` number, float: Number of units held
        - `value` number, float: Current market value of the holding
        - `transactions` Transaction[]: List of transactions for this holding (beta)
          - `date` string, date: Transaction date (YYYY-MM-DD)
          - `description` string: Transaction description/particulars
          - `type` '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': Transaction type. Possible values are 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.
          - `amount` number, float, nullable: Transaction amount in currency (computed from units × price/NAV)
          - `units` number, float: Number of units involved in transaction
          - `nav` number, float, nullable: NAV/price per unit on transaction date
          - `balance` number, float: Balance units after transaction
          - `dividend_rate` number, float, nullable: Dividend rate (for DIVIDEND_PAYOUT transactions)
          - `additional_info` object: Additional transaction-specific fields that vary by source
            - `credit` number, float: Units credited (demat transactions)
            - `debit` number, float: Units debited (demat transactions)
            - `stamp_duty` number, float: Stamp duty charged
            - `order_no` string: Order/transaction reference number (demat transactions)
            - `price` number, float: Price per unit (NSDL/CDSL MF transactions)
            - `income_distribution` number, float: Income distribution amount (CDSL MF transactions)
            - `capital_withdrawal` number, float: Capital withdrawal amount (CDSL MF transactions)
        - `additional_info` object: Additional information specific to the equity
          - `open_units` number, float, nullable: Opening balance units for the statement period (beta)
          - `close_units` number, float, nullable: Closing balance units for the statement period (beta)
      - `corporate_bonds` CorporateBond[]
        - `isin` string: ISIN code of the corporate bond
        - `name` string: Name of the corporate bond
        - `units` number, float: Number of units held
        - `value` number, float: Current market value of the holding
        - `transactions` Transaction[]: List of transactions for this holding (beta)
          - `date` string, date: Transaction date (YYYY-MM-DD)
          - `description` string: Transaction description/particulars
          - `type` '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': Transaction type. Possible values are 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.
          - `amount` number, float, nullable: Transaction amount in currency (computed from units × price/NAV)
          - `units` number, float: Number of units involved in transaction
          - `nav` number, float, nullable: NAV/price per unit on transaction date
          - `balance` number, float: Balance units after transaction
          - `dividend_rate` number, float, nullable: Dividend rate (for DIVIDEND_PAYOUT transactions)
          - `additional_info` object: Additional transaction-specific fields that vary by source
            - `credit` number, float: Units credited (demat transactions)
            - `debit` number, float: Units debited (demat transactions)
            - `stamp_duty` number, float: Stamp duty charged
            - `order_no` string: Order/transaction reference number (demat transactions)
            - `price` number, float: Price per unit (NSDL/CDSL MF transactions)
            - `income_distribution` number, float: Income distribution amount (CDSL MF transactions)
            - `capital_withdrawal` number, float: Capital withdrawal amount (CDSL MF transactions)
        - `additional_info` object: Additional information specific to the corporate bond
          - `open_units` number, float, nullable: Opening balance units for the statement period (beta)
          - `close_units` number, float, nullable: Closing balance units for the statement period (beta)
      - `government_securities` GovernmentSecurity[]
        - `isin` string: ISIN code of the government security
        - `name` string: Name of the government security
        - `units` number, float: Number of units held
        - `value` number, float: Current market value of the holding
        - `transactions` Transaction[]: List of transactions for this holding (beta)
          - `date` string, date: Transaction date (YYYY-MM-DD)
          - `description` string: Transaction description/particulars
          - `type` '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': Transaction type. Possible values are 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.
          - `amount` number, float, nullable: Transaction amount in currency (computed from units × price/NAV)
          - `units` number, float: Number of units involved in transaction
          - `nav` number, float, nullable: NAV/price per unit on transaction date
          - `balance` number, float: Balance units after transaction
          - `dividend_rate` number, float, nullable: Dividend rate (for DIVIDEND_PAYOUT transactions)
          - `additional_info` object: Additional transaction-specific fields that vary by source
            - `credit` number, float: Units credited (demat transactions)
            - `debit` number, float: Units debited (demat transactions)
            - `stamp_duty` number, float: Stamp duty charged
            - `order_no` string: Order/transaction reference number (demat transactions)
            - `price` number, float: Price per unit (NSDL/CDSL MF transactions)
            - `income_distribution` number, float: Income distribution amount (CDSL MF transactions)
            - `capital_withdrawal` number, float: Capital withdrawal amount (CDSL MF transactions)
        - `additional_info` object: Additional information specific to the government security
          - `open_units` number, float, nullable: Opening balance units for the statement period (beta)
          - `close_units` number, float, nullable: Closing balance units for the statement period (beta)
      - `aifs` AIF[]
        - `isin` string: ISIN code of the AIF
        - `name` string: Name of the AIF
        - `units` number, float: Number of units held
        - `value` number, float: Current market value of the holding
        - `transactions` Transaction[]: List of transactions for this holding (beta)
          - `date` string, date: Transaction date (YYYY-MM-DD)
          - `description` string: Transaction description/particulars
          - `type` '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': Transaction type. Possible values are 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.
          - `amount` number, float, nullable: Transaction amount in currency (computed from units × price/NAV)
          - `units` number, float: Number of units involved in transaction
          - `nav` number, float, nullable: NAV/price per unit on transaction date
          - `balance` number, float: Balance units after transaction
          - `dividend_rate` number, float, nullable: Dividend rate (for DIVIDEND_PAYOUT transactions)
          - `additional_info` object: Additional transaction-specific fields that vary by source
            - `credit` number, float: Units credited (demat transactions)
            - `debit` number, float: Units debited (demat transactions)
            - `stamp_duty` number, float: Stamp duty charged
            - `order_no` string: Order/transaction reference number (demat transactions)
            - `price` number, float: Price per unit (NSDL/CDSL MF transactions)
            - `income_distribution` number, float: Income distribution amount (CDSL MF transactions)
            - `capital_withdrawal` number, float: Capital withdrawal amount (CDSL MF transactions)
        - `additional_info` object: Additional information specific to the AIF
          - `open_units` number, float, nullable: Opening balance units for the statement period (beta)
          - `close_units` number, float, nullable: Closing balance units for the statement period (beta)
      - `demat_mutual_funds` DematMutualFund[]
        - `isin` string: ISIN code of the mutual fund
        - `name` string: Name of the mutual fund
        - `units` number, float: Number of units held
        - `value` number, float: Current market value of the holding
        - `transactions` Transaction[]: List of transactions for this holding (beta)
          - `date` string, date: Transaction date (YYYY-MM-DD)
          - `description` string: Transaction description/particulars
          - `type` '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': Transaction type. Possible values are 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.
          - `amount` number, float, nullable: Transaction amount in currency (computed from units × price/NAV)
          - `units` number, float: Number of units involved in transaction
          - `nav` number, float, nullable: NAV/price per unit on transaction date
          - `balance` number, float: Balance units after transaction
          - `dividend_rate` number, float, nullable: Dividend rate (for DIVIDEND_PAYOUT transactions)
          - `additional_info` object: Additional transaction-specific fields that vary by source
            - `credit` number, float: Units credited (demat transactions)
            - `debit` number, float: Units debited (demat transactions)
            - `stamp_duty` number, float: Stamp duty charged
            - `order_no` string: Order/transaction reference number (demat transactions)
            - `price` number, float: Price per unit (NSDL/CDSL MF transactions)
            - `income_distribution` number, float: Income distribution amount (CDSL MF transactions)
            - `capital_withdrawal` number, float: Capital withdrawal amount (CDSL MF transactions)
        - `additional_info` object: Additional information specific to the mutual fund
          - `open_units` number, float, nullable: Opening balance units for the statement period (beta)
          - `close_units` number, float, nullable: Closing balance units for the statement period (beta)
    - `additional_info` object: Additional information specific to the demat account type
      - `bo_status` string: Beneficiary Owner status (CDSL)
      - `bo_sub_status` string: Beneficiary Owner sub-status (CDSL)
      - `bo_type` string: Beneficiary Owner type (CDSL)
      - `bsda` string: Basic Services Demat Account status (CDSL)
      - `email` string, email: Email associated with the demat account (CDSL)
      - `status` string: Account status (CDSL)
      - `nominee` string: Nominee details (CDSL)
      - `linked_pans` string[]: List of linked PAN numbers (NSDL)
  - `mutual_funds` MutualFundFolio[]
    - `folio_number` string: Folio number
    - `amc` string: Asset Management Company name
    - `registrar` string: Registrar and Transfer Agent name
    - `value` number, float: Total value of the folio
    - `linked_holders` LinkedHolder[]: List of account holders linked to this mutual fund folio
      - `name` string: Name of the account holder
      - `pan` string: PAN of the account holder
    - `schemes` MutualFundScheme[]
      - `isin` string: ISIN code of the scheme
      - `name` string: Scheme name
      - `type` 'Equity' | 'Debt' | 'Hybrid' | 'Other': Type of mutual fund scheme
      - `units` number, float: Number of units held
      - `nav` number, float: Net Asset Value per unit
      - `value` number, float: Current market value of the holding
      - `cost` number, float: Cost of investment
      - `gain` object
        - `absolute` number, float: Absolute gain or loss
        - `percentage` number, float: Percentage gain or loss
      - `transactions` Transaction[]
        - `date` string, date: Transaction date (YYYY-MM-DD)
        - `description` string: Transaction description/particulars
        - `type` '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': Transaction type. Possible values are 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.
        - `amount` number, float, nullable: Transaction amount in currency (computed from units × price/NAV)
        - `units` number, float: Number of units involved in transaction
        - `nav` number, float, nullable: NAV/price per unit on transaction date
        - `balance` number, float: Balance units after transaction
        - `dividend_rate` number, float, nullable: Dividend rate (for DIVIDEND_PAYOUT transactions)
        - `additional_info` object: Additional transaction-specific fields that vary by source
          - `credit` number, float: Units credited (demat transactions)
          - `debit` number, float: Units debited (demat transactions)
          - `stamp_duty` number, float: Stamp duty charged
          - `order_no` string: Order/transaction reference number (demat transactions)
          - `price` number, float: Price per unit (NSDL/CDSL MF transactions)
          - `income_distribution` number, float: Income distribution amount (CDSL MF transactions)
          - `capital_withdrawal` number, float: Capital withdrawal amount (CDSL MF transactions)
      - `nominees` string[]: List of nominees
      - `additional_info` object: Additional information specific to the scheme
        - `advisor` string: Financial advisor name (CAMS/KFintech)
        - `rta_code` string: RTA code for the scheme (CAMS/KFintech)
        - `amfi` string: AMFI code for the scheme (CAMS/KFintech)
        - `is_demat` boolean, nullable: Whether the scheme is held in demat form (CAMS/KFintech). true = Demat, false = Non-Demat, null = not specified.
        - `open_units` number, float, nullable: Opening balance units for the statement period
        - `close_units` number, float, nullable: Closing balance units for the statement period
    - `additional_info` object: Additional folio information
      - `pan` string: PAN associated with the folio
      - `pankyc` string: PAN KYC status
      - `kyc` string: KYC status of the folio
  - `insurance` object
    - `life_insurance_policies` LifeInsurancePolicy[]
      - `policy_number` string: Insurance policy number
      - `provider` string: Insurance company name
      - `policy_name` string: Name of the insurance policy
      - `life_assured` string: Name of the life assured
      - `status` string: Status of the policy (e.g., Active, Lapsed)
      - `sum_assured` number, float: Sum assured amount
      - `premium_amount` number, float: Premium amount
      - `premium_frequency` string: Frequency of premium payment (e.g., Annual, Monthly)
      - `additional_info` object: Additional information specific to the policy
  - `nps` NPSAccount[]: List of NPS accounts
    - `pran` string: Permanent Retirement Account Number (PRAN)
    - `cra` string: Central Record Keeping Agency name
    - `value` number, float: Total value of the NPS account
    - `funds` NPSFund[]
      - `name` string: Name of the NPS fund
      - `units` number, float: Number of units held
      - `nav` number, float: Net Asset Value per unit
      - `value` number, float: Current market value of the holding
      - `cost` number, float: Cost of investment
      - `additional_info` object: Additional information specific to the NPS fund
        - `tier` number: NPS tier (Tier I or Tier II)
        - `manager` string: Fund manager name
    - `linked_holders` LinkedHolder[]: List of account holders linked to this NPS account
      - `name` string: Name of the account holder
      - `pan` string: PAN of the account holder
    - `additional_info` object: Additional information specific to the NPS account

## Other responses

- `400`: Bad request (Invalid PDF file, missing parameters, or invalid password)
- `401`: Unauthorized. This can happen if the `x-api-key` header is missing.
- `403`: Forbidden. This can happen if the API key is invalid or the quota has been exceeded.
- `500`: Internal server error

## Changes

- **2026-09-13** `cf1b57c0f2f7`: 3 warning
  - the optional response header `X-Request-ID` removed for the status `401`
  - the optional response header `X-Request-ID` removed for the status `403`
  - the optional response header `X-Request-ID` removed for the status `500`
- **2026-08-04** `524f205979f7`: 1 info
  - added the optional property `mutual_funds/items/schemes/items/additional_info/is_demat` to the response with the `200` status
- **2026-08-02** `d16a668b33a9`: 1 info
  - added the optional property `mutual_funds/items/schemes/items/additional_info/is_demat` to the response with the `200` status
- **2026-07-12** `c74b9ecd5b53`: 2 warning
  - added the new `failed` enum value to the `status` response property for the response status `401`
  - added the new `failed` enum value to the `status` response property for the response status `403`
- **2026-02-14** `56b0f699c543`: 1 breaking, 2 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list (media type: application/json)
  - added the new optional request property `pdf_url` (media type: multipart/form-data)
  - the request property `pdf_file` became optional (media type: multipart/form-data)

[Operation history](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/changes/v4/smart/parse/post.md)

---

[API](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2.md) - [All operations](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/llms.txt) - [OpenAPI document](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/revisions/9d8f1445bad3?raw)
