---
title: Foreign ID Classification
slug: v2/X6W6-foreign-id-classification
description: Learn how to use the image classification API to classify images into pre-defined categories using visual content. The API accepts image URLs and the country ISO code from ID cards as input parameters. Explore the sample cURL request and understand the re
createdAt: 2023-05-31T02:19:31.000Z
---

# Introduction

This API allows you to classify a given image into one of the pre-defined categories based on the visual content. Foreign ID classification system accepts direct URL of the images of Foreign ID and the 3 letter ISO code for the country mentioned in the ID card.

Note: In ARE and KWT, we support MRZ based classification on Emirates ID, Kuwait ID and Passport. If MRZ code is not detected in the images that were passed, the output will be "unknown".

# Sample cURL

```curl
curl --request POST \
  --url https://signzy.tech/api/v2/patrons/....patronid.../foreignidentitiesextractions \
  --header 'Accept: */*' \
  --header 'Accept-Language: en-US,en;q=0.8' \
  --header 'Authorization: <Access-Token>' \
  --header 'content-type: application/json' \
  --data '{
  "task": "classification",
  "essentials": {
    "country": "...country code...",
    "files": [
      "...files..."
    ]
  }
}'
```

## Input Parameters

| **Parameter** | **Type** | **Description**                                                             |
| ------------- | -------- | --------------------------------------------------------------------------- |
| task          | String   | The name of the task, which is always "classification" for this API.        |
| essentials    | Object   | A JSON object containing the following sub-parameters:                      |
| country       | String   | The 3-letter ISO country code for the country where the image was captured. |
| files         | Array    | An array of URLs points to the image(s) to classify.                        |

# Sample Response

```json
    {
        "essentials": {
        "country": "...3 letter ISO Code of the country..."
        "files": [
               "...front image url...",
              "...back image url..."
           ]
        },
    	"id": "..id..",
    	"patronId": "...patron id...",
    	"task": "classification",
    	"result": {
            {
              "idType": "...Emirates ID/Kuwait ID/Passport/unknown...",
              "country": "...country...",
              "countryCode": "...country code..."
          }
    	}
    }      
```

## Response Parameters

| **Output Parameter** | **Data Type** | **Description**                                                               |
| -------------------- | ------------- | ----------------------------------------------------------------------------- |
| idType               | string        | The type of ID extracted. Can be Emirates ID, Kuwait ID, Passport, or unknown |
| country              | string        | The name of the country from which the ID is issued                           |
| countryCode          | string        | The 3-letter ISO code of the country from which the ID is issued              |

