---
title: ID Classification
slug: v3-gateway/8cJV-id-classification
description: Learn how to use an API for classifying Indian ID cards with this comprehensive document. Upload an image or provide a URL to get started. Authenticate using an access token and receive detailed information such as color profile, ID type, and card side pr
createdAt: 2022-10-11T09:52:10.000Z
---

## Introduction

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

## How to call the API

You must first login before sending the request. The authorization header in the request must include the access token obtained from the login API call.

## API Input Guidelines

Need to pass follow information

- Image/pdf should be less than **5MB**.
- Direct URL's of ID card
- side : boolean value (optional)
- For best results, please make sure the image you use fits tightly in camera view and is horizontally-aligned.&#x20;

### Endpoint Details

| Endpoints                                                                | Environment   |
| ------------------------------------------------------------------------ | ------------- |
| https\://api-preproduction.signzy.app/api/v3/id-classification/indian-id | Preproduction |
| https\://api.signzy.app/api/v3/idClassification                          | Production    |

:::CodeblockTabs
Preproduction

```curl
curl --location --request POST 'https://api-preproduction.signzy.app/api/v3/id-classification/indian-id' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Auth Key>' \
--data-raw '{
     "url": "<URL of the ID Card to be classified>",
     "side": true
}'
```

Production

```curl
curl --location --request POST 'https://api.signzy.app/api/v3/idClassification' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Auth Key>' \
--data-raw '{
     "url": "<URL of the ID Card to be classified>",
     "side": true
}'
```
:::

## Headers

| **Header Name** | **Required/Optional** | **DESCRIPTION**                                    |
| --------------- | --------------------- | -------------------------------------------------- |
| Authorization   | Required              | access token returned as id field of login request |
| Content-Type    | Required              | application/json                                   |

### Input Parameters

| **PARAMETER NAME** | **Required/Optional** | **DESCRIPTION**                                          |
| ------------------ | --------------------- | -------------------------------------------------------- |
| url                | Required              | URL of the ID card to be classified                      |
| side               | Optional              | Boolean value if you want to predict side of the ID card |

### Sample Response

```json
{
    "result": {
        "colorProfile": "COLOR",
        "id_type": "aadhaar",
        "side":"back",
        "msg": "success",
        "status": "200"
    }
}
```

### Response Parameter

| **Parameter** **Name** | **Description**                                                                                                                                                       |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| result.colorProfile    | Whether the uploaded ID card is in Color or Black and white profile                                                                                                   |
| result.id\_type        | Type of identity card for eg: aadhaar/individualPan/businessPan/unknownPan/passport/dl/<br />voterId/cheque/unknown                                                   |
| result.side            | The side of the ID captured in the file eg: front/back/both/unknown. This parameter will only be present if the side parameter is passed as true in the request body. |
| result.msg             | Provides with proper message for eg: If provided all info is correct it shows a Success message, If URL is not correct it will show url is not valid                  |
| result.status          | Status Code                                                                                                                                                           |

**Note**: The value of result.side will also be "unknown" in the case of an unknown ID card, and "front" for the cheque. If both the side is present than result.side will be "both".

### Response Time

| 90 % ile | 95% ile | 99 % ile |
| -------- | ------- | -------- |
| 2216 ms  | 2423 ms | 3216 ms  |

### Sample Error

:::CodeblockTabs
```json
{
    "error": {
        "name": "error"
        "status": "...status code...",
        "msg": "...reason...",
        "responseCode": "fail"
    }
}
```

400

```json
{
    "error": {
        "name": "Invalid Request JSON Syntax",
        "status": "400",
        "msg": "Expecting property name enclosed in double quotes: line 3 column 3 (char 155)",
        "responseCode": "fail"
    }
}
```

401

```json
{
    "message": "No API key found in request"
}
```

422

```json
{
    "error": {
        "status": "422",
        "msg": "Invalid request parameters: The image has expired",
        "responseCode": "fail"
    }
}
```
:::

### Status Codes

| Status Code | Description                    |
| ----------- | ------------------------------ |
| 200         | OK                             |
| 400         | Bad Request                    |
| 401         | Authorization token is invalid |
| 422         | Unprocessable Entity           |

***

:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](#).
:::

