CAS Generator

Optimizing CAS retrieval from Investors

Architecture: CAS Generator

This guide covers flows for requesting CAS statements when users don't have a PDF file.

Overview

Two methods to retrieve CAS without requiring users to upload a PDF:

Method

Coverage

Delivery

User Input Required

KFintech Mailback

Mutual Funds

Email (2-5 min)

Email, date range, password

CDSL OTP Fetch

Demat holdings

Instant download

PAN, BO ID, DOB, OTP

Method 1: KFintech Email Mailback

Triggers a CAS request via KFintech. The PDF is emailed to the investor.

User Flow

┌─────────────────────────────────────────────────────────────────────────────┐
│                                                                             │
│   User Journey                                                              │
│                                                                             │
│   ┌─────────────┐     ┌─────────────┐     ┌─────────────┐     ┌─────────┐  │
│   │             │     │             │     │             │     │         │  │
│   │  Enters     │────►│  Request    │────►│  Receives   │────►│ Uploads │  │
│   │  details    │     │  submitted  │     │  email      │     │ PDF     │  │
│   │             │     │             │     │  (2-5 min)  │     │         │  │
│   └─────────────┘     └─────────────┘     └─────────────┘     └─────────┘  │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Data Flow

┌──────────┐     ┌──────────┐     ┌─────────────┐     ┌───────────┐
│  User    │     │ Your App │     │ CAS Parser  │     │ KFintech  │
└────┬─────┘     └────┬─────┘     └──────┬──────┘     └─────┬─────┘
     │                │                  │                  │
     │ Email, dates,  │                  │                  │
     │ password       │                  │                  │
     │───────────────►│                  │                  │
     │                │                  │                  │
     │                │  Request CAS     │                  │
     │                │─────────────────►│                  │
     │                │                  │                  │
     │                │                  │  Submit form     │
     │                │                  │─────────────────►│
     │                │                  │                  │
     │                │     Success      │                  │
     │                │◄─────────────────│                  │
     │                │                  │                  │
     │ "Check email"  │                  │                  │
     │◄───────────────│                  │                  │
     │                │                  │                  │
     │                │                  │    Email PDF     │
     │◄───────────────────────────────────────────────────────  (1-2 min)
     │                │                  │                  │

The user then uploads the received PDF to complete the import.

Method 2: CDSL OTP Fetch

Fetches demat holdings directly via OTP verification. No email wait.

User Flow

┌─────────────────────────────────────────────────────────────────────────────┐
│                                                                             │
│   User Journey                                                              │
│                                                                             │
│   ┌─────────────┐     ┌─────────────┐     ┌─────────────┐     ┌─────────┐  │
│   │             │     │             │     │             │     │         │  │
│   │  Enters     │────►│  Receives   │────►│  Enters     │────►│ Views   │  │
│   │  PAN, BO ID │     │  OTP on     │     │  OTP        │     │ data    │  │
│   │  DOB        │     │  mobile     │     │             │     │         │  │
│   └─────────────┘     └─────────────┘     └─────────────┘     └─────────┘  │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Data Flow

┌──────────┐     ┌──────────┐     ┌─────────────┐     ┌──────────┐
│  User    │     │ Your App │     │ CAS Parser  │     │   CDSL   │
└────┬─────┘     └────┬─────┘     └──────┬──────┘     └────┬─────┘
     │                │                  │                 │
     │ PAN, BO ID,    │                  │                 │
     │ DOB            │                  │                 │
     │───────────────►│                  │                 │
     │                │                  │                 │
     │                │  Step 1: Request │                 │
     │                │─────────────────►│                 │
     │                │                  │                 │
     │                │                  │  Login + CAPTCHA│
     │                │                  │────────────────►│
     │                │                  │                 │
     │   OTP SMS ◄──────────────────────────────────────────
     │                │                  │                 │
     │                │   session_id     │                 │
     │                │◄─────────────────│                 │
     │                │                  │                 │
     │ Enter OTP      │                  │                 │
     │───────────────►│                  │                 │
     │                │                  │                 │
     │                │  Step 2: Verify  │                 │
     │                │─────────────────►│                 │
     │                │                  │                 │
     │                │                  │  Fetch PDFs     │
     │                │                  │────────────────►│
     │                │                  │                 │
     │                │   PDF URLs       │                 │
     │                │◄─────────────────│                 │
     │                │                  │                 │
     │ Portfolio data │                  │                 │
     │◄───────────────│                  │                 │
     │                │                  │                 │

The returned PDF URLs can be passed directly to the parse API.

Combined Flow: Generate + Parse

KFintech (Async)

User enters details


Request CAS via KFintech ────► Email sent to user


Show "Check your email"

        │  (user receives email, returns with PDF)

User uploads PDF or forwards to your inbound mailbox


Parse PDF ────► Display portfolio

CDSL (Real-time)

User enters PAN, BO ID, DOB


Request OTP ────► OTP sent to mobile


User enters OTP


Verify & fetch PDFs


Parse each PDF ────► Display portfolio

Comparison

KFintech Mailback

CDSL OTP Fetch

Coverage

Mutual Funds

Equities, ETFs, Bonds, SGBs

Time to data

1-2 minutes

~30 seconds

User action

Wait for email, upload or forward PDF

Enter OTP

Sessions

None

10-minute expiry

API Documentation

Full endpoint documentation and request/response schemas:

docs.casparser.in/reference →