---
title: Passport verification
slug: api-marketplace/passport-verification
description: Learn how to create an identity object and perform verification tasks using the Snoops API with this comprehensive document. Discover the API endpoints and parameters necessary for creating the object, such as type, email, callbackUrl, and images. Explore
createdAt: 2023-04-19T11:41:58.000Z
---

## Introduction

The Passport Verification API offers a secure method to validate passport details. You can submit passport information via a simple JSON request. The API provides immediate verification results, indicating either positive or negative outcomes, along with the upstream name. This API is essential for efficient, reliable passport verification in compliance-focused environments.

***

## API Details

### Endpoint

:::CodeblockTabs
Production Endpoint

```text
POST https://api.signzy.app/api/v3/passport/verification
```
:::

:::CodeblockTabs
UAT Endpoint

```text
POST https://api-preproduction.signzy.app/api/v3/passport/verification
```
:::

***

### Request body parameters

| **Parameter** | **Data Type** | **Description**                           | **Required** |
| ------------- | ------------- | ----------------------------------------- | ------------ |
| fileNumber    | String        | File number of the individual's passport. | Mandatory    |
| name          | String        | Name of the individual to be verified.    | Mandatory    |
| dob           | String        | The dob of the individual to be verified. | Mandatory    |

```json
{
    "fileNumber": "<file number>",
    "name": "Ram",
    "dob": "14/03/1992",
}
```

### 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. |

***

:::CodeblockTabs
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/passport/verification' \
--header 'Authorization: <Token>' \
--header 'Content-Type: application/json' \
--data '{
    "fileNumber": "<file number>",
    "name": "Ram",
    "dob": "14/03/1992"
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "fileNumber": "<file number>",
  "name": "Ram",
  "dob": "14/03/1992"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/passport/verification',
  headers: { 
    'Authorization': '<Token>', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

```python
import http.client
import json

conn = http.client.HTTPSConnection("api-preproduction.signzy.app")
payload = json.dumps({
  "fileNumber": "<file number>",
  "name": "Ram",
  "dob": "14/03/1992"
})
headers = {
  'Authorization': '<Token>',
  'Content-Type': 'application/json'
}
conn.request("POST", "/api/v3/passport/verification", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

```go
package main

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

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/passport/verification"
  method := "POST"

  payload := strings.NewReader(`{
    "fileNumber": "<file number>",
    "name": "Ram",
    "dob": "14/03/1992"
    
}`)

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

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "<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 response for the input voter id number.                                                                                                       |
| result.verified     | Boolean       | Possible values are true or false.                                                                                                                         |
| result.message      | String        | In case verification is true then the message would be "Verification completed with positive results" else "Verification completed with negative results". |
| result.upstreamName | String        | The individual's name present on upstream data sources.                                                                                                    |

:::CodeblockTabs
200

```json
{
    "result": {
        "verified": "true",
        "message": "Verification completed with positive results",
        "upstreamName": "APURBA KUIRY"
    }
}

// When wrong name is passed in request body
{
    "result": {
        "verified": "false",
        "message": "Verification completed with negative results",
        "upstreamName": "PRANAV RAMDAS BHAGAT"
    }
}

```

400

```json
// when is name is not passed in request body
{
    "error": {
        "name": "error",
        "message": "name is required",
        "status": "Bad Request",
        "statusCode": 400
    }
}

// when fileNumber is not passed in request body
{
    "error": {
        "name": "error",
        "message": "fileNumber is required",
        "status": "Bad Request",
        "statusCode": 400
    }
}

// when dob is not passed in request body
{
    "error": {
        "name": "error",
        "message": "dob is required",
        "status": "Bad Request",
        "statusCode": 400
    }
}

// when fileNumber is passed as empty string
{
    "error": {
        "name": "error",
        "message": "fileNumber is not allowed to be empty string",
        "status": "Bad Request",
        "statusCode": 400
    }
}

// When dob is passed as empty string
{
    "error": {
        "name": "error",
        "message": "dob is not allowed to be empty string",
        "status": "Bad Request",
        "statusCode": 400
    }
}

// When name is passed as empty string
{
    "error": {
        "name": "error",
        "message": "name is not allowed to be empty string",
        "status": "Bad Request",
        "statusCode": 400
    }
}
```

401

```json
// When API key is not passed in headers
{
    "message": "No API key found in request"
}

// When wrong API key is passed in headers
{
    "message": "Invalid authentication credentials"
}
```

404

```json
// When wrong fileNumber/dob  is passed in request body
{
    "error": {
        "statusCode": 404,
        "name": "Error",
        "message": "File No not Found"
    }
}
```
:::

***

**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!

