---
title: "Parse Contract Note PDF"
method: POST
path: "/v4/contract_note/parse"
tags: ["Contract Note Parser"]
---

# Parse Contract Note PDF

`POST /v4/contract_note/parse`

This endpoint parses Contract Note PDF files from various brokers including Zerodha, Groww, Upstox, ICICI Securities, and others.

**What is a Contract Note?**
A contract note is a legal document that provides details of all trades executed by an investor. It includes:
- Trade details with timestamps, quantities, and prices
- Brokerage and charges breakdown
- Settlement information
- Regulatory compliance details

**Supported Brokers:**
- Zerodha Broking Limited
- Groww Invest Tech Private Limited  
- Upstox (RKSV Securities)
- ICICI Securities Limited
- Auto-detection for unknown brokers

**Key Features:**
- **Auto-detection**: Automatically identifies broker type from PDF content
- **Comprehensive parsing**: Extracts equity transactions, derivatives transactions, detailed trades, and charges
- **Flexible input**: Accepts both file upload and URL-based PDF input
- **Password protection**: Supports password-protected PDFs

The API returns structured data including contract note information, client details, transaction summaries, and detailed trade-by-trade breakdowns.

## Request body

- union
  - object
    - `pdf_file` string, base64, required — Base64 encoded contract note PDF file
    - `pdf_url` string, uri — URL to the contract note PDF file
    - `password` string, required — Password for the PDF file (usually PAN number for Zerodha)
    - `broker_type` 'zerodha' | 'groww' | 'upstox' | 'icici' — Optional broker type override. If not provided, system will auto-detect.
  - object
    - `pdf_file` string, base64 — Base64 encoded contract note PDF file
    - `pdf_url` string, uri, required — URL to the contract note PDF file
    - `password` string, required — Password for the PDF file (usually PAN number for Zerodha)
    - `broker_type` 'zerodha' | 'groww' | 'upstox' | 'icici' — Optional broker type override. If not provided, system will auto-detect.

## Response `200`

Successfully parsed contract note

- object
  - `status` string
  - `msg` string
  - `data` ContractNoteResponse
    - `contract_note_info` object
      - `contract_note_number` string — Contract note reference number
      - `trade_date` string, date — Date when trades were executed
      - `settlement_number` string — Settlement reference number
      - `settlement_date` string, date — Settlement date for the trades
    - `broker_info` object
      - `broker_type` 'zerodha' | 'groww' | 'upstox' | 'icici' | 'unknown' — Auto-detected or specified broker type
      - `name` string — Broker company name
      - `sebi_registration` string — SEBI registration number of the broker
    - `client_info` object
      - `name` string — Client name
      - `pan` string — Client PAN number
      - `ucc` string — Unique Client Code
      - `place_of_supply` string — GST place of supply
      - `gst_state_code` string — GST state code
      - `address` string — Client address
    - `equity_transactions` object[] — Summary of equity transactions grouped by security
      - `isin` string — ISIN code of the security
      - `security_name` string — Name of the security
      - `security_symbol` string — Trading symbol
      - `buy_quantity` number, float — Total quantity purchased
      - `buy_wap` number, float — Weighted Average Price for buy transactions
      - `buy_total_value` number, float — Total value of buy transactions
      - `sell_quantity` number, float — Total quantity sold
      - `sell_wap` number, float — Weighted Average Price for sell transactions
      - `sell_total_value` number, float — Total value of sell transactions
      - `net_obligation` number, float — Net amount payable/receivable for this security
    - `derivatives_transactions` object[] — Summary of derivatives transactions
      - `contract_description` string — Derivatives contract description
      - `buy_sell_bf_cf` string — Transaction type (Buy/Sell/Bring Forward/Carry Forward)
      - `quantity` number, float — Quantity traded
      - `wap_per_unit` number, float — Weighted Average Price per unit
      - `brokerage_per_unit` number, float — Brokerage charged per unit
      - `closing_rate_per_unit` number, float — Closing rate per unit
      - `net_total` number, float — Net total amount
    - `detailed_trades` object[] — Detailed breakdown of all individual trades
      - `order_number` string — Order reference number
      - `order_time` string — Time when order was placed
      - `trade_number` string — Trade reference number
      - `trade_time` string — Time when trade was executed
      - `security_description` string — Security name with exchange and ISIN
      - `buy_sell` string — Transaction type (B for Buy, S for Sell)
      - `exchange` string — Exchange name
      - `quantity` number, float — Quantity traded
      - `brokerage` number, float — Brokerage charged for this trade
      - `net_rate_per_unit` number, float — Net rate per unit
      - `closing_rate_per_unit` number, float — Closing rate per unit
      - `net_total` number, float — Net total for this trade
      - `remarks` string — Additional remarks or notes
    - `charges_summary` object — Breakdown of various charges and fees
      - `pay_in_pay_out_obligation` number, float — Net pay-in/pay-out obligation
      - `taxable_value_brokerage` number, float — Taxable brokerage amount
      - `exchange_transaction_charges` number, float — Exchange transaction charges
      - `cgst` number, float — Central GST amount
      - `sgst` number, float — State GST amount
      - `igst` number, float — Integrated GST amount
      - `securities_transaction_tax` number, float — Securities Transaction Tax
      - `sebi_turnover_fees` number, float — SEBI turnover fees
      - `stamp_duty` number, float — Stamp duty charges
      - `net_amount_receivable_payable` number, float — Final net amount receivable or payable

## 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

---

[API](https://skmtc.net/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2.md) · [All operations](https://skmtc.net/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/casparser/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/revisions/c9918aebb2de/schema)
