# Passport

## **Overview - Passport**

The user will need to submit the input *(input 4 in the flow chart)* to be able to test the API. It will process the input submitted by the user. The purpose of this API is to record the details of each passport for the user.&#x20;

*A list of check types is listed down below:*

* ~~Landmark Checking~~ *<mark style="color:orange;">(Deprecated)</mark>*
* Blurriness Detection
* Brightness Detection
* Color Detection
* Screen Detection

The Centralized OkayDoc API also contains Machine-Readable Zone (MRZ) Visual Consistency Check and MRZ Validity for the Passport in OkayDoc. The MRZ code is standard and strictly regulated to comply with the International Civil Aviation Organization. Therefore, the MRZ checks on Centralized OkayDoc will provide assurance on Passport checking.&#x20;

{% hint style="info" %}
The passport MRZ consistency check, validity check, and other related details that contain passport information can be found [here](https://api2-ekycapis.innov8tif.com/okaydoc/okaydoc-all/data-consistency-check/passport-mrz-visual-consistency-check-and-mrz-validity).
{% endhint %}

#### Steps:

1. The user will need to re-use the JourneyId and call the Centralized OkayDoc API.
2. Centralized OkayDoc is often being called in the background after Centralized OkayID is called (in flowchart use case) OR called at the same time when is calling the Centralized OkayFace to reduce the user's step to perform a full EMAS eKYC process flow.
3. &#x20;However, this [API Method](#api-method) is separated to help with viewing the API component in more detail.&#x20;
4. &#x20;Users can expand the API Method to read the descriptions for further understanding and follow the [Example](#input-example) given to correctly call the API. An example is a "Singapore" passport example.
5. The average processing time takes about 5s to 20s (depending on the number of checks/detections activated)

{% hint style="info" %}
Please refer to the "[<mark style="color:orange;">Image Requirement</mark>](/emas-ekyc-portal/image-requirement/okaydoc.md)" section to get the best result for each API return
{% endhint %}

## API Method

<mark style="color:green;">`POST`</mark> `https://ekycportaldemo.innov8tif.com/api/ekyc/okaydoc`

#### Request Body

| Name                                            | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ----------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| version<mark style="color:red;">\*</mark>       | string | Default version is 3. Details can be checked at <https://api2-ekycapis.innov8tif.com/okaydoc/okaydoc-all/supported-documents/passport/versions>                                                                                                                                                                                                                                                                                                                                                                   |
| fullSizeImage                                   | string | <p><del>Full-sized passport image in base64</del></p><p><em><mark style="color:orange;">Note: This field is deprecated</mark></em></p>                                                                                                                                                                                                                                                                                                                                                                            |
| halfSizeImage<mark style="color:red;">\*</mark> | string | Half-sized passport image in base64                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| country<mark style="color:red;">\*</mark>       | string | <p><del>IND - India</del><br><del>SGP - Singapore</del><br><del>IDN - Indonesia</del><br><del>BGD - Bangladesh</del><br><del>MMR - Myanmar</del><br><del>NPL - Nepal</del><br><del>PAK - Pakistan</del><br><del>PHL - Philippines</del><br><del>VNM - Vietnam</del> </p><p><em><mark style="color:orange;">Note:  Please use "OTHER" as "country" parameter. The countries listed above are deprecated.</mark></em> <br><br>Other country - OTHER<br>This will return color and screen detection result only.</p> |
| type<mark style="color:red;">\*</mark>          | string | passport                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| journeyId<mark style="color:red;">\*</mark>     | string | Retrieve from 'Create JourneyID' API                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

{% tabs %}
{% tab title="200 Successful API Call" %}
{% code title="Response Code Block" %}

```
{
    "status": "success",
    "messageCode": "api.success",
    "id": "11fac847-3d12-4287-b4f8-cb2f8dcfd220",
    "methodList": [
        {
            "method": "idBlurDetection",
            "label": "Blurriness Detection",
            "componentList": [
                {
                    "code": "idBlurDetection",
                    "label": "Blurriness Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "idBrightnessDetc",
            "label": "Brightness Detection",
            "componentList": [
                {
                    "code": "idBrightnessDetc",
                    "label": "Brightness Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "colorMode",
            "label": "Color Detection",
            "componentList": [
                {
                    "code": "colorMode",
                    "label": "Color Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "screen",
            "label": "Screen Detection",
            "componentList": [
                {
                    "code": "screen",
                    "label": "Screen Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        }
    ]
}
```

{% endcode %}
{% endtab %}

{% tab title="400: Bad Request Failed to response to the user" %}

```javascript
{
    status:"error"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Internal Server Error" %}

```javascript
{
    status:"Internal Server Error"
}
```

{% endtab %}
{% endtabs %}

### Input Example

{% code title="Request Code Block" %}

```
{
    "journeyId":"7851b4e3-df09-4ab6-8091-xxxxxx",
    "type":"passport",
    "version": "3",
    "country": "OTHER",
    "halfSizeImage":""
}
```

{% endcode %}

{% hint style="warning" %}
Please make sure the **"version": "X"** is the latest version. You may refer to [here](https://api2-ekycapis.innov8tif.com/okaydoc/okaydoc-all/supported-documents/passport/versions).
{% endhint %}

#### Postman Collection

{% hint style="info" %}
Get the Postman Collection\
<https://api2-ekycportal.innov8tif.com/emas-ekyc-portal/postman-collection>
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api2-ekycportal.innov8tif.com/emas-ekyc-portal/centralized-okaydoc/passport.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
