---
title: Voter ID Fetch
slug: api-marketplace/voter-id-fetch
createdAt: 2023-11-02T11:46:52.780Z
---

## Introduction

The voter ID search API is a robust and efficient solution designed to retrieve basic personal details associated with a given epic number. This API serves as a vital tool for organizations and individuals who need quick and reliable access to basic personal information, streamlining various processes where identity verification is crucial.

***

## API details

### Endpoint

:::CodeblockTabs
Production Environment

```jsx
POST https://api.signzy.app/api/v3/voterid/search/voterid/search 
```
:::

:::CodeblockTabs
UAT/Testing environment

```jsx
POST https://api-preproduction.signzy.app/api/v3/voterid/search
```
:::

***

### Request headers&#x20;

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

***

### Request body parameters

| Parameter  | Date Type | Decription                                    | Required  |
| ---------- | --------- | --------------------------------------------- | --------- |
| epicNumber | String    | 10 digit alphanumeric number on the voter ID. | Mandatory |
| name       | String    | Name of the consumer/person being verified.   | Optional  |



```json
{
    "epicNumber":"<EPIC number>",
    "name":"<Name>"
}
```

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/voterid/search' \
--header 'Authorization: <Token>' \
--header 'Content-Type: application/json' \
--data '{
    "epicNumber":"<epic number>",
    "name":"XXXXX"
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "epicNumber": "<epic number>",
  "name": "XXXXXX"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/voterid/search',
  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 requests
import json

url = "https://api-preproduction.signzy.app/api/v3/voterid/search"

payload = json.dumps({
   "epicNumber": "<epic number>",
  "name": "XXXXXX"
})
headers = {
  'Authorization': '<Token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

```go
package main

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

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/voterid/search"
  method := "POST"

  payload := strings.NewReader(`{
    "epicNumber": "<epic number>",
  "name": "XXXXXX"
}`)

  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 information about the voter ID.                                                                    |
| result.name       | String        | Name of the individual.                                                                                         |
| result.dob        | String        | \[Deprecated] Date of birth.<br />This detail is not available at the source and will be removed in the future. |
| result.district   | String        | District of the individual's residence.                                                                         |
| result.state      | String        | State of the individual's residence.                                                                            |
| result.fatherName | String        | Father's name of the individual.                                                                                |
| result.gender     | String        | Gender of the individual.<br />Possible responses could be:<br />Male,<br />Female,<br />Transgender.           |

:::CodeblockTabs
200

```json
{
    "result": {
        "name": "John Doe",
        "dob": "",
        "district": "Panji",
        "state": "Gao",
        "fatherName": "Adam Doe",
        "gender": "Male"
    }
}
```

400

```json
// When epicNumber is passed as empty string.
{
    "error": {
        "name": "error",
        "message": "\"epicNumber\" is not allowed to be empty",
        "status": 400,
        "reason": "VALIDATION_ERROR",
        "type": "Bad Request",
        "statusCode": 400
    }
}

// When invalid epicNumber(e.g @#$%) is passed
{
    "error": {
        "name": "error",
        "message": "epicNumber is not valid",
        "status": 400,
        "reason": "Invalid_Param",
        "type": "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 Epic number is passed
{
    "error": {
        "name": "error",
        "message": "Epic number not found",
        "status": 404,
        "reason": "NOT_FOUND",
        "type": "Not Found",
        "statusCode": 404
    }
}
```
:::

***

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

