---
title: Passport extraction V2
slug: api-marketplace/passport-extraction-v2
description: Learn about the API endpoints and request data for creating Identity objects and making Snoops requests. Create various types of identity objects like passport or driving license. Include parameters like type, email, callback URL, and images in the reques
createdAt: 2023-04-19T11:42:05.000Z
---

## Introduction

The Passport Extraction API is designed to extract data from passport images. You can input the URL of the passport image, and the API will return structured data extracted from the image, such as the passport holder's name, date of birth, passport number, address and other relevant details.

### API Endpoint's

### Identity Object

:::CodeblockTabs
UAT Endpoint

```text
POST https://preproduction.signzy.tech/api/v2/patrons/<patron-id>/identities
```
:::

:::CodeblockTabs
Production Endpoint

```text
POST https://signzy.tech/api/v2/patrons/<patron-id>/identities
```
:::

### Headers

| Key           | Value                                                |
| ------------- | ---------------------------------------------------- |
| Authorization | access token (returned as id field of login request) |
| Content-type  | application/json                                     |

### Request Data

```json
{
    "type": "passport",
    "email": "admin@signzy.com",
    "callbackUrl": "https://your-domain.com/your-callback-system",
    "images": [
      "url", "url"
    ]
}
```

| PARAMETERS  | DESCRIPTION                                                                                                                                                                             | TYPE   | VALUE (COMPULSORY OR OPTIONAL) |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------ |
| type        | **Supported type parameter for creation of Identity objects**<br />- individualPan<br />- businessPan<br />- aadhaar<br />- passport<br />- drivingLicence<br />- cheque<br />- voterid | String | COMPULSORY                     |
| email       | E-mail can't be empty                                                                                                                                                                   | String | COMPULSORY                     |
| callbackUrl | callbackUrl is where the data is posted on each activity performed on this Identity object.                                                                                             | String | COMPULSORY                     |
| images      | blank                                                                                                                                                                                   | List   | COMPULSORY                     |

### Response

```json
{
              "type": "passport",
              "email": "admin@signzy.com",
              "callbackUrl": "https://your-domain.com/your-callback-system",
              "images": [
                "url", "url"
              ],
              "autoRecognition": [],
              "verification": [],
              "forgeryCheck": [],
              "accessToken": "..access-token-for-the-snoop-request..",
              "id": "..itemId-for-the-snoop-request....",
              "patronId": "..your-id-into-signzy-system-(userId-returned-from-the-login-call).."
            }

```

***

### Snoops

:::CodeblockTabs
UAT Endpoint

```text
POST https://preproduction.signzy.tech/api/v2/snoops
```
:::

:::CodeblockTabs
Production Endpoint

```text
POST https://signzy.tech/api/v2/snoops
```
:::

### Headers

| Key           | Value                                                |
| ------------- | ---------------------------------------------------- |
| Authorization | access token (returned as id field of login request) |
| Content-type  | application/json                                     |

### Request Data

```json
{
    "service": "Identity",
    "itemId": "<..itemId-from-the-Identity-Object-request....>",
    "task": "autoRecognition",
    "accessToken": "<..access-token-from-the-Identity-Object-request..>",
    "essentials": {
       
    }
}
```

| Parameter  | Type   | Required | Description                                                                                                    |
| ---------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------- |
| task       | string | Yes      | The task to be performed by the API. For the driving license verification, the value should be "verification". |
| essentials | object | Yes      | blank                                                                                                          |

### Response

```json
{
      "service": "Identity",
      "itemId": "...item id...",
      "task": "autoRecognition",
      "essentials": {},
      "accessToken": "...access token...",
      "id": "..id...",
      "response": {
        "files": ["..image url..."],
        "id": 3920,
        "instance": {},
        "result": {
          "parentsGuardianName": "..parentsGuardianName...",
          "issueDate": "..issueDate..",
          "expiryDate": "..expiryDate..",
          "birthDate": "..birthDate..",
          "name": "..name..",
          "country": [
            "..country.."
          ],
          "nationality": "..nationality..",
          "sex": "F/M/T",
          "address": "..address..",
          "pincode": "..pincode..",
          "passportNumber": "..passportNumber..",
          "fileNumber": "..fileNumber..",
          "placeOfBirth": "..placeOfBirth..",
          "placeOfIssue": "..placeOfIssue..",
          "splitAddress": {
            "district": [
              "..district.."
            ],
            "state": [
              [
                "..state.."
              ]
            ],
            "city": [
              "..city.."
            ],
            "pincode": "..pincode..",
            "country": [
              "IN",
              "IND",
              "INDIA"
            ],
            "addressLine": "..addressLine.."
            },
            "summary": {
                "number": "..passportNumber..",
                "name": "..name..",
                "dob": "..dob...",
                "address": "",
                "splitAddress": {
                    "district": [
                      "..district.."
                    ],
                    "state": [
                      [
                        "..state.."
                      ]
                    ],
                    "city": [
                      "..city.."
                    ],
                    "pincode": "..pincode..",
                    "country": [
                      "IN",
                      "IND",
                      "INDIA"
                    ],
                    "addressLine": "..addressLine.."
                },
                "gender": "F/M/T",
                "guardianName": "..guardianName..",
                "issueDate": "..issueDate...",
                "expiryDate": "..expiryDate.."
              }
        }
      }
    }
```

