API reference / CAS (portfolio fetch)

3.1 CAS Auto Request — submit

Submits the statement request with the CAPTCHA answer. The RTA then e-mails the password-protected CAS to the investor.

POST/v1/cas/request/submit
Authentication
Bearer token
Scope
cas:request

Before you integrate

  • Step 2 of 2, after opening a session. Unknown fields in the body are rejected.
  • The issuer e-mails the PDF to the investor, locked with cas_password. Then read it with the mailbox scan or an upload.
  • If period is specific, from_date and to_date are both required.
  • A reply with accepted false (for example a wrong CAPTCHA) is still a completed call and is charged. Open a new session and try again.

Request body

FieldTypeRequiredDescription
session_idstringYesThe session_id from opening a session; 3 to 64 characters.
panstringYesInvestor PAN in capitals, for example ABCPE1234F; the fourth letter must be one of A, B, C, F, G, H, L, J, P, T.
emailstringYesWhere the issuer e-mails the statement; up to 120 characters.
statement_typestringNosummary or detailed. Defaults to summary (detailed adds every transaction).
periodstringNocurrent_fy, previous_fy or specific. Defaults to current_fy.
from_datestringNoStart date as DD/MM/YYYY. Required when period is specific.
to_datestringNoEnd date as DD/MM/YYYY. Required when period is specific.
cas_passwordstringYesPassword the PDF will be locked with: 8 to 12 characters with a capital letter, a small letter, a digit and a symbol.
include_zero_balance_foliosbooleanNoAlso list folios with no units left. Defaults to false.
captchastringYesThe characters the investor read from the picture; 1 to 10 characters.

Sample code

Set your key in the GRAPPI_API_KEY environment variable. Sample values are placeholders.

curl -sS -X POST 'https://grappi.ai/v1/cas/request/submit' \
  -H "Authorization: Bearer $GRAPPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "session_id": "cassn_replace_me",
  "pan": "ABCPA1234A",
  "email": "investor@example.com",
  "statement_type": "detailed",
  "period": "current_fy",
  "cas_password": "Grappi@2026",
  "captcha": "AB12CD"
}'

Sample response

{
  "request_id": "req_01HZY3K8M2",
  "result": {
    "request_id": "casrq_1a2b3c4d5e6f7a8b",
    "source": "kfintech",
    "status": "submitted",
    "pan": "******234F",
    "email": "asha.rao@example.com",
    "statement_type": "detailed",
    "period": "current_fy",
    "from_date": null,
    "to_date": null,
    "rta_code": null,
    "message": "Your request has been received. The statement will be e-mailed shortly.",
    "created_at": "2026-11-06T09:30:00.000Z",
    "submitted_at": "2026-11-06T09:30:04.000Z",
    "accepted": true,
    "next": "The RTA mails the PDF to the investor. Pick it up with POST /v1/cas/read/mailbox/scan, or upload it to POST /v1/cas/read."
  }
}

Response fields

FieldTypeDescription
request_idstringId of this statement request; use it on the request history calls.
sourcestringWhich statement issuer the request went to.
statusstringsubmitted when accepted, rejected when refused, session_open or expired otherwise.
panstringThe investor's PAN, masked.
emailstringWhere the statement will be e-mailed.
statement_typestringsummary or detailed.
periodstringcurrent_fy, previous_fy or specific.
from_datestringStart date, DD/MM/YYYY; null unless period is specific.
to_datestringEnd date, DD/MM/YYYY; null unless period is specific.
rta_codestringThe issuer's own result code, if it sent one.
messagestringThe issuer's reply text, word for word.
created_atstringWhen the request was created, ISO 8601.
submitted_atstringWhen the issuer accepted it, ISO 8601; null if it did not.
acceptedbooleanTrue when the issuer accepted the request and will e-mail the statement.
reasonstringWhy it was refused: invalid_captcha, no_investment_found or rta_error. Present only when accepted is false.
nextstringWhat to do next, in plain words.

Errors

Every failure has the same shape. A call that fails on our side or at the data source is refunded to your wallet; a "no record found" answer is charged. See the error reference.