---
title: Extraction API
slug: v2-apis/extraction-api
description: Learn how to use the API to extract Voter ID data from Indian Voter IDs. This comprehensive document includes sample cURL commands, input parameters, and API response format. Discover how to provide front and back images or URLs as input and receive the v
createdAt: 2022-09-15T07:43:09.000Z
---

## Introduction

This API is used to extract Voter Id data from any Indian Voter Id by uploading either front image & back image or URLs of the images as input.

## How to call the API&#x20;

Before going for Auto reading calls, you first need to create an Identity object. Need to pass accessToken and itemid obtained from identity call along with other input parameters

## API Input Guidelines

Front & back image or URLs of the images should be given as input to get the data.

## Step 1: Hit Identities API

### Sample cURL

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

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

### Input Parameters

| **Parameter Name** | **Required/Optional** | **Description**                                        |
| ------------------ | --------------------- | ------------------------------------------------------ |
| Content-Type       | Required              | application/json                                       |
| Authorization      | Required              | Contains the id parameter returned from the login step |
| type               | Required              | Type of identity                                       |
| email              | Required              | e-mail ID                                              |
| callbackurl        | Required              | URL where response will be posted                      |
| images             | Required              | Image URL                                              |

***

### Sample Response&#x20;

```json
{
    "type": "voterid",
    "email": "ankur.rand@signzy.com",
    "callbackUrl": "",
    "images": [],
    "accessToken": "",
    "autoRecognition": [],
    "verification": [],
    "forgeryCheck": [],
    "id": "",
    "patronId": ""
}
```

### Response Parameter

| **Parameter Name** | **Description**                        |
| ------------------ | -------------------------------------- |
| type               | Type of identity                       |
| email              | Email Id as Input                      |
| callbackUrl        | URL where response will be posted      |
| images             | Url to the images                      |
| accessToken        | This is provided by identities API     |
| autoRecognition    | Auto recognises 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 receives 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": "",
    "accessToken": "",
    "task": "autoRecognition",
    "essentials": {
    }
}'
```
:::

:::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": "",
    "accessToken": "",
    "task": "autoRecognition",
    "essentials": {
    }
}'
```
:::
::::

### 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 extraction”         |
| itemId             | Required              | Contains the identity item id                          |
| accessToken        | Required              | This is provided by the identities API                 |
| task               | Required              | The type of task performed - “Auto Recognition”        |
| essentials         | Required              | Contains the essential output data                     |

### Sample API Response

```json
 {
    "service": "Identity",
    "itemId": "",
    "task": "autoRecognition",
    "essentials": {},
    "accessToken": "",
    "id": "",
    "response": {
        "result": {
            "name": "",
            "fatherName": "",
            "address": "",
            "state": "HARYANA",
            "ageAsOn": "",
            "dob": "",
            "gender": "",
            "yob": "",
            "epicNumber": "",
            "splitAddress": {
                "district": [
                    ""
                ],
                "state": [
                    [
                        "",
                        "HR"
                    ]
                ],
                "city": [
                    ""
                ],
                "pincode": "121004",
                "country": [
                    "IN",
                    "IND",
                    "INDIA"
                ],
                "addressLine": ""
            }
        },
        "url": [
            "frontImage.jpg",
            "backImage.jpg"
        ],
        "callbackUrl": "",
        "instaneId": ""
    }
}
    
```

### Output Parameters

| **Parameter Name**                       | **Description**                                                   |
| ---------------------------------------- | ----------------------------------------------------------------- |
| service                                  | Type of Signzy service - “identity extraction”                    |
| itemId                                   | Contains the identity item id                                     |
| task                                     | The type of task performed - “Auto Recognition”                   |
| essentials                               | Contains the essential output data                                |
| accessToken                              | Contains the access token that was received from identity request |
| id                                       | Contains the unique Id of the snoop request                       |
| response                                 | Contains the output files                                         |
| response.result                          | Contains the outcome result                                       |
| response.result.name                     | Contains name of Voter Id holder                                  |
| response.result.fatherName               | Contains father name or husband name of the Voter Id holder       |
| response.result.address                  | Contains address of the identity holder                           |
| response.result.state                    | Contains state name                                               |
| response.result.ageAson                  | Contains age of the identity holder                               |
| response.result.dob                      | Contains date of birth of the identity holder                     |
| response.result.gender                   | Contains gender information                                       |
| response.result.yob                      | Contain year of birth of the identity holder                      |
| response.result.epicNumber               | Contain epic number of the Voter Identity                         |
| response.result.splitAddress             | Contains split address details                                    |
| response.result.splitAddress.district    | Contains district name                                            |
| response.result.splitAddress.state       | Contains state name                                               |
| response.result.splitAddress.city        | Contains city name                                                |
| response.result.splitAddress.pincode     | Contains pincode of the address                                   |
| response.result.splitAddress.country     | Contains country name                                             |
| response.result.splitAddress.addressline | Contains house number etc                                         |
| response.url                             | Contains images URLs                                              |
| response.callbackUrl                     | URL where response will be posted                                 |
| response.instanceId                      | Contains unique Id                                                |



:::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).
:::
