---
title: Get Eaadhar with XML API
slug: v3-gateway/get-eaadhar-with-xml-api
description: Learn how to easily retrieve e-Aadhaar data from your Diglocker account using our API call. Log in, pass your access token as the authorization header, and authorize your "requestId" parameter. Our document includes helpful sample commands, input paramete
createdAt: 2023-05-24T06:18:43.000Z
---

## Introduction

Once the end user has given the consent to his/her Diglocker account, you can use this API call to get the e-Aadhaar data along with xmlFileLink. You will get the last 4 digits of the Aadhaar card, Name, DOB, Address, etc.

## How to call the API

You will need to log in before sending the request. You are required to pass the access token received from the login call, as the authorization header in the request.

## API Input Guidelines

You need to make sure that your input parameter requestId is authorized before you call this API.

### Sample Curl

::::Tabs
:::Tab{title="Preproduction"}
```curl
curl --location --request POST 'https://api-preproduction.signzy.app/api/v3/digilocker/geteaadhaarwithxml' \
--header 'Authorization: <auth-token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "requestId" : "<request ID>"
}'
```
:::

:::Tab{title="Production"}
```curl
curl --location --request POST 'https://api.signzy.app/api/v3/digilocker/geteaadhaarwithxml' \
--header 'Authorization: <auth-token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "requestId" : "<request ID>"
}'
```
:::
::::

### Input Parameters

| **FIELD** | **DESCRIPTION** | **TYPE** | **REQUIRED** |
| --------- | --------------- | -------- | ------------ |
| requestId | ...requestId... | String   | Required     |

## Sample Response

:::CodeblockTabs
200

```json
{
    "result": {
        "name": "",
        "uid": "",
        "dob": "",
        "gender": "",
        "x509Data": {
            "subjectName": "",
            "certificate": "",
            "details": {
                "version": <version>,
                "subject": {
                    "countryName": "",
                    "organizationName": "",
                    "organizationalUnitName": "",
                    "postalCode": "",
                    "stateOrProvinceName": "",
                    "streetAddress": "",
                    "houseIdentifier": "",
                    "serialNumber": "",
                    "commonName": ""
                },
                "issuer": {
                    "countryName": "",
                    "organizationName": "",
                    "organizationalUnitName": "",
                    "commonName": ""
                },
                "serial": "",
                "notBefore": "",
                "notAfter": "",
                "subjectHash": "",
                "signatureAlgorithm": "",
                "fingerPrint": "",
                "publicKey": {
                    "algorithm": ""
                },
                "altNames": [],
                "extensions": {
                    "basicConstraints": "",
                    "keyUsage": "",
                    "extendedKeyUsage": "",
                    "authorityKeyIdentifier": "",
                    "subjectKeyIdentifier": "",
                    "subjectAlternativeName": "",
                    "cRLDistributionPoints": "",
                    "authorityInformationAccess": "",
                    "certificatePolicies": ""
                }
            },
            "validAadhaarDSC": ""
        },
        "address": "",
        "photo": "",
        "splitAddress": {
            "district": [
                ""
            ],
            "state": [
                [
                    ""
                ]
            ],
            "city": [
                ""
            ],
            "pincode": "",
            "country": [
                "IN",
                "IND",
                "INDIA"
            ],
            "addressLine": "",
            "landMark": ""
        }
    "xmlFileLink":""
    }
}

```
:::

### Response Parameter

| **FIELD**       | **DESCRIPTION**                                                                               | **TYPE** |
| --------------- | --------------------------------------------------------------------------------------------- | -------- |
| result          | Contains content of response                                                                  | String   |
| name            | ...name...                                                                                    | String   |
| dob             | ...date of birth...                                                                           | String   |
| gender          | ...gender...                                                                                  | String   |
| x509Data        | ...data regarding the authenticity provided with the eaadhaar...                              | Object   |
| validAadhaarDSC | ...is eaadhaar certificate valid or not (yes/no)...                                           | String   |
| address         | ...address...                                                                                 | String   |
| photo           | ...link to photo as on eaadhaar...                                                            | String   |
| splitAddress    | ...contains components of address...                                                          | Object   |
| district        | \[ "...district name..."]                                                                     | Array    |
| state           | \[ "...state name...", "...2 digit state code..." ]                                           | Array    |
| city            | \["...city name..."]                                                                          | Array    |
| pincode         | ...pincode...                                                                                 | String   |
| country         | \[ "...2 digit ISO country name...", "...3 digit ISO country name...", "...country name..." ] | Array    |
| addressLine     | ...address...                                                                                 | String   |
| xmlFileLink     | ....xml flle link (Aadhar XML Received from Digilocker)                                       | String   |

## Sample Error

:::CodeblockTabs
```json
{
  "error": {
    "statusCode": "...status code...",
    "name": "error",
    "message": "....reason....",
    "status": "...status code...",
    "reason" : "",
    "type" : ""
  }
}
```

400

```json
{
    "error": {
        "reason": "BAD_REQUEST",
        "status": 400,
        "message": "INVALID requestId",
        "type": "Bad Request",
        "statusCode": 400,
        "name": "error"
    }
}
```

400

```json
{
    "error": {
        "reason": "AUTH_FAIL",
        "status": 400,
        "message": "This requestId is not authorized to perform this action.",
        "type": "Bad Request",
        "statusCode": 400,
        "name": "error"
    }
}
```

401

```json
{
    "message": "No API key found in request"
}
```
:::

### Error Parameter

| **PARAMETER NAME** | **DESCRIPTION**                    |
| ------------------ | ---------------------------------- |
| error              | This parameter contains the error. |
| error.name         | the name of the error              |
| error.message      | the error message                  |
| error.status       | status of the api                  |
| error.statusCode   | Request Status code from Signzy    |
| error.reason       | Reason for error                   |
| error.type         | Type of the error                  |

### Error Codes

| **CODE** | **DESCRIPTION**                   |
| -------- | --------------------------------- |
| 400      | Invalid inputs                    |
| 401      | Authorization token is invalid    |
| 409      | If Upstream service not reachable |

:::hint{type="success"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](#).
:::

