---
title: Digilocker 2.0 Get Files
slug: api-marketplace/digilocker-20-get-files
createdAt: 2026-07-29T09:48:25.646Z
---

## Introduction

The Get Files API is a powerful solution that simplifies the process of retrieving file IDs from Digilocker by giving requestID (fetched from Create URL API) as input. The file IDs are then used to fetch files in pdf and xml format from Pull documents v2 API.

**Note**: If PAN is not linked with Digilocker Digilocker account of customer, you won't find the file details in here. Please use Pull documents v2 API for pulling PAN in that case.

***

## API details

### Endpoint

:::CodeblockTabs
Production 2.0 Environment

```none
POST https://api.signzy.app/api/v3/digilocker-v2/getFiles
```
:::

:::CodeblockTabs
UAT/Testing 2.0 Environment

```none
POST https://api-preproduction.signzy.app/api/v3/digilocker-v2/getFiles
```
:::

***

### Request headers

| Name          | Value            | Required  | Description                                                                                                |
| ------------- | ---------------- | --------- | ---------------------------------------------------------------------------------------------------------- |
| Content-Type  | application/json | Mandatory | The type of content that the request body contains.                                                        |
| Authorization | XXXXXXXXXXXXXXX  | Mandatory | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Request body parameter

| Parameter | Data Type        | Description                                                                                                                                                                                                                                                                                 | Required  |
| --------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| requestId | String           | Unique ID allocated after the authorization in digilocker iframe. This is returned as “**requestId**” in **[Create URL](https://docs.signzy.com/api-marketplace/create-url-api)** API.                                                                                                      | Mandatory |
| fileIds   | Array of Strings | List of file IDs of the specific user for which details are requested.<br />File ID is a unique ID that contains the issuer ID , DocType and the unique Identification number of the specific document.<br />(For example: in.gov.transport-DRVLC-Driving License number of the individual) | Mandatory |

```json
{
    "requestId" : "6523e2dc5a9f9000112b19d8",
    "fileIds" : [
        "in.gov.transport-DRVLC-TN8920000007545"
    ]
}
```

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/digilocker-v2/getFiles' \
--header 'Authorization: <Your Access token>' \
--header 'Content-Type: application/json' \
--data '{
    "requestId" : "6523dcd58cd545434f7af0a2"
}'
```

```nodejs
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://api-preproduction.signzy.app/api/v3/digilocker-v2/getFiles',
  'headers': {
    'Authorization': '<Your Access Token>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "requestId": "6523e2dc5a9f9000112b19d8",
    "fileIds": [
      "in.gov.transport-DRVLC-TN6820210007545"
    ]
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

```

```python
import requests
import json

url = "https://api-preproduction.signzy.app/api/v3/digilocker-v2/getFiles"

payload = json.dumps({
  "requestId": "6523e2dc5a9f9000112b19d8",
  "fileIds": [
    "in.gov.transport-DRVLC-TN6820210007545"
  ]
})
headers = {
  'Authorization': '<Your Access Token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/digilocker-v2/getFiles"
  method := "POST"

  payload := strings.NewReader(`{
    "requestId" : "6523e2dc5a9f9000112b19d8",
    "fileIds" : [
        "in.gov.transport-DRVLC-TN6820210007545"
    ]
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "<Your Access Token>")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response body parameters

| Parameter                | Data Type | Description                                                                                                                                                                                        |
| ------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| result                   | Object    | Contains the result of the task.                                                                                                                                                                   |
| result.files             | Array     | List of files associated with the requested file IDs.                                                                                                                                              |
| result.files.name        | String    | Name of the document.                                                                                                                                                                              |
| result.files.type        | String    | Type of the document. Possible response “**file**”                                                                                                                                                 |
| result.files.size        | String    | Size of the document file. (If available).                                                                                                                                                         |
| result.files.date        | String    | Date when the file details are fetched. In format **DD/MM/YYYY**.                                                                                                                                  |
| result.files.parent      | String    | Parent of the user. (If available)                                                                                                                                                                 |
| result.files.mime        | Array     | Multipurpose Internet Mail Extensions (MIME).Specifies the available format of data.                                                                                                               |
| result.files.doctype     | String    | The type of document. Refer to Get List of Document API for all possible responses.                                                                                                                |
| result.files.description | String    | Description of the document. Refer to Get List of Document API for all possible responses.                                                                                                         |
| result.files.issuerid    | String    | The issuer’s ID associated with the document.                                                                                                                                                      |
| result.files.issuer      | String    | The issuer of the document.                                                                                                                                                                        |
| result.files.id          | String    | Unique ID that contains the issuer ID , DocType and the unique Identification number of the specific document.<br />(For example: in.gov.transport-DRVLC-Driving License number of the individual) |
| result.files.file        | Object    | Documents in different formats                                                                                                                                                                     |
| result.files.file.pdf    | String    | Documents in pdf format                                                                                                                                                                            |
| result.files.file.xml    | String    | Documents in xml format                                                                                                                                                                            |

:::CodeblockTabs
200

```json
{
    "result": {
        "files": [
            {
                "name": "PAN Verification Record",
                "type": "file",
                "size": "",
                "date": "04/11/2025",
                "parent": "",
                "mime": [
                    "application/json",
                    "application/xml",
                    "application/pdf"
                ],
                "doctype": "PANCR",
                "description": "PAN Verification Record",
                "issuerid": "in.gov.pan",
                "issuer": "Income Tax Department",
                "id": "in.gov.pan-PANCR-NOGPS6763M",
                "file": {
                    "pdf": "https://persist.wayne-rta.com/api/files/1457071652/download/38ae6b866c7f4cf0baa8ea3a1ee221d1951ad839eae4114a8acf7eccf55494f.pdf",
                    "xml": "https://persist.wayne-rta.com/api/files/1457071588/download/aeb2c4d868514987bcb708519e47b1c841fc149b8bb4781a04f5f999416f26d.xml"
                }
            }
        ]
    }
}
```

400

```json
// If the customer denies consent for accessing data on the digilocker screen
{
    "error": {
        "statusCode": 400,
        "name": "error",
        "message": "User denied the consent, please try again",
        "status": 400,
        "reason": "AUTH_FAIL",
        "type": "Bad Request"
    }
}

// If the customer clicks on “Return to Signzy” anytime during the digilocker journey
{
    "error": {
        "statusCode": 400,
        "name": "error",
        "message": "User cancelled the journey, please try again",
        "status": 400,
        "reason": "AUTH_FAIL",
        "type": "Bad Request"
    }
}

// Invalid Request ID

```

401

```json
// If Authorization token is not passed
{
    "message": "No API key found in request"
}

// If Authorization token is invalid
{
    "message": "Invalid authentication credentials"
}

// You are trying to fetch details of other person
{
    "error": {
        "reason": "AUTHORIZATION_FAILED",
        "status": 401,
        "message": "User is not Authorized to fetch details of 652523835a9f9000112b1ee6",
        "type": "Unauthorized",
        "statusCode": 401,
        "name": "error"
    }
}

// User has not yet completed their journey
{
    "error": {
        "reason": "AUTH_FAIL",
        "status": 401,
        "message": "The customer has not completed their digilocker consent journey yet, please wait for sometime or create a new request.",
        "type": "Unauthorized",
        "statusCode": 401,
        "name": "error"
    }
}

// Passing invalid fileIds
{
    "error": {
        "reason": "BAD_REQUEST",
        "status": 400,
        "message": "One or more of the ids supplied are invalid",
        "type": "Bad Request",
        "statusCode": 400,
        "name": "error"
    }
}

// FileIds not passed
{
    "error": {
        "reason": "BAD_REQUEST",
        "status": 400,
        "message": "invalid fileIds passed",
        "type": "Bad Request",
        "statusCode": 400,
        "name": "error"
    }
}
```

404

```json
{
    "error": {
        "reason": "NOT_FOUND",
        "status": 404,
        "message": "RequestID not Found",
        "type": "Not Found",
        "statusCode": 404,
        "name": "error"
    }
}
```

500

```json
{
    "error": {
        "reason": "Internal Server Error.",
        "message": "Internal Server Error.",
        "status": 500,
        "type": "Error",
        "statusCode": 500
    }
}
```
:::

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!
