---
title: Pull Documents API
slug: v2-apis/pull-documents-api
description: Learn how to effectively use the Pull documents API from Signzy for retrieving PAN documents from Digilocker. This comprehensive document covers step-by-step guidelines on calling the API, along with sample Curl commands tailored for preproduction and pro
createdAt: 2022-09-19T07:28:09.000Z
---

# Introduction

This Pull documents API from signzy is designed to fetch the PAN documents from Digilocker.

## How to call the API

You will need to[ login](https://docs.signzy.com/sandboxapis) before sending Pull document request. You are required to pass the access token received from the login call, as authorization header in the Request along with the requestId, name , document type and PAN number.

## API Input Guidelines

- &#x20;You need to provide the alpha numeric requestId.
- Doc type will be PANCR for PAN card for eg.
- You can get requestId from the [Create URL API.](https://docs.signzy.com/sandboxapis/create-url-api)

## Sample Curl

::::Tabs
:::Tab{title="Preproduction"}
```curl
.Idcurl --location --request POST 'https://preproduction.signzy.tech/api/v2/patrons/..patronId./digilockers' \
--header 'accept-language: en-US,en;q=0.8' \
--header 'content-type: application/json' \
--header 'Authorization: ...<accesstoken>.... \
--data-raw '{
    "task": "pullDocuments",
    "essentials": {
        "requestId": "<request id number>",
        "docType": "PANCR",
        "name" : "...name...",
        "panNumber" : "...panNumber..."
        
    }
}'
```
:::

:::Tab{title="Production"}
```curl
.Idcurl --location --request POST 'https://signzy.tech/api/v2/patrons/..patronId./digilockers' \
--header 'accept-language: en-US,en;q=0.8' \
--header 'content-type: application/json' \
--header 'Authorization: ...<accesstoken>.... \
--data-raw '{
    "task": "pullDocuments",
    "essentials": {
        "requestId": "<request id number>",
        "docType": "PANCR",
        "name" : "...name...",
        "panNumber" : "...panNumber..."
        
    }
}'
```
:::
::::

## Input Parameters

| **PARAMETERS** | **DESCRIPTION**                                                                           | **TYPE** | VALUE (REQUIRED OR OPTIONAL) |
| -------------- | ----------------------------------------------------------------------------------------- | -------- | ---------------------------- |
| Authorization  | Contains the id parameter returned from the login step                                    | String   | REQUIRED                     |
| content-type   | application/json                                                                          | String   | REQUIRED                     |
| requestId      | RequestId token from [create URL API](https://docs.signzy.com/sandboxapis/create-url-api) | String   | REQUIRED                     |
| docType        | Name of the DocType to be called                                                          | String   | REQUIRED                     |
| name           | Name of the person                                                                        | String   | REQUIRED (conditional)       |
| panNumber      | Pan Number of the person                                                                  | String   | REQUIRED (conditional)       |

## Sample Response

```json
{	
essentials: {	
    requestId: "<request id>",	
    docType: "PANCR",	
    name: "...name....",	
    panNumber: "...panNumber..."	
},	
id: "<token>",	
patronId: "..<patron Id>..",	
task: "pullDocuments",	
result: {	
    pdf: ".....URL to pdf file.....",	
    xml: "....URL to xml file......"	
}	
}	
```

## Response Parameter

| **PARAMETERS**       | **DESCRIPTION**                                                                       |
| -------------------- | ------------------------------------------------------------------------------------- |
| essentials           | Contains the input data                                                               |
| essentials.requestId | Request ID from [Create URL API.](https://docs.signzy.com/sandboxapis/create-url-api) |
| essentials.docType   | Type of the document                                                                  |
| essentials.name      | Name of the person                                                                    |
| essentials.panNumber | PAN number of the person                                                              |
| id                   | Unique ID of the response                                                             |
| patronId             | Unique ID generated from the login call                                               |
| task                 | task is pullDocuments for this call                                                   |
| result               | It contians the actual result from the response                                       |
| result.pdf           | Contains the URL to the document in pdf file format                                   |
| result.xml           | Contains the URL to the document in xml file format                                   |

***

:::hint{type="info"}
### 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](#).
:::

