# Passport - India OCR

Mindee’s Passport - Indian OCR API uses deep learning to automatically, accurately, and instantaneously parse your documents details. In a few seconds, the API extracts a set of data from your PDFs or photos of indian passport, including:

* Page Number
* Country Code
* Identity Number
* Given Name(s)
* Surname
* Date of Birth
* Place of Birth
* Place of Issue
* Gender
* Issuance Date
* Expiry Date
* MRZ Row #1
* MRZ Row #2
* Name of legal guardian
* Name of spouse
* Name of mother
* Old passport date of issue
* Old passport number
* Address line #1
* Address line #2
* Address line #3
* Old passport place of issue
* File number

The Passport - Indian OCR API only supports two pages of Indian passports. The passports from other nationalities and states are not supported with this model, you can use [International Passport](https://docs.mindee.com/v1/off-the-shelf-products/passport-ocr) API instead.

## Set up the API

{% hint style="info" %}
**Create an API key**

To begin using the Mindee V1 OCR API, your first step is to [create your V1 API key](https://docs.mindee.com/v1/get-started/create-api-key).
{% endhint %}

1. To test your API, you can use the sample document provided below.

   <figure><img src="https://126655343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2al1MDqAP9Dg9iDRjkWg%2Fuploads%2Fgit-blob-40c7bd315b4dcc3d61c81467a19296c5185a182f%2Fb57ea1e613abfbd993b8834bce7a65c2988d028f6b47b4e6344ecce265fbe043-image.png?alt=media" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://126655343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2al1MDqAP9Dg9iDRjkWg%2Fuploads%2Fgit-blob-24ea6278eedc3458ae2c2d415e024c2242aa7cff%2F6d7647cd0f75489579e7a1f1374bfb50f5ca1534a70bdfe6f114b03bfa8b0df5-image.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Access your Passport - Indian API by clicking on the corresponding product card in the **Document Catalog**

   <figure><img src="https://126655343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2al1MDqAP9Dg9iDRjkWg%2Fuploads%2Fgit-blob-9b06e845413b046bd68b746fd397392ca97d88db%2Fe95aa640aa2455835ca5e0c2ffe764e44888347a0a691b65139022494dc9a5f8-image.png?alt=media" alt=""><figcaption></figcaption></figure>
3. From the left navigation, go to [**documentation**](https://docs.mindee.com/v1/platform-ui-tour/api-documentation#api-reference) **> API Reference**, you'll find sample code in popular languages and command line.

```python
from mindee import Client, AsyncPredictResponse, product

# Init a new client
mindee_client = Client(api_key="my-api-key-here")

# Add the corresponding endpoint (document). Set the account_name to "mindee" if you are using OTS.
my_endpoint = mindee_client.create_endpoint(
    account_name="mindee",
    endpoint_name="ind_passport",
    version="1"
)

# Load a file from disk
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")

# Parse the file.
# The endpoint must be specified since it cannot be determined from the class.
result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
    product.GeneratedV1,
    input_doc,
    endpoint=my_endpoint
)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
#     print(field_name, "=", field_values)
```

```javascript
const mindee = require("mindee");
// for TS or modules:
// import * as mindee from "mindee";

// Init a new client
const mindeeClient = new mindee.v1.Client({ apiKey: "my-api-key-here" });

// Load a file from disk
const inputSource = mindeeClient.docFromPath("/path/to/the/file.ext");

// Create a custom endpoint for your product
const customEndpoint = mindeeClient.createEndpoint(
  "ind_passport",
  "mindee",
  "1" // Defaults to "1"
);

// Parse the file asynchronously.
const asyncApiResponse = mindeeClient.enqueueAndParse(
  mindee.v1.product.GeneratedV1,
  inputSource,
  { endpoint: customEndpoint }
);

// Handle the response Promise
asyncApiResponse.then((resp) => {
  // print a string summary
  console.log(resp.document.toString());
});
```

```csharp
using Mindee;
using Mindee.Input;
using Mindee.Http;
using Mindee.Product.Generated;

string apiKey = "my-api-key-here";
string filePath = "/path/to/the/file.ext";

// Construct a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);

// Load an input source as a path string
// Other input types can be used, as mentioned in the docs
var inputSource = new LocalInputSource(filePath);

// Set the endpoint configuration
CustomEndpoint endpoint = new CustomEndpoint(
    endpointName: "ind_passport",
    accountName: "mindee",
    version: "1"
);

// Call the product asynchronously with auto-polling
var response = await mindeeClient
    .EnqueueAndParseAsync<GeneratedV1>(inputSource, endpoint);

// Print a summary of all the predictions
System.Console.WriteLine(response.Document.ToString());

// Print only the document-level predictions
// System.Console.WriteLine(response.Document.Inference.Prediction.ToString());
```

```ruby
#
# Install the Ruby client library by running:
# gem install mindee
#

require 'mindee'

# Init a new client
mindee_client = Mindee::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
  input_source,
  Mindee::Product::IND::IndianPassport::IndianPassportV1
)

# Print a full summary of the parsed data in RST format
puts result.document

# Print the document-level parsed data
# puts result.document.inference.prediction
```

```java
import com.mindee.MindeeClient;
import com.mindee.input.LocalInputSource;
import com.mindee.parsing.common.AsyncPredictResponse;
import com.mindee.product.generated.GeneratedV1;
import com.mindee.http.Endpoint;
import java.io.File;
import java.io.IOException;

public class SimpleMindeeClient {

  public static void main(String[] args) throws IOException, InterruptedException {
    String apiKey = "my-api-key-here";
    String filePath = "/path/to/the/file.ext";

    // Init a new client
    MindeeClient mindeeClient = new MindeeClient(apiKey);

    // Load a file from disk
    LocalInputSource inputSource = new LocalInputSource(new File(filePath));

    // Configure the endpoint
    Endpoint endpoint = new Endpoint(
        "ind_passport",
        "mindee",
        "1"
    );

    // Parse the file asynchronously
    AsyncPredictResponse<GeneratedV1> response = mindeeClient.enqueueAndParse(
        GeneratedV1.class,
        endpoint,
        inputSource
    );

    // Print a summary of the response
    System.out.println(response.toString());

    // Print a summary of the predictions
//  System.out.println(response.getDocumentObj().toString());

    // Print the document-level predictions
//    System.out.println(response.getDocumentObj().getInference().getPrediction().toString());

    // Print the page-level predictions
//    response.getDocumentObj().getInference().getPages().forEach(
//        page -> System.out.println(page.toString())
//    );
  }

}
```

```bash
API_KEY='my-api-key-here'
ACCOUNT='mindee'
ENDPOINT='ind_passport'
VERSION='1'
FILE_PATH='/path/to/your/file.png'

# Maximum amount of retries to get the result of a queue
MAX_RETRIES=10

# Delay between requests
DELAY=6

# Enqueue the document for async parsing
QUEUE_RESULT=$(curl -sS --request POST \
  -H "Authorization: Token $API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "document=@$FILE_PATH" \
  "https://api.mindee.net/v1/products/$ACCOUNT/$ENDPOINT/v$VERSION/predict_async")

# Status code sent back from the server
STATUS_CODE=$(echo "$QUEUE_RESULT" | grep -oP "[\"|']status_code[\"|']:[\s][\"|']*[a-zA-Z0-9-]*" | rev | cut --complement -f2- -d" " | rev)

# Check that the document was properly queued
if [ -z "$STATUS_CODE" ] || [ "$STATUS_CODE" -gt 399 ] || [ "$STATUS_CODE" -lt 200 ]
then
  if [ -z "$STATUS_CODE" ]
  then
    echo "Request couldn't be processed."
    exit 1
  fi
  echo "Error $STATUS_CODE was returned by API during enqueuing. "

  # Print the additional details, if there are any:
  ERROR=$(echo "$QUEUE_RESULT" | grep -oP "[\"|']error[\"|']:[\s]\{[^\}]*" | rev | cut --complement -f2- -d"{" | rev)
  if [ -z "$ERROR" ]
  then
    exit 1
  fi

  # Details on the potential error:
  ERROR_CODE=$(echo "$ERROR" | grep -oP "[\"|']code[\"|']:[\s]\"[^(\"|\')]*" | rev | cut --complement -f2- -d"\"" | rev)
  MESSAGE=$(echo "$QUEUE_RESULT" | grep -oP "[\"|']message[\"|']:[\s]\"[^(\"|\')]*" | rev | cut --complement -f2- -d"\"" | rev)
  DETAILS=$(echo "$QUEUE_RESULT" | grep -oP "[\"|']details[\"|']:[\s]\"[^(\"|\')]*" | rev | cut --complement -f2- -d"\"" | rev)
  echo "This was the given explanation:"
  echo "-------------------------"
  echo "Error Code: $ERROR_CODE"
  echo "Message: $MESSAGE"
  echo "Details: $DETAILS"
  echo "-------------------------"
  exit 1
else

  echo "File sent, starting to retrieve from server..."

  # Get the document's queue ID
  QUEUE_ID=$(echo "$QUEUE_RESULT" | grep -oP "[\"|']id[\"|']:[\s][\"|'][a-zA-Z0-9-]*" | rev | cut --complement -f2- -d"\"" | rev)

  # Amount of attempts to retrieve the parsed document were made
  TIMES_TRIED=1

  # Try to fetch the file until we get it, or until we hit the maximum amount of retries
  while [ "$TIMES_TRIED" -lt "$MAX_RETRIES" ]
  do
    # Wait for a bit at each step
    sleep $DELAY

    # Note: we use -L here because the location of the file might be behind a redirection
    PARSED_RESULT=$(curl -sS -L \
      -H "Authorization: Token $API_KEY" \
      "https://api.mindee.net/v1/products/$ACCOUNT/$ENDPOINT/v$VERSION/documents/queue/$QUEUE_ID")

    # Isolating the job (queue) & the status to monitor the document
    JOB=$(echo "$PARSED_RESULT" | grep -ioP "[\"|']job[\"|']:[\s]\{[^\}]*" | rev | cut --complement -f2- -d"{" | rev)
    QUEUE_STATUS=$(echo "$JOB" | grep -ioP "[\"|']status[\"|']:[\s][\"|'][a-zA-Z0-9-]*" | rev | cut --complement -f2- -d"\"" | rev)
    if [ "$QUEUE_STATUS" = "completed" ]
    then
      # Print the result
      echo "$PARSED_RESULT"

      # Optional: isolate the document:
      # DOCUMENT=$(echo "$PARSED_RESULT" | grep -ioP "[\"|']document[\"|']:[\s].*([\"|']job[\"|'])" | rev | cut -f2- -d"," | rev)
      # echo "{$DOCUMENT}"

      # Remark: on compatible shells, fields can also be extracted through the use of tools like jq:
      # DOCUMENT=$(echo "$PARSED_RESULT" | jq '.["document"]')
      exit 0
    fi
    TIMES_TRIED=$((TIMES_TRIED+1))
  done
fi

echo "Operation aborted, document not retrieved after $TIMES_TRIED tries"
exit 1
```

```php
<?php

use Mindee\Client;
use Mindee\Product\Generated\GeneratedV1;
use Mindee\Input\PredictMethodOptions;

// Init a new client
$mindeeClient = new Client("my-api-key-here");

// Load a file from disk
$inputSource = $mindeeClient->sourceFromPath("/path/to/the/file.ext");

// Create a custom endpoint
$customEndpoint = $mindeeClient->createEndpoint(
    "ind_passport",
    "mindee",
    "1"
);

// Add the custom endpoint to the prediction options.
$predictOptions = new PredictMethodOptions();
$predictOptions->setEndpoint($customEndpoint);

// Parse the file
$apiResponse = $mindeeClient->enqueueAndParse(GeneratedV1::class, $inputSource, $predictOptions);

echo strval($apiResponse->document);

```

* Replace **my-api-key-here** with your new API key, or use the "select an API key" feature and it will be filled automatically.
* Copy and paste the sample code of your desired choice in your application, code environment or terminal.
* Replace `/path/to/my/file` with the path to your document.
* Replace **my-api-key-here** with your new API key, or use the **select an API key** feature and it will be filled automatically.
* Copy and paste the sample code of your desired choice in your application, code environment, terminal etc.
* Replace `/path/to/the/file.ext` with the path to your input document.

{% hint style="warning" %}
Remember to replace with your V1 API key.
{% endhint %}

4. Run your code. You will receive a JSON response with your document details.

## API Response

Here is the full JSON response you get when you call the API:

```json
{
  "api_request": {
    "error": {},
    "resources": [
      "document",
      "job"
    ],
    "status": "success",
    "status_code": 200,
    "url": "https://api.mindee.net/v1/products/mindee/ind_passport/v1/documents/146bdc5e-05fc-493c-ad6c-7adf956b1c9b"
  },
  "document": {
    "id": "146bdc5e-05fc-493c-ad6c-7adf956b1c9b",
    "inference": {
      "extras": {},
      "finished_at": "2024-11-06T10:26:57.185000",
      "is_rotation_applied": true,
      "pages": [
        {
          "extras": {},
          "id": 0,
          "orientation": {
            "value": 0
          },
          "prediction": {}
        }
      ],
      "prediction": {
        "address1": {
          "page_id": null,
          "polygon": [],
          "value": null
        },
        "address2": {
          "page_id": null,
          "polygon": [],
          "value": null
        },
        "address3": {
          "page_id": null,
          "polygon": [],
          "value": null
        },
        "birth_date": {
          "page_id": 0,
          "polygon": [
            [
              0.754,
              0.406
            ],
            [
              0.909,
              0.406
            ],
            [
              0.909,
              0.439
            ],
            [
              0.754,
              0.439
            ]
          ],
          "value": "1959-09-23"
        },
        "birth_place": {
          "page_id": 0,
          "polygon": [
            [
              0.383,
              0.476
            ],
            [
              0.554,
              0.476
            ],
            [
              0.554,
              0.511
            ],
            [
              0.383,
              0.511
            ]
          ],
          "value": "GUNDUGOLANU"
        },
        "country": {
          "page_id": 0,
          "polygon": [
            [
              0.604,
              0.153
            ],
            [
              0.644,
              0.153
            ],
            [
              0.644,
              0.178
            ],
            [
              0.604,
              0.178
            ]
          ],
          "value": "IND"
        },
        "expiry_date": {
          "page_id": 0,
          "polygon": [
            [
              0.752,
              0.679
            ],
            [
              0.904,
              0.679
            ],
            [
              0.904,
              0.71
            ],
            [
              0.752,
              0.71
            ]
          ],
          "value": "2021-10-10"
        },
        "file_number": {
          "page_id": null,
          "polygon": [],
          "value": null
        },
        "gender": {
          "page_id": 0,
          "polygon": [
            [
              0.679,
              0.406
            ],
            [
              0.694,
              0.406
            ],
            [
              0.694,
              0.431
            ],
            [
              0.679,
              0.431
            ]
          ],
          "value": "F"
        },
        "given_names": {
          "page_id": 0,
          "polygon": [
            [
              0.386,
              0.302
            ],
            [
              0.58,
              0.302
            ],
            [
              0.58,
              0.331
            ],
            [
              0.386,
              0.331
            ]
          ],
          "value": "JOCELYN MICHELLE"
        },
        "id_number": {
          "page_id": 0,
          "polygon": [
            [
              0.777,
              0.161
            ],
            [
              0.966,
              0.161
            ],
            [
              0.966,
              0.195
            ],
            [
              0.777,
              0.195
            ]
          ],
          "value": "J8369854"
        },
        "issuance_date": {
          "page_id": 0,
          "polygon": [
            [
              0.471,
              0.671
            ],
            [
              0.623,
              0.671
            ],
            [
              0.623,
              0.702
            ],
            [
              0.471,
              0.702
            ]
          ],
          "value": "2011-10-11"
        },
        "issuance_place": {
          "page_id": 0,
          "polygon": [
            [
              0.471,
              0.567
            ],
            [
              0.61,
              0.567
            ],
            [
              0.61,
              0.603
            ],
            [
              0.471,
              0.603
            ]
          ],
          "value": "HYDERABAD"
        },
        "legal_guardian": {
          "page_id": null,
          "polygon": [],
          "value": null
        },
        "mrz1": {
          "page_id": 0,
          "polygon": [
            [
              0.078,
              0.785
            ],
            [
              0.876,
              0.785
            ],
            [
              0.876,
              0.854
            ],
            [
              0.078,
              0.854
            ]
          ],
          "value": "P<DOE<<JOCELYNMICHELLE<<<<<<<<<<<<<<<<<<<<<"
        },
        "mrz2": {
          "page_id": 0,
          "polygon": [
            [
              0.072,
              0.839
            ],
            [
              0.874,
              0.839
            ],
            [
              0.874,
              0.913
            ],
            [
              0.072,
              0.913
            ]
          ],
          "value": "J8369854<4IND5909234F2110101<<<<<<<<<<<<<<<8"
        },
        "name_of_mother": {
          "page_id": null,
          "polygon": [],
          "value": null
        },
        "name_of_spouse": {
          "page_id": null,
          "polygon": [],
          "value": null
        },
        "old_passport_date_of_issue": {
          "page_id": null,
          "polygon": [],
          "value": null
        },
        "old_passport_number": {
          "page_id": null,
          "polygon": [],
          "value": null
        },
        "old_passport_place_of_issue": {
          "page_id": null,
          "polygon": [],
          "value": null
        },
        "page_number": {
          "value": "1"
        },
        "surname": {
          "page_id": 0,
          "polygon": [
            [
              0.387,
              0.217
            ],
            [
              0.43,
              0.217
            ],
            [
              0.43,
              0.234
            ],
            [
              0.387,
              0.234
            ]
          ],
          "value": "DOE"
        }
      },
      "processing_time": 6.714,
      "product": {
        "features": [
          "page_number",
          "country",
          "id_number",
          "given_names",
          "surname",
          "birth_date",
          "birth_place",
          "issuance_place",
          "gender",
          "issuance_date",
          "expiry_date",
          "mrz1",
          "mrz2",
          "legal_guardian",
          "name_of_spouse",
          "name_of_mother",
          "old_passport_date_of_issue",
          "old_passport_number",
          "address1",
          "address2",
          "address3",
          "old_passport_place_of_issue",
          "file_number"
        ],
        "name": "mindee/ind_passport",
        "type": "standard",
        "version": "1.0"
      },
      "started_at": "2024-11-06T10:26:50.294000"
    },
    "n_pages": 1,
    "name": "0e8d47d-indian_passport1.jpg"
  },
  "job": {
    "available_at": "2024-11-06T10:26:57.206000",
    "error": {},
    "id": "5b24333c-b91e-4f37-ade0-3c224cd890af",
    "issued_at": "2024-11-06T10:26:50.294000",
    "status": "completed"
  }
}
```

You can find the prediction within the `prediction` key found in **`document > inference > prediction` for document-level predictions**: it contains the different fields extracted at the document level, meaning that for multi-pages PDFs, we reconstruct a single object using all the pages.

Each predicted field may contain one or several values including:

* a `polygon` highlighting the information location
* a `page_id` where the information was found (document level only)

## Detailed Field Information

Using the above document example the following are the basic fields that can be extracted.

* [Page Number](#page-number)
* [Country](#country)
* [Id Number](#id-number)
* [Given Names](#given-names)
* [Surname](#surname)
* [Birth Date](#birth-date)
* [Birth Place](#birth-place)
* [Issuance Place](#issuance-place)
* [Gender](#gender)
* [Issuance Date](#issuance-date)
* [Expiry Date](#expiry-date)
* [MRZ Line 1](#mrz-line-1)
* [MRZ Line 2](#mrz-line-2)
* [Legal Guardian](#legal-guardian)
* [Name of Spouse](#name-of-spouse)
* [Name of Mother](#name-of-mother)
* [Old Passport Date of Issue](#old-passport-date-of-issue)
* [Old Passport Number](#old-passport-number)
* [Address Line 1](#address-line-1)
* [Address Line 2](#address-line-2)
* [Address Line 3](#address-line-3)
* [Old Passport Place of Issue](#old-passport-place-of-issue)
* [File Number](#file-number)

### Page Number

* **page\_number**: The page number of the passport document.

```json
{
  "page_number": {
    "value": "1"
  }
}

```

### Country

* **country**: ISO 3166-1 alpha-3 country code (3 letters format).

```json
{
  "country": {
    "page_id": 0,
    "polygon": [
      [
        0.604,
        0.153
      ],
      [
        0.644,
        0.153
      ],
      [
        0.644,
        0.178
      ],
      [
        0.604,
        0.178
      ]
    ],
    "value": "IND"
  }
}
```

### Id Number

* **id\_number**: The identification number of the passport document.

```json
{
  "id_number": {
    "page_id": 0,
    "polygon": [
      [
        0.777,
        0.161
      ],
      [
        0.966,
        0.161
      ],
      [
        0.966,
        0.195
      ],
      [
        0.777,
        0.195
      ]
    ],
    "value": "J8369854"
  }
}
```

### Given Names

* **given\_names**: The given names of the passport holder.

```json
{
  "given_names": {
    "page_id": 0,
    "polygon": [
      [
        0.386,
        0.302
      ],
      [
        0.58,
        0.302
      ],
      [
        0.58,
        0.331
      ],
      [
        0.386,
        0.331
      ]
    ],
    "value": "JOCELYN MICHELLE"
  }
}
```

### Surname

* **surname**: The surname of the passport holder.

```json
{
  "surname": {
    "page_id": 0,
    "polygon": [
      [
        0.387,
        0.217
      ],
      [
        0.43,
        0.217
      ],
      [
        0.43,
        0.234
      ],
      [
        0.387,
        0.234
      ]
    ],
    "value": "DOE"
  }
}
```

### Birth Date

* birth\_date: The birth date of the passport holder, ISO format: YYYY-MM-DD.

```json
{
  "birth_date": {
    "page_id": 0,
    "polygon": [
      [
        0.754,
        0.406
      ],
      [
        0.909,
        0.406
      ],
      [
        0.909,
        0.439
      ],
      [
        0.754,
        0.439
      ]
    ],
    "value": "1959-09-23"
  }
}
```

### Birth Place

* **birth\_place**: The birth place of the passport holder.

```json
{
  "birth_place": {
    "page_id": 0,
    "polygon": [
      [
        0.383,
        0.476
      ],
      [
        0.554,
        0.476
      ],
      [
        0.554,
        0.511
      ],
      [
        0.383,
        0.511
      ]
    ],
    "value": "GUNDUGOLANU"
  }
}
```

### Issuance Place

* **issuance\_place**: The place where the passport was issued.

```json
{
  "issuance_place": {
    "page_id": 0,
    "polygon": [
      [
        0.471,
        0.567
      ],
      [
        0.61,
        0.567
      ],
      [
        0.61,
        0.603
      ],
      [
        0.471,
        0.603
      ]
    ],
    "value": "HYDERABAD"
  }
}

```

### Gender

* **gender**: The gender of the passport holder.

```json
{
  "gender": {
    "page_id": 0,
    "polygon": [
      [
        0.679,
        0.406
      ],
      [
        0.694,
        0.406
      ],
      [
        0.694,
        0.431
      ],
      [
        0.679,
        0.431
      ]
    ],
    "value": "F"
  }
}
```

### Issuance Date

* **issuance\_date**: The date when the passport was issued, ISO format: YYYY-MM-DD.

```json
{
  "issuance_date": {
    "page_id": 0,
    "polygon": [
      [
        0.471,
        0.671
      ],
      [
        0.623,
        0.671
      ],
      [
        0.623,
        0.702
      ],
      [
        0.471,
        0.702
      ]
    ],
    "value": "2011-10-11"
  }
}
```

### Expiry Date

* **expiry\_date**: The date when the passport will expire, ISO format: YYYY-MM-DD.

```json
{
  "expiry_date": {
    "page_id": 0,
    "polygon": [
      [
        0.752,
        0.679
      ],
      [
        0.904,
        0.679
      ],
      [
        0.904,
        0.71
      ],
      [
        0.752,
        0.71
      ]
    ],
    "value": "2021-10-10"
  }
}
```

### MRZ Line 1

* **mrz1**: The first line of the machine-readable zone (MRZ) of the passport document.

```json
{
  "mrz1": {
    "page_id": 0,
    "polygon": [
      [
        0.078,
        0.785
      ],
      [
        0.876,
        0.785
      ],
      [
        0.876,
        0.854
      ],
      [
        0.078,
        0.854
      ]
    ],
    "value": "P<DOE<<JOCELYNMICHELLE<<<<<<<<<<<<<<<<<<<<<"
  }
}

```

### MRZ Line 2

* **mrz2**: The second line of the machine-readable zone (MRZ) of the passport document.

```json
{
  "mrz2": {
    "page_id": 0,
    "polygon": [
      [
        0.072,
        0.839
      ],
      [
        0.874,
        0.839
      ],
      [
        0.874,
        0.913
      ],
      [
        0.072,
        0.913
      ]
    ],
    "value": "J8369854<4IND5909234F2110101<<<<<<<<<<<<<<<8"
  }
}
```

### Legal Guardian

* **legal\_guardian**: The name of the legal guardian of the passport holder (if applicable).

```json
{
  "legal_guardian": {
    "page_id": null,
    "polygon": [],
    "value": null
  }
}
```

### Name of Spouse

* **name\_of\_spouse**: The name of the spouse of the passport holder (if applicable).

```json
{
  "name_of_spouse": {
    "page_id": null,
    "polygon": [],
    "value": null
  }
}

```

### Name of Mother

* **name\_of\_mother**: The name of the mother of the passport holder.

```json
{
  "name_of_mother": {
    "page_id": null,
    "polygon": [],
    "value": null
  }
}

```

### Old Passport Date of Issue

* **old\_passport\_date\_of\_issue**: The date of issue of the old passport (if applicable), ISO format: YYYY-MM-DD.

```json
{
  "old_passport_date_of_issue": {
    "page_id": null,
    "polygon": [],
    "value": null
  }
}
```

### Old passport Number

* **old\_passport\_number**: The number of the old passport (if applicable).

```json
{
  "old_passport_number": {
    "page_id": null,
    "polygon": [],
    "value": null
  }
}

```

### Address Line 1

* **address1**: The first line of the address of the passport holder.

```json
{
  "address1": {
    "page_id": null,
    "polygon": [],
    "value": null
  }
}
```

### Address Line 2

* **address2**: The second line of the address of the passport holder.

```json
{
  "address2": {
    "page_id": null,
    "polygon": [],
    "value": null
  }
}
```

### Address Line 3

* **address3**: The third line of the address of the passport holder.

```json
{
  "address3": {
    "page_id": null,
    "polygon": [],
    "value": null
  }
}
```

### Old passport Place of Issue

* **old\_passport\_place\_of\_issue**: The place of issue of the old passport (if applicable).

```json
{
  "old_passport_place_of_issue": {
    "page_id": null,
    "polygon": [],
    "value": null
  }
}
```

### File Number

* **file\_number**: The file number of the passport document.

```json
{
  "file_number": {
    "page_id": null,
    "polygon": [],
    "value": null
  }
}
```
