---
title: Fetch API
slug: v2/XXBD-fetch-api
description: Learn how to use the Fetch API to retrieve PAN card details for business PAN holders. This document walks you through the steps to call the API, including sample CURL requests. Understand the input parameters and structure of the API response, along with 
createdAt: 2022-09-15T04:48:51.000Z
---

## Introduction

The Fetch API is used to retrieve or ‘fetch’ certain details from the PAN card like name, Date of Issue, and so on for Business PAN holders

## How to call the API

Before fetching the details via PAN number, you first need to create an Identity object. For best results, please make sure that the image you use fits tightly in camera view and is horizontally aligned. Each image/PDF should be less than 2 MB.

## API Input Guidelines

- PAN number in upper/lower case.

## Step 1: Hit Identities API

### Sample CURL Request

::::Tabs
:::Tab{title="Preproduction"}
```curl
curl --location --request POST '<https://preproduction.signzy.tech/api/v2/patrons/..patronId../identities'> \
--header 'Authorization: <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "bussinessPan",
    "email": "<email Id>",
    "callbackUrl": "<https://www.w3schools.com",>
    "images": [<images Url>]
}'
```
:::

:::Tab{title="Production"}
```curl
curl --location --request POST '<https://signzy.tech/api/v2/patrons/..patronId../identities'> \
--header 'Authorization: <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "bussinessPan",
    "email": "<email Id>",
    "callbackUrl": "<https://www.w3schools.com",>
    "images": [<images Url>]
}'
```
:::
::::

### Input Parameters

| **Parameters Name** | **Description**                                        | **Required/Optional** |
| ------------------- | ------------------------------------------------------ | --------------------- |
| Authorization       | Contains the id parameter returned from the login step | Required              |
| Content-Type        | application/json                                       | Required              |
| type                | Type of Identity                                       | Required              |
| callbackurl         | URL where response will be posted                      | Required              |
| images              | URL of the PAN image                                   | Optional              |

### Sample Response

```json
{
    "type": "bussinessPan",
    "email": " ",
    "callbackUrl": "<https://www.w3schools.com",>
    "images": [],
    "accessToken": " ",
    "autoRecognition": [],
    "verification": [],
    "forgeryCheck": [],
    "id": " ",
    "patronId": " "
}
```

### Response Parameter

| **Parameter Name** | **Description**                        |
| ------------------ | -------------------------------------- |
| accessToken        | This is provided by identities API     |
| autoRecognition    | Auto recognizes text from upload image |
| verification       | verification is done                   |
| forgeryCheck       | Forgery check is done                  |
| id                 | Unique user id                         |
| patronId           | Unique patron id                       |

###

***

## Step 2: Hit Snoops API and receive a response

### Sample Curl

::::Tabs
:::Tab{title="Preproduction"}
```curl
curl --location --request POST 'https://preproduction.signzy.tech/api/v2/snoops' \
--header 'Content-Type: application/json' \
--header 'Authorization: <token>' \
--data-raw '{
    "service": "Identity",
    "itemId": " ",
    "task": "fetch",
    "accessToken": " ",
    "essentials": {
        "number": "<Bussiness PAN number> ",
        "name":"<Name of the pan card holder>",
        "fuzzy": "<true/false">
    }
}'
```
:::

:::Tab{title="Production"}
```curl
curl --location --request POST 'https://signzy.tech/api/v2/snoops' \
--header 'Content-Type: application/json' \
--header 'Authorization: <token>' \
--data-raw '{
    "service": "Identity",
    "itemId": " ",
    "task": "fetch",
    "accessToken": " ",
    "essentials": {
        "number": "<Bussiness PAN number> ",
        "name":"<Name of the pan card holder>"
        "fuzzy": "<true/false"
    }
}'
```
:::
::::

### Input Parameters

| **PARAMETER NAME** | **Required/Optional** | **DESCRIPTION**                                        |
| ------------------ | --------------------- | ------------------------------------------------------ |
| Authorization      | Required              | Contains the id parameter returned from the login step |
| Content-Type       | Required              | application/json                                       |
| service            | Required              | Type of Signzy service - “identity”                    |
| itemId             | Required              | Contains the identity item id                          |
| accessToken        | Required              | Identity access token                                  |
| task               | Required              | The type of task performed - “Fetch”                   |
| essentials         | Required              | Contains the essential output data                     |
| essentials.name    | Optional              | Name of the individual                                 |
| essentials.number  | Required              | PAN number of the individual                           |
| essentials.fuzzy   | Optional              | Fuzzy match the name                                   |

### API Response

```json
{
    "service": "Identity",
    "itemId": " ",
    "task": "fetch",
    "essentials": {
        "number": " ",
        "instance": {
            "id": " ",
            "callbackUrl": " "
        }
    },
    "accessToken": " ",
    "id": " ",
    "response": {
        "number": " ",
        "id": 91,
        "instance": {
            "id": " ",
            "callbackUrl": " "
        },
        "result": {
            "number": " ",
            "name": "FREEWAYS MULTITRADE PRIVATE LIMITED",
            "dateOfIssue": ""
        }
    }
}
```

### Output Parameters

| **PARAMETER NAME**              | **DESCRIPTION**                                                                                            |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| task                            | The type of task performed - “Fetch”                                                                       |
| essentials                      | Contains the essential output data                                                                         |
| essentials.name                 | Name of the individual                                                                                     |
| essentials.number               | PAN number of the Business                                                                                 |
| essentials.instance.id          | ID of the instance                                                                                         |
| essentials.instance.callBackUrl | Endpoint where the response will be posted                                                                 |
| essentials.fuzzy                | it performs the name match if it is true and doesnot if false                                              |
| accessToken                     | Identity access token                                                                                      |
| id                              | ID of the response                                                                                         |
| response.number                 | PAN number                                                                                                 |
| response.id                     | Response ID                                                                                                |
| response.name                   | Name of the PAN card holder                                                                                |
| response.fuzzy                  | it performs the name match if it is true and doesnot if false                                              |
| instance.id                     | ID of the instance                                                                                         |
| instance.callbackUrl            | endpoint where the response is posted                                                                      |
| result                          | This holds final result parameters of the response.                                                        |
| result.name                     | The name of the PAN holder (or organization name for business PAN)                                         |
| result.fatherName               | The father's name of the PAN holder (for individual PAN only)                                              |
| result.dateOfIssue              | This parameter holds the date of birth (for individual PAN) or the date of issue (in case of business PAN) |
| result.number                   | The PAN number of the individual/organization                                                              |



:::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](mailto\:help@signzy.com).
:::
