> For the complete documentation index, see [llms.txt](https://docs.tutelar.io/tutelar-api-document/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tutelar.io/tutelar-api-document/kyc-verification/document-extraction/india/aadhaar-pincode-geofencing-ocr.md).

# Aadhaar Pincode Geofencing OCR

Retrieve geofence matches using the Aadhaar image along with the provided latitude and longitude

#### Submit Document

## &#x20;aadhaar\_pincode\_geofencing

<mark style="color:green;">`POST`</mark> `https://secctrl.tutelar.io/api/v1/kyc/vision/aadhaar_pincode_geofencing`

### Post parameters description is given below,

<table><thead><tr><th width="197">Post Parameter </th><th width="139">Type</th><th>Is  Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>file</td><td>png, jpg, jpeg</td><td>Yes </td><td>Aadhar Image to retrive the details</td></tr><tr><td>latitude</td><td>String</td><td>Yes</td><td>User latitude to identify the geofence Mathces </td></tr><tr><td>longitude</td><td>String</td><td>Yes</td><td>User longitude to identify the geofence Mathces </td></tr></tbody></table>

#### Sample Post Parameters

To call this API, you must send a **POST** request with `multipart/form-data` containing:\
1\. **file** → Aadhaar image (`.jpg`, `.jpeg`, or `.png` )\
2\. **latitude** → Current latitude to compare geofence\
3\. **longitude** → Current longitude to compare geofence

```json
--form 'file=@"/path/to/Aadhaar.JPG"' \
--form 'latitude="9.7"' \
--form 'longitude="77.4"'
```

{% tabs %}
{% tab title="200: Success Response - Geofence Match " %}

```json
{
    "success": true,
    "code": 200,
    "message": "The request has been successfully completed.",
    "reference_id": "f787a54a-e7c4-46af-9f20-f7a4f496ab4b",
    "status": "completed",
    "result": {
        "message": "Uploads matches with geofence",
        "extracted_pincode": "625512",
        "pincode_geo_location": {
            "latitude": 9.6,
            "longitude": 77.3
        },
        "user_location": {
            "latitude": 9.7,
            "longitude": 77.4
        },
        "distance": "1.4 km",
        "threshold_distance": "1.5 km",
        "matches": true
    },
    "requested_at": "2025-08-26T05:34:47.660Z",
    "completed_at": "2025-08-26T05:34:49.135Z"
}
```

{% endtab %}

{% tab title="200: Success Response - Geofence doesn't match " %}

```json
{
    "success": true,
    "code": 200,
    "message": "The request has been successfully completed.",
    "reference_id": "2d8d1069-cde7-4954-a8e9-3e7684152436",
    "status": "completed",
    "result": {
        "message": "Uploads doesn't match with geofence",
        "extracted_pincode": "625515",
        "pincode_geo_location": {
            "latitude": 9.842162,
            "longitude": 77.38276
        },
        "user_location": {
            "latitude": 9.7,
            "longitude": 77.4
        },
        "distance": "15.94 km",
        "threshold_distance": "1.5 km",
        "matches": false
    },
    "requested_at": "2025-08-26T06:07:13.425Z",
    "completed_at": "2025-08-26T06:07:14.857Z"
}
```

{% endtab %}

{% tab title="200: InProgress Response" %}

```json
{
    "success": true,
    "code": 200,
    "message": "The request is being processed. Please wait for completion.",
    "reference_id": "c3d101d4-c9ec-48df-a25f-60354ec78c78",
    "status": "in_progress",
    "requested_at": "2024-04-22T04:47:39.590Z"
}
```

{% endtab %}

{% tab title="400: Validation Error Response" %}

```json
{
    "success": false,
    "code": 400,
    "message": "Only jpg/png types image are allowed",
    "error": {
        "message": "Invalid image type",
        "field": "file",
        "code": "BAD_REQUEST"
    }
}

{
    "success": false,
    "code": 400,
    "message": "File is required",
    "error": {
        "message": "Missing Aadhar Image!",
        "field": "file",
        "code": "BAD_REQUEST"
    }
}

{
    "success": false,
    "code": 400,
    "message": "latitude should not be empty",
    "error": {
        "message": "latitude should not be empty",
        "field": "latitude",
        "code": "BAD_REQUEST"
    }
}

{
    "success": false,
    "code": 400,
    "message": "longitude should not be empty",
    "error": {
        "message": "longitude should not be empty",
        "field": "longitude",
        "code": "BAD_REQUEST"
    }
}
```

{% endtab %}

{% tab title="200: Failure Response" %}

```json
{
    "success": true,
    "code": 200,
    "message": "The request could not be completed due to an error.",
    "reference_id": "2e3f87e4-7be9-425c-9161-59a2cb51abbd",
    "status": "failed",
    "error": {
        "message": "No valid 6-digit PIN found",
        "code": "ERROR"
    },
    "requested_at": "2025-08-26T06:04:04.004Z",
    "completed_at": "2025-08-26T06:04:04.632Z"
}
```

{% endtab %}
{% endtabs %}

#### Check Document Status

## Get document details

<mark style="color:blue;">`GET`</mark> `https://secctrl.tutelar.io/api/v1/kyc/vision/aadhaar_pincode_geofencing`

### Query parameters description is given below,

<table><thead><tr><th width="197">Query Parameter </th><th width="139">Type</th><th>Is  Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>reference_id </td><td>String </td><td>Yes </td><td>Document reference id</td></tr></tbody></table>

{% tabs %}
{% tab title="200: Success Response" %}

```json
{
    "success": true,
    "code": 200,
    "message": "The request has been successfully completed.",
    "reference_id": "f787a54a-e7c4-46af-9f20-f7a4f496ab4b",
    "status": "completed",
    "result": {
        "message": "Uploads matches with geofence",
        "extracted_pincode": "625512",
        "pincode_geo_location": {
            "latitude": 9.6,
            "longitude": 77.3
        },
        "user_location": {
            "latitude": 9.7,
            "longitude": 77.4
        },
        "distance": "1.4 km",
        "threshold_distance": "1.5 km",
        "matches": true
    },
    "requested_at": "2025-08-26T05:34:47.660Z",
    "completed_at": "2025-08-26T05:34:49.135Z"
}
```

{% endtab %}

{% tab title="200: InProgress Response" %}

```json
{
    "success": true,
    "code": 200,
    "message": "The request is being processed. Please wait for completion.",
    "reference_id": "c3d101d4-c9ec-48df-a25f-60354ec78c78",
    "status": "in_progress",
    "requested_at": "2024-04-22T04:47:39.590Z"
}
```

{% endtab %}

{% tab title="200: Failure Response" %}

```json
{
    "success": true,
    "code": 200,
    "message": "The request could not be completed due to an error.",
    "reference_id": "2e3f87e4-7be9-425c-9161-59a2cb51abbd",
    "status": "failed",
    "error": {
        "message": "No valid 6-digit PIN found",
        "code": "ERROR"
    },
    "requested_at": "2025-08-26T06:04:04.004Z",
    "completed_at": "2025-08-26T06:04:04.632Z"
}
```

{% endtab %}
{% endtabs %}
