---
title: KYC and Utility extraction API
slug: api-marketplace/kyc-and-utility-extraction-api
createdAt: 2024-03-11T12:10:41.348Z
---

## Introduction

The KYC and Utility extraction API is a comprehensive solution designed to extract relevant information from a wide range of Officially Valid Documents (OVDs) and utility bills using a single endpoint. This API streamlines the process of identity verification. 

**Key Features:**

- **Versatile Document Support:** Handles multiple document types including utility bills and OVDs.
- **Comprehensive Data Extraction:** Extracts detailed information such as names, addresses, account numbers, dates, and more.
- **Wide File Type Compatibility:&#x20;**&#x53;upports .jpg, .jpeg, .png, and .pdf formats
- Easy Integration: A single endpoint for multiple document types simplifies the integration process.
- **Doctype classification in response:** Classifies the document uploaded into respective OVDs, Utility bill type, and Others.

Supported Documents:

1. Utility Bills:
   - Electricity Bills
   - Broadband Bills
   - Lease Deeds
   - Gas Bills
2. OVD Documents:
   - PAN Card
   - Driving License
   - Voter ID (front and back images)
   - Aadhaar Card (front and back images)
   - Passport (front and back images)

***

## API details

### Endpoint

:::CodeblockTabs
Preproduction Environment

```jsx
curl --location 'https://api-preproduction.signzy.app/api/v3/utility/single-kyc' \
--header 'Authorization: <auth_key>' \
--header 'Content-Type: application/json' \
--data'{
    "url": ["URL1, URL2"],
    "isBill": true
}'
```
:::

:::CodeblockTabs
Production Environment

```jsx
curl --location 'https://api.signzy.app/api/v3/utility/single-kyc' \
--header 'Authorization: <auth_key>' \
--header 'Content-Type: application/json' \
--data'{
    "url": ["URL1, URL2"],
    "isBill": true
}'
```
:::

***

### 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** | **Data type** | **Description**                                                                                                                                                                                                                                                          | **Required** |
| ------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ |
| url           | Array         | A list of URLs/Base64 of the ID images. <br />Acceptable image format TIFF/TIF, JPEG/JPG, PNG, PDF(maximum 2 URLs/Base64).                                                                                                                                               | Mandatory    |
| isBill        | Boolean       | If isBill is set to true, the API processes the document as a utility bill and extracts the relevant utility bill fields.<br />If isBill is set to false, the API processes the document as an identity document and extracts the details based on the specified idType. | Mandatory    |

```json
{
    "url": [
        "https://preproduction-persist.signzy.tech/api/files/25535sa717/download/163.jpg", 
        "https://preproduction-persist.signzy.tech/api/files/2553as5717/download/163.jpg"
    ],
    "isBill": true
}
```

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/single-kyc/extraction' \
--header 'Content-Type: application/json' \
--header 'Authorization: < Auth Key >' \
--data '{
    "url": [
        "https://preproduction-persist.signzy.tech/api/files/25535717/download/163.jpg", 
        "https://preproduction-persist.signzy.tech/api/files/25535717/download/163.jpg"
    ],
    "isBill": true
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "urls": [
    "https://preproduction-persist.signzy.tech/api/files/25535717/download/163.jpg"
  ],
  "country": "India"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/single-kyc/extraction',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '< Auth Key >'
  },
  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({
  "urls": [
    "https://preproduction-persist.signzy.tech/api/files/25535717/download/163.jpg"
  ],
  "country": "India"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '< Auth Key >'
}
conn.request("POST", "/api/v3/single-kyc/extraction", 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/single-kyc/extraction"
  method := "POST"

  payload := strings.NewReader(`{
    "urls": [
        "https://preproduction-persist.signzy.tech/api/files/25535717/download/163.jpg"
    ],
    "country": "India"
}`)

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

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "< Auth Key >")

  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    | Extracted ID/Utility Bill object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `action`          | String    | "extract"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `completedAt`     | String    | "2024-05-20T14:26:56"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `createdAt`       | String    | "2024-05-20T14:26:56"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `requestId`       | String    | requestID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `electricityBill` | Object    | \{<br />"accountNumber": "",<br />"address": "NA",<br />"billNumber": "",<br />"billingDate": "",<br />"fullName": "NA",<br />"mobileNo": "NA",<br />"electricityBillProvider": "NA"<br />}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `gasBill`         | Object    | \{<br />"address": "",<br />"fullName":"",<br />"billingDate": ""<br />}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `leaseOfDeed`     | Object    | \{<br />"leseeName": "",<br />"lessorName": "",<br />"licenseeAddress": "",<br />"licensorAddress": "",<br />"IssuedDate": ""<br />}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `broadbandBill`   | Object    | \{<br />"address": "",<br />"fullName": "",<br />"billingDate": ""<br />}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `voterId`         | Object    | \{<br />"status": "200",<br />"name": "Name",<br />"fatherName": "Relative Name",<br />"address": "Full address",<br />"state": "State",<br />"ageAsOn": "Age",<br />"dob": "DD/MM/YYYY",<br />"gender": "MALE",<br />"yob": "YYYY",<br />"epicNumber": "XXX0000000",<br />"splitAddress": \{<br />"district": \[],<br />"state": \[<br />\[]<br />],<br />"city": \[],<br />"pincode": "000000",<br />"country": \[<br />"IN",<br />"IND",<br />"INDIA"<br />],<br />"addressLine": "Address Line"<br />},<br />"msg": "success"<br />},<br />"url": \[<br />""<br />]<br />}                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `aadhaar`         | Object    | \{<br />"uid": "",<br />"vid": "",<br />"name": "",<br />"dob": "",<br />"yob": "",<br />"pincode": "",<br />"address": "",<br />"gender": "",<br />"splitAddress": \{<br />"district": \[<br />""<br />],<br />"state": \[<br />\[<br />"",<br />"TG"<br />]<br />],<br />"city": \[<br />""<br />],<br />"pincode": "",<br />"country": \[<br />"IN",<br />"IND",<br />"INDIA"<br />],<br />"addressLine": ""<br />},<br />"uidHash": "",<br />"summary": \{<br />"number": "",<br />"name": "",<br />"dob": "",<br />"address": "",<br />"splitAddress": \{<br />"district": \[<br />""<br />],<br />"state": \[<br />\[<br />"",<br />""<br />]<br />],<br />"city": \[<br />""<br />],<br />"pincode": "",<br />"country": \[<br />"IN",<br />"IND",<br />"INDIA"<br />],<br />"addressLine": ""<br />},<br />"gender": "",<br />"guardianName": "",<br />"issueDate": "",<br />"expiryDate": "",<br />"dateOfBirth": ""<br />},<br />"validBackAndFront": true,<br />"dateOfBirth": ""<br />}                |
| `passport`        | Object    | \{<br />"parentsGuardianName": "",<br />"issueDate": "",<br />"expiryDate": "",<br />"birthDate": "",<br />"name": "",<br />"country": \[<br />"IN",<br />"IND",<br />"India"<br />],<br />"nationality": "",<br />"sex": "",<br />"address": "",<br />"pincode": "",<br />"passportNumber": "",<br />"fileNumber": "",<br />"placeOfBirth": "",<br />"placeOfIssue": "",<br />"splitAddress": \{<br />"district": \[],<br />"state": \[<br />\[]<br />],<br />"city": \[],<br />"pincode": "",<br />"country": \[<br />"IN",<br />"IND",<br />"INDIA"<br />],<br />"addressLine": ""<br />},<br />"summary": \{<br />"number": "",<br />"name": "",<br />"dob": "",<br />"address": "",<br />"splitAddress": \{<br />"district": \[],<br />"state": \[<br />\[]<br />],<br />"city": \[],<br />"pincode": "",<br />"country": \[<br />"IN",<br />"IND",<br />"INDIA"<br />],<br />"addressLine": ""<br />},<br />"gender": "",<br />"guardianName": "",<br />"issueDate": "",<br />"expiryDate": ""<br />}<br />} |
| `drivingLicense`  | Object    | \{<br />"dlType": \[],<br />"issueDate": "",<br />"expiryDate": "",<br />"dob": "",<br />"guardianName": "",<br />"name": "",<br />"number": "",<br />"state": "",<br />"address": "",<br />"gaurdianName": "",<br />"splitAddress": \{<br />"district": \[],<br />"state": \[<br />\[]<br />],<br />"city": \[],<br />"pincode": "",<br />"country": \[<br />"IN",<br />"IND",<br />"INDIA"<br />],<br />"addressLine": ""<br />}<br />}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `pan`             | Object    | \{<br />"panType": "Adult",<br />"dob": "",<br />"name": "",<br />"fatherName": "",<br />"number": "",<br />"summary": \{<br />"number": "",<br />"name": "",<br />"dob": "",<br />"address": "",<br />"splitAddress": \{<br />"district": \[],<br />"state": \[<br />\[]<br />],<br />"city": \[],<br />"pincode": "",<br />"country": \[],<br />"addressLine": ""<br />},<br />"gender": "",<br />"guardianName": "",<br />"issueDate": "",<br />"expiryDate": ""<br />}<br />}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `status`          | String    | "completed"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `taskId`          | String    | Empty String                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `docType`         | String    | Document Type detected                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

:::CodeblockTabs
200

```json
{
    "result": {
        "action": "extract",
        "completedAt": "2024-05-20T15:05:40",
        "createdAt": "2024-05-20T15:05:37",
        "requestId": "",
        "electricityBill": {},
        "gasBill": {},
        "leaseOfDeed": {},
        "broadbandBill": {},
        "voterId": {},
        "aadhaar": {},
        "passport": {},
        "drivingLicense": {},
        "pan": {
            "panType": "Adult",
            "dob": "",
            "name": "",
            "fatherName": "",
            "number": "",
            "summary": {
                "number": "",
                "name": "",
                "dob": "",
                "address": "",
                "splitAddress": {
                    "district": [],
                    "state": [
                        []
                    ],
                    "city": [],
                    "pincode": "",
                    "country": [],
                    "addressLine": ""
                },
                "gender": "",
                "guardianName": "",
                "issueDate": "",
                "expiryDate": ""
            }
        },
        "status": "completed",
        "taskId": "",
        "docType": ""
    }
}
```

400

```json
// When detected id type does not match id type given by user
{
  "error": 
   {
     "status": 400,
     "msg": "The ID Type does not match detected ID(s)",
   }
}

// Bad Request - Input must be an array
{
    "error": {
        "statusCode": 400,
        "status": "Bad Request",
        "message": "\"requestBody.url\" must be an array",
        "id": ""
    }
}

```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

409

```json
{
    "error": {
        "reason": "Error From Upstream",
        "status": 409,
        "message": "Upstream Down",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```
:::

## Note:

The response will contain only one filled object at a time. For example, if you extract the Electricity Bill, all other OVD and Utility bill objects will be empty.



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