---
title: "Get DigiLocker Document API Reference"
description: "Retrieve verified Aadhaar details from DigiLocker after the customer completes the consent journey."
canonical: "https://eps.eko.in/docs/digilocker-get-document"
---


> **Canonical URL:** https://eps.eko.in/docs/digilocker-get-document
> This is a machine-readable Markdown version of the page for AI agents and LLMs. The primary (HTML) version lives at the canonical URL above.

# Get DigiLocker Document API Reference

`POST https://staging.eko.in/ekoapi/v3/tools/kyc/digilocker/document`

Retrieve verified Aadhaar details from DigiLocker after the customer completes the consent journey.

Fetches the verified Aadhaar (or other government document) data from DigiLocker using the `reference_id` obtained from Create DigiLocker URL. Must be called after the customer has completed authorisation on DigiLocker and been redirected back. Returns structured identity data extracted from the verified document.

> View product & pricing details: [DigiLocker Integration](https://eps.eko.in/products/digilocker-api.md)

## Body parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| initiator_id | string | yes | Registered mobile number of the API user (see Platform Credentials). e.g. 9962981729 |
| user_code | string | yes | User code of the retailer/agent the service is run for. e.g. 20810200 |
| client_ref_id | string | no | Unique reference id per API call, generated by your system. e.g. REQ-20260101-001 |
| document_type | array | yes | List of document types to retrieve (e.g. ["AADHAAR"]). e.g. AADHAAR |
| verification_id | string | yes | Unique verification ID returned by the Create DigiLocker URL API. e.g. vrf_digilocker_abc123 |
| reference_id | string | yes | Reference ID from the Create DigiLocker URL API response. e.g. 7483920 |

## Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| developer_key | string | yes | Static API key issued to your account after KYC. |
| secret-key | string | yes | Dynamic per-request signature: base64(HMAC-SHA256(timestamp, base64(access_key))). |
| secret-key-timestamp | string | yes | Current time in milliseconds since UNIX epoch, used to compute secret-key. Must match server time. |
| content-type | string | yes | application/json e.g. application/json |

## Response

⭐ marks fields highlighted as verifiable.

| Field | Type | Description |
| --- | --- | --- |
| status | number | Primary success indicator (0 = success). |
| message | string | Human-readable response / error message. |
| response_status_id | number | Granular status id; see the shared error-codes table. |
| response_type_id | number | A unique id for every possible response shape (success or error) — useful for client logic branching and analytics. |
| data | object | API-specific response payload. |
| data.documents | array | List of verified documents retrieved from DigiLocker. |
| data.documents.document_type ⭐ | string | Type of document retrieved (e.g. AADHAAR). |
| data.documents.name ⭐ | string | Full name as per the verified document. |
| data.documents.dob ⭐ | string | Date of birth from the verified document. |
| data.documents.gender ⭐ | string | Gender as per document: M, F, or T. |
| data.documents.masked_aadhaar ⭐ | string | Aadhaar number with first 8 digits masked. |
| data.documents.address ⭐ | object | Residential address from the verified Aadhaar. |
| data.documents.address.house ⭐ | string | House or flat number. |
| data.documents.address.street ⭐ | string | Street or locality name. |
| data.documents.address.village_or_city ⭐ | string | Village or city. |
| data.documents.address.district ⭐ | string | District. |
| data.documents.address.state ⭐ | string | State. |
| data.documents.address.pincode ⭐ | string | 6-digit postal code. |
| data.documents.photo ⭐ | string | Base64-encoded photograph from the Aadhaar document. |
| data.documents.issue_date | string | Date when the document was issued. |
| data.verification_status ⭐ | string | Overall DigiLocker verification status: SUCCESS or PENDING. |

## Example request

```json
{
  "initiator_id": "9962981729",
  "user_code": "20810200",
  "client_ref_id": "REQ-20260101-001",
  "document_type": [
    "AADHAAR"
  ],
  "verification_id": "vrf_digilocker_abc123",
  "reference_id": "7483920"
}
```

## Example response

```json
{
  "status": 0,
  "response_status_id": 0,
  "message": "Documents retrieved successfully",
  "response_type_id": 1388,
  "data": {
    "verification_status": "SUCCESS",
    "documents": [
      {
        "document_type": "AADHAAR",
        "name": "Vikram Singh",
        "dob": "12-11-1987",
        "gender": "M",
        "masked_aadhaar": "XXXX-XXXX-2345",
        "photo": "/9j/4AAQSkZJRgABAQ...",
        "issue_date": "01-01-2020",
        "address": {
          "house": "15B",
          "street": "Nehru Street",
          "village_or_city": "Chennai",
          "district": "Chennai",
          "state": "Tamil Nadu",
          "pincode": "600001"
        }
      }
    ]
  }
}
```

## Error scenarios

| Status | Scenario |
| --- | --- |
| 200 | Customer has not completed DigiLocker authorisation yet |
| 200 | Invalid reference_id |
