---
title: Indian ID Classification
slug: api-marketplace/indian-id-classification
description: Get ready to access the upcoming document, set to be released soon. Stay tuned for valuable information and insights coming your way.
createdAt: 2023-04-20T21:12:25.000Z
---

## Introduction

You need to upload an image of an Indian ID card and the optional boolean value of side. This API will respond with the ID type, the side of the ID card also the Color profile of that ID card. You may put direct URLs to ID cards, in case you have them.

***

## API details

### Endpoint

:::CodeblockTabs
Production Endpoint

```shell
POST https://api.signzy.app/api/v3/indianid/classification
```
:::

:::CodeblockTabs
UAT/Testing Endpoint

```text
POST https://api-preproduction.signzy.app/api/v3/indianid/classification 
```
:::

***

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

***

### Request body parameters

| Parameter | Data Type | Description | Required |
| --------- | --------- | ----------- | -------- |
| img\_url  | str       | image url   | yes      |

:::CodeblockTabs
JSON

```json
{
    "img_url": "https://domain/...hosted_image.../image.jpg"
}
```
:::

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api.signzy.app/api/v3/indianid/classification' \
--header 'Content-Type: application/json' \
--header 'Authorization: xxxxxxxxxxxxxxxxx' \
--data '{
    "img_url": "https://domain/...hosted_image.../image.jpg"
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "img_url": "https://domain/...hosted_image.../image.jpg"
});

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

payload = json.dumps({
  "img_url": "https://domain/...hosted_image.../image.jpg"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'xxxxxxxxxxxxxxxxx'
}

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/indianid/classification"
  method := "POST"

  payload := strings.NewReader(`{
    "img_url": "https://domain/...hosted_image.../image.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", "xxxxxxxxxxxxxxxxx")

  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.colorProfile | string    | Whether the uploaded ID card is in Color or Black and white profile. The possible values are "COLOR" or "B\&W".                                       |
| result.id\_type     | string    | Type of identity card for eg: aadhaar/individualPan/businessPan/passport/dl/voterId/cheque/unknown                                                    |
| result.msg          | string    | Provides a proper message for eg: If provided all info is correct it shows a Success message, If the URL is not correct it will show URL is not valid |
| result.status       | string    | Status Code                                                                                                                                           |

:::CodeblockTabs
200

```json
{
    "result": {
        "colorProfile": "COLOR",
        "id_type": "passport",
        "msg": "success",
        "status": "200"
    }
}
```

400

```json
// Empty input URL
{
    "error": {
        "statusCode": 400,
        "status": "Bad Request",
        "message": "\"requestBody.img_url\" is not allowed to be empty",
        "id": "e193365d-8e72-4548-ae10-84ff39fed6df"
    }
}

// Invalid image URL
{
    "error": {
        "status": 400,
        "msg": "Invalid request parameters: url is not valid",
        "responseCode": "fail"
    }
}

// Expired image url
{
    "error": {
        "status": 400,
        "msg": "Invalid request parameters: The image has expired",
        "responseCode": "fail"
    }
}

// file size 
{
    "error": {
        "status": 400,
        "msg": "Invalid request parameters: The image size exceeded. Limit: 5 MB",
        "responseCode": "fail"
    }
}

```

401

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

409

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

### Document related Constraints:

:::hint{type="info"}
The size of the document should not exceed&#x20;**&#x20;5 MB**.

For best results, ensure the image you use fits tightly in the camera view and horizontally aligned.

Supported document types:

- Image - JPEG, JPG, PNG and TIFF/TIF.
- Single-page PDF - In the case of multipage PDF input the API will only consider the first page for classification.
:::

***

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