API reference / CAS (portfolio fetch)
CAS provider matrix
Which RTAs can be requested server-side today (KFintech yes; NSDL/CDSL need an investor OTP, so use the mailbox scan instead).
GET
/v1/cas/request/providers- Authentication
- Bearer token
- Scope
cas:request
Before you integrate
- Check request_automatable before placing a request. For sources where it is false, use the mailbox scan or an upload instead.
Sample code
Set your key in the GRAPPI_API_KEY environment variable. Sample values are placeholders.
curl -sS -X GET 'https://grappi.ai/v1/cas/request/providers' \ -H "Authorization: Bearer $GRAPPI_API_KEY"
Sample response
{
"request_id": "req_01HZY3K8M2",
"result": {
"sources": [
{
"source": "kfintech",
"covers": "mutual_funds",
"request_automatable": true
},
{
"source": "cams",
"covers": "mutual_funds",
"request_automatable": true
},
{
"source": "nsdl",
"covers": "demat",
"request_automatable": false,
"reason": "Needs a one-time code sent to the investor, so read the statement from their mailbox instead."
},
{
"source": "cdsl",
"covers": "demat",
"request_automatable": false,
"reason": "Needs a one-time code sent to the investor, so read the statement from their mailbox instead."
}
],
"captcha_solver": {
"available": true,
"one_call_request": "POST /v1/cas/request/auto"
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
sources | array | Every statement issuer and whether a request can be placed with it from the server. |
sources[].source | string | kfintech, cams, nsdl or cdsl. |
sources[].covers | string | mutual_funds or demat. |
sources[].request_automatable | boolean | True if a request can be placed through the API. |
sources[].reason | string | Why it cannot, when request_automatable is false. |
captcha_solver | object | Whether the one-call request is available. |
captcha_solver.available | boolean | True if the one-call request works. |
captcha_solver.one_call_request | string | The one-call route when available, otherwise a pointer to the two-step flow. |
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.