# Non-passport

## &#x20;Overview - **MyKad**

The purpose of this API is to perform multiple checkings. However, all these checkings only available to MyKad for now.

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

* Font Checking
* Microprint Check
* Photo Substitution Check
* Color Mode
* Hologram
* Screen Detection
* Ghost Photo Color Detection
* ID Blur Detection
* ID Brightness Detection
* Landmark Checking
* ~~Content Substitution (beta)~~ **(NOT suggested to use)**

## **Overview - Non-MyKad**

The purpose of this API is to perform landmark checking, screen detection, and more. However, only some of the supported countries that contain the checkings that can find [<mark style="color:orange;">here</mark>](https://docs.google.com/spreadsheets/d/1R6ZjtXfo5xUY3ZuhhQAviFIgLsKcKw1cJaViMdjngzA/edit?ts=5e421bdc#gid=0) <mark style="color:orange;">(Google Sheets)</mark>.

The Centralized OkayID API and the input of the Centralized OkayID are the same image. Although the input of OkayID and OkayDoc should be the same, it is not necessary for the document to pass from Centralized OkayID to Centralized OkayDoc.

#### Steps (for both MyKad & Non-MyKad):

1. User will need to re-use the JourneyId and call 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-mykad) is separated to help with viewing the API component in more details.&#x20;
4. &#x20;User can expand the API Method for both APIs to read the descriptions for further understanding and follow the [Example](https://api2-ekycportal.innov8tif.com/emas-ekyc-portal/centralized-okaydoc/non-passport/sample-input) given to correctly call the API. The example contains different kinds of use cases to do the calling of the API.
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>](https://api2-ekycportal.innov8tif.com/emas-ekyc-portal/image-requirement/okaydoc)" section to get the best result for each API return
{% endhint %}

## API Method (MyKad)

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

&#x20;

#### Request Body

| Name                                                 | Type    | Description                                                                                                                                                                                                                                                       |
| ---------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| idBrightnessDetection                                | boolean | <p>Default is False.<br>Set True to detect the brightness of the id image.</p>                                                                                                                                                                                    |
| idBlurDetection                                      | boolean | <p>Default is False.<br>Set True to detect the blurriness of id image</p>                                                                                                                                                                                         |
| ghostPhotoColorDetection                             | boolean | <p>Default is False.<br>Set True to do ghost photo color detection.</p>                                                                                                                                                                                           |
| screenDetection                                      | boolean | <p>Default is False.<br>Set True to do screen detection.</p>                                                                                                                                                                                                      |
| hologram                                             | boolean | <p>Default is False.<br>Set True to do hologram detection.</p>                                                                                                                                                                                                    |
| colorMode                                            | boolean | <p>Default is True.<br>Set False to disable color checking.</p>                                                                                                                                                                                                   |
| icTypeCheck                                          | boolean | <p>Default is True.<br>Set False to disable IC type checking.</p>                                                                                                                                                                                                 |
| photoSubstitutionCheck                               | boolean | <p>Default is True.<br>Set False to disable photo substitution checking.<br></p>                                                                                                                                                                                  |
| microprintCheck                                      | boolean | <p>Default is True.<br>Set False to disable microprint checking.</p>                                                                                                                                                                                              |
| fontCheck                                            | boolean | <p>Default is True.<br>Set False to disable font checking.</p>                                                                                                                                                                                                    |
| landmarkCheck                                        | boolean | <p>Default is True.<br>Set False to disable landmark checking.</p>                                                                                                                                                                                                |
| journeyId<mark style="color:red;">\*</mark>          | string  | To be assigned by Innov8tif                                                                                                                                                                                                                                       |
| idImageBase64Image<mark style="color:red;">\*</mark> | string  | <p>Front id card image in base64. Refer to the link below for image requirement.<br><https://api.innov8tif.com/okaydoc/image-quality-requirements></p>                                                                                                            |
| otherDocList                                         | array   | <p><code>"otherDocList": \[ { "base64Image": "", "type": "with\_flash" } ]</code></p><p><em><mark style="color:orange;">Note: To capture flash image for hologram detection purpose. It increase the chances to detect the hologram from OkayDoc.</mark></em></p> |
| version <mark style="color:red;">\*</mark>           | String  | Latest version of the API                                                                                                                                                                                                                                         |
| type<mark style="color:red;">\*</mark>               | String  | "nonpassport" for this case. If is passport, change to "passport"                                                                                                                                                                                                 |
| docType<mark style="color:red;">\*</mark>            | String  | The doctype can be refer [here](https://api2-ekycportal.innov8tif.com/emas-ekyc-portal/centralized-okaydoc/supported-document-non-passport). For this case is "mykad"                                                                                             |

{% tabs %}
{% tab title="200 API Successfully  Call" %}

```
{
    "status": "success",
    "messageCode": "api.success",
    "message": "",
    "id": "848a9a59-3a20-4688-b560-c23f8da7caa7",
    "methodList": [
        {
            "method": "landmark",
            "label": "Landmark Analysis Result",
            "componentList": [
                {
                    "code": "l-mykad-header",
                    "label": "Kad Pengenalan Header",
                    "value": "34.4195",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-mykad-header",
                    "refImageUrl": null
                },
                {
                    "code": "l-mykad-logo",
                    "label": "MyKad Logo",
                    "value": "95.5827",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-mykad-logo",
                    "refImageUrl": null
                },
                {
                    "code": "l-my-flag-logo",
                    "label": "Malaysia Flag",
                    "value": "96.8136",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-my-flag-logo",
                    "refImageUrl": null
                },
                {
                    "code": "l-chip",
                    "label": "Chip",
                    "value": "75.511",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-chip",
                    "refImageUrl": null
                },
                {
                    "code": "l-hibiscus",
                    "label": "Hibiscus",
                    "value": "68.65390000000001",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-hibiscus",
                    "refImageUrl": null
                },
                {
                    "code": "l-msc",
                    "label": "MSC",
                    "value": "93.5061",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-msc",
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "font",
            "label": "MyKad Font Checking Result",
            "componentList": [
                {
                    "code": "f-id-no",
                    "label": "ID No",
                    "value": "Pass",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=f-id-no",
                    "refImageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=f-id-no-ref"
                }
            ]
        },
        {
            "method": "microprint",
            "label": "Microprint Score",
            "componentList": [
                {
                    "code": "microprint",
                    "label": "Microprint",
                    "value": "12",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=microprint",
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "hologram",
            "label": "Hologram",
            "componentList": [
                {
                    "code": "hologram",
                    "label": "Hologram",
                    "value": "Fail,Fail",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=hologram",
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "substitution",
            "label": "Ghost Photo Comparison",
            "componentList": [
                {
                    "code": "substitution",
                    "label": "Substitution Score",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "docType",
            "label": "MyKad Type",
            "componentList": [
                {
                    "code": "docType",
                    "label": "IC Type",
                    "value": "New IC",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "colorMode",
            "label": "Color Mode",
            "componentList": [
                {
                    "code": "colorMode",
                    "label": "Color",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "screen",
            "label": "Screen Detection",
            "componentList": [
                {
                    "code": "screen",
                    "label": "Screen Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "holocolor",
            "label": "Ghost Photo Color Detection",
            "componentList": [
                {
                    "code": "holocolor",
                    "label": "Ghost Photo Color Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "idBlurDetection",
            "label": "ID Blur Detection",
            "componentList": [
                {
                    "code": "idBlurDetection",
                    "label": "ID Blur Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "idBrightnessDetc",
            "label": "ID Brightness Detection",
            "componentList": [
                {
                    "code": "idBrightnessDetc",
                    "label": "ID Brightness Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        }
        
    ],
    "outputImageList": [
        {
            "tag": "holoFace",
            "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=holoFace"
        },
        {
            "tag": "idFace",
            "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=idFace"
        }
    ]
}
```

{% endtab %}

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

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

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

## **API Method (Non-MyKad)**

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

#### Request Body

| Name                                                 | Type   | Description                                                                                                                                                                                                                                                                                                                                                                 |
| ---------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| docType<mark style="color:red;">\*</mark>            | string | Document type can be found here: <https://api2-ekycportal.innov8tif.com/emas-ekyc-portal/centralized-okaydoc/non-passport/document-type-and-version>                                                                                                                                                                                                                        |
| version<mark style="color:red;">\*</mark>            | string | <p>Version can be found here: <br><a href="https://api2-ekycportal.innov8tif.com/emas-ekyc-portal/centralized-okaydoc/non-passport/document-type-and-version"><https://api2-ekycportal.innov8tif.com/emas-ekyc-portal/centralized-okaydoc/non-passport/document-type-and-version></a></p>                                                                                   |
| idImageBase64Image<mark style="color:red;">\*</mark> | string | ID card image in base64.                                                                                                                                                                                                                                                                                                                                                    |
| type<mark style="color:red;">\*</mark>               | string | non-passport                                                                                                                                                                                                                                                                                                                                                                |
| journeyId<mark style="color:red;">\*</mark>          | string | Retrieve from 'Create JourneyID' API                                                                                                                                                                                                                                                                                                                                        |
| otherDocList                                         | Array  | <p><code>"otherDocList": \[ { "base64Image": "", "type": "with\_flash" } ]</code></p><p><mark style="color:orange;">Note: To capture flash image for hologram detection purpose. It increase the chances to detect the hologram from OkayDoc.</mark><br><em><mark style="color:purple;">Please check with Innov8tif support team if you unsure about this.</mark></em> </p> |

{% tabs %}
{% tab title="200 myKad's response, use the following prefix to get landmark imagehttps\://okaydocdev.innov8tif.com/ekyc" %}
{% code title="Response Code Block" %}

```
{
    "status": "success",
    "messageCode": "api.success",
    "message": "",
    "id": "848a9a59-3a20-4688-b560-c23f8da7caa7",
    "methodList": [
        {
            "method": "landmark",
            "label": "Landmark Analysis Result",
            "componentList": [
                {
                    "code": "l-mykad-header",
                    "label": "Kad Pengenalan Header",
                    "value": "34.4195",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-mykad-header",
                    "refImageUrl": null
                },
                {
                    "code": "l-mykad-logo",
                    "label": "MyKad Logo",
                    "value": "95.5827",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-mykad-logo",
                    "refImageUrl": null
                },
                {
                    "code": "l-my-flag-logo",
                    "label": "Malaysia Flag",
                    "value": "96.8136",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-my-flag-logo",
                    "refImageUrl": null
                },
                {
                    "code": "l-chip",
                    "label": "Chip",
                    "value": "75.511",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-chip",
                    "refImageUrl": null
                },
                {
                    "code": "l-hibiscus",
                    "label": "Hibiscus",
                    "value": "68.65390000000001",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-hibiscus",
                    "refImageUrl": null
                },
                {
                    "code": "l-msc",
                    "label": "MSC",
                    "value": "93.5061",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=l-msc",
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "font",
            "label": "MyKad Font Checking Result",
            "componentList": [
                {
                    "code": "f-id-no",
                    "label": "ID No",
                    "value": "Pass",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=f-id-no",
                    "refImageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=f-id-no-ref"
                }
            ]
        },
        {
            "method": "microprint",
            "label": "Microprint Score",
            "componentList": [
                {
                    "code": "microprint",
                    "label": "Microprint",
                    "value": "12",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=microprint",
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "hologram",
            "label": "Hologram",
            "componentList": [
                {
                    "code": "hologram",
                    "label": "Hologram",
                    "value": "Fail,Fail",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=hologram",
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "substitution",
            "label": "Ghost Photo Comparison",
            "componentList": [
                {
                    "code": "substitution",
                    "label": "Substitution Score",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "docType",
            "label": "MyKad Type",
            "componentList": [
                {
                    "code": "docType",
                    "label": "IC Type",
                    "value": "New IC",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "colorMode",
            "label": "Color Mode",
            "componentList": [
                {
                    "code": "colorMode",
                    "label": "Color",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "screen",
            "label": "Screen Detection",
            "componentList": [
                {
                    "code": "screen",
                    "label": "Screen Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "holocolor",
            "label": "Ghost Photo Color Detection",
            "componentList": [
                {
                    "code": "holocolor",
                    "label": "Ghost Photo Color Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "idBlurDetection",
            "label": "ID Blur Detection",
            "componentList": [
                {
                    "code": "idBlurDetection",
                    "label": "ID Blur Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "idBrightnessDetc",
            "label": "ID Brightness Detection",
            "componentList": [
                {
                    "code": "idBrightnessDetc",
                    "label": "ID Brightness Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "faceBrightnessDetc",
            "label": "Face Brightness Detection",
            "componentList": [
                {
                    "code": "faceBrightnessDetc",
                    "label": "Face Brightness Detection",
                    "value": "Pass",
                    "imageUrl": null,
                    "refImageUrl": null
                }
            ]
        },
        {
            "method": "contentSubstitution",
            "label": "Content Substitution",
            "componentList": [
                {
                    "code": "contentSubstitution",
                    "label": "Content Substitution",
                    "value": "Pass",
                    "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=contentSubstitution",
                    "refImageUrl": null
                }
            ]
        }
    ],
    "outputImageList": [
        {
            "tag": "holoFace",
            "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=holoFace"
        },
        {
            "tag": "idFace",
            "imageUrl": "/public/image/v2/848a9a59-3a20-4688-b560-c23f8da7caa7?type=idFace"
        }
    ]
}
```

{% endcode %}
{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    // Response
}
```

{% endtab %}

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

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Please refer to the page below for more information regarding about the supported documents for Non-passport
{% endhint %}

{% content-ref url="non-passport/document-type-and-version" %}
[document-type-and-version](https://api2-ekycportal.innov8tif.com/emas-ekyc-portal/centralized-okaydoc/non-passport/document-type-and-version)
{% endcontent-ref %}

#### Postman Collection

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