Skip to content
API documentation

Documents & e-Aadhaar

Fetch user details, issued documents, files, certificate XML and e-Aadhaar from an authorized session.

These endpoints read from the customer's DigiLocker and need a session with status authorized. Otherwise they return 409 session_not_authorized. Access tokens are refreshed automatically.

  • Files are returned as JSON with content_base64, or as the raw file when you add download=1.
  • Every file is checked against DigiLocker's HMAC signature. hmac_verified: true confirms it wasn't altered.
  • e-Aadhaar needs e-Aadhaar access enabled for your DigiLocker app. Without it, DigiLocker returns insufficient_scope; the session still contains the basic profile (masked Aadhaar, name, DOB, gender, mobile).
  • Calls are billed only when they succeed.

GET /api/v1/sessions/{id}/user

Get User Details — digilockerid, name, dob, gender, eaadhaar flag.

Billing: Get user details (free in test mode)

Request

curl "https://kyckaro.in/api/v1/sessions/3f6c2a1e-8b1d-4c55-9f0e-2d6a7b9c1e44/user" \
  -H "Authorization: Bearer kk_test_xxxxxxxx" \
  -H "Accept: application/json"

GET /api/v1/sessions/{id}/files/issued

Get List of Issued Documents (uri, doctype, issuer, mime…).

Billing: List issued documents (free in test mode)

Request

curl "https://kyckaro.in/api/v1/sessions/3f6c2a1e-8b1d-4c55-9f0e-2d6a7b9c1e44/files/issued" \
  -H "Authorization: Bearer kk_test_xxxxxxxx" \
  -H "Accept: application/json"

Response 200

{
    "success": true,
    "data": {
        "items": [
            {
                "name": "PAN Verification Record",
                "type": "file",
                "mime": [
                    "application/pdf",
                    "application/xml"
                ],
                "uri": "in.gov.pan-PANCR-ABCDE1234F",
                "doctype": "PANCR",
                "description": "PAN Verification Record",
                "issuerid": "in.gov.pan",
                "issuer": "Income Tax Department"
            },
            {
                "name": "Driving License",
                "type": "file",
                "mime": [
                    "application/pdf",
                    "application/xml"
                ],
                "uri": "in.gov.transport-DRVLC-DL0120230100001",
                "doctype": "DRVLC",
                "description": "Driving License",
                "issuerid": "in.gov.transport",
                "issuer": "Ministry of Road Transport and Highways"
            }
        ]
    },
    "meta": {
        "request_id": "9b1f…",
        "charged": 0
    }
}

GET /api/v1/sessions/{id}/files/uploaded

Get List of Self Uploaded Documents.

Billing: List self-uploaded documents (free in test mode)

Parameters

NameDescription
folder_idoptional — folder id, root if omitted

Request

curl "https://kyckaro.in/api/v1/sessions/3f6c2a1e-8b1d-4c55-9f0e-2d6a7b9c1e44/files/uploaded" \
  -H "Authorization: Bearer kk_test_xxxxxxxx" \
  -H "Accept: application/json"

GET /api/v1/sessions/{id}/files/download

Get File from URI. JSON with content_base64 (HMAC verified), or the raw file with download=1.

Billing: Download file by URI (free in test mode)

Parameters

NameDescription
urirequired — document URI
download1 to stream the raw file

Request

curl "https://kyckaro.in/api/v1/sessions/3f6c2a1e-8b1d-4c55-9f0e-2d6a7b9c1e44/files/download?uri=in.gov.pan-PANCR-ABCDE1234F" \
  -H "Authorization: Bearer kk_test_xxxxxxxx" \
  -H "Accept: application/json"

Response 200

{
    "success": true,
    "data": {
        "uri": "in.gov.pan-PANCR-ABCDE1234F",
        "mime_type": "application/pdf",
        "size": 48211,
        "hmac_verified": true,
        "content_base64": "JVBERi0xLjQKJ…"
    },
    "meta": {
        "request_id": "9b1f…",
        "charged": 0
    }
}

GET /api/v1/sessions/{id}/files/xml

Get Certificate Data in XML Format from URI (issued documents with application/xml).

Billing: Certificate data (XML) by URI (free in test mode)

Parameters

NameDescription
urirequired
download1 to stream the raw XML

Request

curl "https://kyckaro.in/api/v1/sessions/3f6c2a1e-8b1d-4c55-9f0e-2d6a7b9c1e44/files/xml" \
  -H "Authorization: Bearer kk_test_xxxxxxxx" \
  -H "Accept: application/json"

GET /api/v1/sessions/{id}/eaadhaar

Get e-Aadhaar data — parsed name, DOB, gender, address, photo.

Billing: e-Aadhaar data (free in test mode)

Parameters

NameDescription
include_xml1 to include the signed XML
download1 to stream the raw XML

Request

curl "https://kyckaro.in/api/v1/sessions/3f6c2a1e-8b1d-4c55-9f0e-2d6a7b9c1e44/eaadhaar" \
  -H "Authorization: Bearer kk_test_xxxxxxxx" \
  -H "Accept: application/json"

Response 200

{
    "success": true,
    "data": {
        "aadhaar": {
            "masked_aadhaar": "xxxxxxxx1234",
            "name": "Sunil Kumar",
            "dob": "31-12-1970",
            "gender": "M",
            "care_of": "S/O Ramesh Kumar",
            "address": {
                "house": "12",
                "street": "Janpath",
                "vtc": "New Delhi",
                "dist": "New Delhi",
                "state": "Delhi",
                "pc": "110001",
                "country": "India"
            },
            "full_address": "12, Janpath, New Delhi, New Delhi, Delhi, 110001, India",
            "photo_base64": "/9j/4AAQSkZJRg…"
        },
        "hmac_verified": true
    },
    "meta": {
        "request_id": "9b1f…",
        "charged": 0
    }
}

POST /api/v1/sessions/{id}/files/upload

Upload File to Locker (multipart). PDF/JPG/PNG, max 10 MB.

Billing: Upload file to locker (free in test mode)

Parameters

NameDescription
filerequired — the file
pathoptional — destination path incl. file name

Request

curl -X POST "https://kyckaro.in/api/v1/sessions/3f6c2a1e-8b1d-4c55-9f0e-2d6a7b9c1e44/files/upload" \
  -H "Authorization: Bearer kk_test_xxxxxxxx" \
  -H "Accept: application/json"

POST /api/v1/sessions/{id}/pull

Pull Document from an issuer into the user's locker; returns its uri.

Billing: Pull document from issuer (free in test mode)

Parameters

NameDescription
orgidrequired — from /issuers
doctyperequired — from /issuers/{orgid}/doctypes
consentrequired — must be true
parameters[...]required — values for each paramname from /parameters

Request

curl -X POST "https://kyckaro.in/api/v1/sessions/3f6c2a1e-8b1d-4c55-9f0e-2d6a7b9c1e44/pull" \
  -H "Authorization: Bearer kk_test_xxxxxxxx" \
  -H "Accept: application/json" \
  -d "orgid=000027" \
  -d "doctype=HSCER" \
  -d "consent=true" \
  -d "parameters[year]=2015" \
  -d "parameters[rollno]=1234567"

Response 200

{
    "success": true,
    "data": {
        "uri": "in.gov.cbse-HSCER-201512345678"
    },
    "meta": {
        "request_id": "9b1f…",
        "charged": 0
    }
}