---
title: Generic Id classification API
slug: api-marketplace/generic-id-classification-api
createdAt: 2024-02-15T12:58:00.993Z
---

## Introduction

This API allows users to classify the document type based on the document image provided by the user. Currently it successfully classifies.

Aadhaar, IndividualPan, DL,Passport,VoterID,BussinessPan , nrega ,udyogAadhaar, college\_id\_card , cheque
&#x20;      &#x20;
&#x20;      &#x20;
&#x20; &#x20;

***

## API details

### Endpoint

:::CodeblockTabs
Production Environment

```jsx
POST https://api-preproduction.signzy.app/api/v3/identities/generic-classification
```
:::

:::CodeblockTabs
Production Environment

```jsx
POST https://api.signzy.app/api/v3/identities/generic-classification
```
:::

***

### 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** |
| ------------- | ------------- | ------------------------------------------------------------------------ | ------------ |
| imgurl        | String        | A URL of the image. <br />Acceptable image format , JPEG/JPG, PNG, Webp  | Mandatory    |

```json
{
    "imgurl": "https://development-persist.signzy.tech/api/files/xxxxx/download/xxxxx.jpg"
}
```

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api.signzy.app/api/v3/identities/generic-classification' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Auth-Token>' \
--data '{
    "imgUrl": "https://development-persist.signzy.tech/api/files/xxxxx/download/xxxxx.jpg"
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "imgUrl": "https://development-persist.signzy.tech/api/files/xxx/download/xxx.jpg"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.signzy.app/api/v3/identities/generic-classification',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<Auth-Token>'
  },
  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.signzy.app/api/v3/identities/generic-classification"

payload = json.dumps({
  "imgUrl": "https://development-persist.signzy.tech/api/files/xxxx/download/xxxx.jpg"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<Auth-Token>'
}

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.signzy.app/api/v3/identities/generic-classification"
  method := "POST"

  payload := strings.NewReader(`{
    "imgUrl": "https://development-persist.signzy.tech/api/files/xxxx/download/xxxx.jpg"
}`)

  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-Token>")

  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         | An object containing the document type details         |
| result.id\_type | String         | Name of the document type (pan\_card,aadhar\_card etc) |

:::CodeblockTabs
200

```json
{
    "result": {
        "id_type": "pan_card"
    }
}
```

401

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

422

```azcli
{
  "error": {
       "status": 422,
       "msg": "Image url is expired/invalid"
     }
}
```

413

```azcli
{
  "error": {
       "status": 413, 
       "msg": "The file size is greater than 5 MB"
     }
}
```
:::

***

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



