International ID

The Python SDK supports the Mindee V1 International ID API.

Product Specifications

Specification
Details

Endpoint Name

international_id

Recommended Version

v2.2

Supports Polling/Webhooks

✔️ Yes

Support Synchronous HTTP Calls

❌ No

Geography

🌐 Global

Quick-Start

Using the sample below, we are going to illustrate how to extract the data that we want using the SDK.

International ID Sample

Sample Code

Sample Output (rST)

Standard Fields

These fields are generic and used in several products.

BaseField

Each prediction object contains a set of fields that inherit from the generic BaseField class. A typical BaseField object will have the following attributes:

  • value (Union[float, str]): corresponds to the field value. Can be None if no value was extracted.

  • confidence (float): the confidence score of the field prediction.

  • bounding_box ([Point, Point, Point, Point]): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.

  • polygon (List[Point]): contains the relative vertices coordinates (Point) of a polygon containing the field in the image.

  • page_id (int): the ID of the page, always None when at document-level.

  • reconstructed (bool): indicates whether an object was reconstructed (not extracted as the API gave it).

A Point simply refers to a list of two numbers ([float, float]).

Aside from the previous attributes, all basic fields have access to a custom __str__ method that can be used to print their value as a string.

ClassificationField

The classification field ClassificationField does not implement all the basic BaseField attributes. It only implements value, confidence and page_id.

A classification field's `value is always a `str`. {% endhint %}

DateField

Aside from the basic BaseField attributes, the date field DateField also implements the following:

  • date_object (Date): an accessible representation of the value as a python object. Can be None.

StringField

The text field StringField only has one constraint: its value is an Optional[str].

Attributes

The following fields are extracted for International ID V2:

Address

address (StringField): The physical address of the document holder.

Birth Date

birth_date (DateField): The date of birth of the document holder.

Birth Place

birth_place (StringField): The place of birth of the document holder.

Country of Issue

country_of_issue (StringField): The country where the document was issued.

Document Number

document_number (StringField): The unique identifier assigned to the document.

Document Type

document_type (ClassificationField): The type of personal identification document.

Possible values include:

  • 'IDENTIFICATION_CARD'

  • 'PASSPORT'

  • 'DRIVER_LICENSE'

  • 'VISA'

  • 'RESIDENCY_CARD'

  • 'VOTER_REGISTRATION'

Expiration Date

expiry_date (DateField): The date when the document becomes invalid.

Given Names

given_names (List[StringField]): The list of the document holder's given names.

Issue Date

issue_date (DateField): The date when the document was issued.

MRZ Line 1

mrz_line1 (StringField): The Machine Readable Zone, first line.

MRZ Line 2

mrz_line2 (StringField): The Machine Readable Zone, second line.

MRZ Line 3

mrz_line3 (StringField): The Machine Readable Zone, third line.

Nationality

nationality (StringField): The country of citizenship of the document holder.

Personal Number

personal_number (StringField): The unique identifier assigned to the document holder.

Sex

sex (StringField): The biological sex of the document holder.

State of Issue

state_of_issue (StringField): The state or territory where the document was issued.

Surnames

surnames (List[StringField]): The list of the document holder's family names.

Last updated

Was this helpful?