# Version 2

<mark style="color:green;">`POST`</mark> `https://okayiddemo.innov8tif.com/okayid/api/v2/ocr`

#### Request Body

| Name              | Type   | Description                                                  |
| ----------------- | ------ | ------------------------------------------------------------ |
| faceImageEnabled  | string | Set to true - Cropped face image will be returned            |
| imageEnabled      | string | Set to True - Cropped document image will be returned        |
| imageFormat       | string | Clarify the image format jpg, jpeg, png, bmp, gif, tiff, tif |
| backImage         | string | Back id card image in base64                                 |
| base64ImageString | string | Front id card/passport image in base64                       |
| apiKey            | string | To be assigned by Innov8tif                                  |

{% tabs %}
{% tab title="200 PageIndex is used to identify whether the base64 string in images array is front/back image.
PageIndex 0 is front; PageIndex 1 is back." %}

```
{
    "status": "success",
    "message": "",
    "images": [
        {
            "Base64ImageString": "/9j/4AA...",
            "Format": null,
            "LightIndex": 6,
            "PageIndex": 1
        },
        {
            "Base64ImageString": "/9j/4AA...",
            "Format": null,
            "LightIndex": 6,
            "PageIndex": 0
        }
    ],
    "result": [
        {
            "ListVerifiedFields": {
                "pFieldMaps": [
                    {
                        "wLCID": 0,
                        "FieldType": 1,
                        "wFieldType": 1,
                        "Field_MRZ": null,
                        "Field_Visual": "MYS",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    },
                    {
                        "wLCID": 0,
                        "FieldType": 2,
                        "wFieldType": 2,
                        "Field_MRZ": null,
                        "Field_Visual": "000000000000",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    },
                    {
                        "wLCID": 0,
                        "FieldType": 5,
                        "wFieldType": 5,
                        "Field_MRZ": null,
                        "Field_Visual": "11/26/0000",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    },
                    {
                        "wLCID": 1086,
                        "FieldType": 71172108,
                        "wFieldType": 12,
                        "Field_MRZ": null,
                        "Field_Visual": "LELAKI",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    },
                    {
                        "wLCID": 0,
                        "FieldType": 12,
                        "wFieldType": 12,
                        "Field_MRZ": null,
                        "Field_Visual": "M",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    },
                    {
                        "wLCID": 0,
                        "FieldType": 17,
                        "wFieldType": 17,
                        "Field_MRZ": null,
                        "Field_Visual": "00. SUBANG JAYA^47620 SUBANG JAYA^SELANGOR",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    },
                    {
                        "wLCID": 0,
                        "FieldType": 25,
                        "wFieldType": 25,
                        "Field_MRZ": null,
                        "Field_Visual": "XX XXXX",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    },
                    {
                        "wLCID": 0,
                        "FieldType": 38,
                        "wFieldType": 38,
                        "Field_MRZ": null,
                        "Field_Visual": "Malaysia",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    },
                    {
                        "wLCID": 0,
                        "FieldType": 57,
                        "wFieldType": 57,
                        "Field_MRZ": null,
                        "Field_Visual": "00000000000000",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    },
                    {
                        "wLCID": 0,
                        "FieldType": 168,
                        "wFieldType": 168,
                        "Field_MRZ": null,
                        "Field_Visual": "00000000",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    },
                    {
                        "wLCID": 0,
                        "FieldType": 185,
                        "wFieldType": 185,
                        "Field_MRZ": null,
                        "Field_Visual": "24",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    },
                    {
                        "wLCID": 0,
                        "FieldType": 433,
                        "wFieldType": 433,
                        "Field_MRZ": null,
                        "Field_Visual": "WARGANEGARA",
                        "Matrix": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ]
                    }
                ]
            }
        }
    ],
    "faceImages": "/9j/4AAQ..."
}
```

{% endtab %}
{% endtabs %}

### Input Example

{% code title="JSON " %}

```
{
    "base64ImageString": "/9j/4AAQSkZJRgAB...wEwJefc\r\nf//Z\r\n",
    "backImage":"/9j/4AAQSkZJRgAB...wEwJefc\r\nf//Z\r\n",
    "apiKey":"API_KEY",               
    "imageFormat":".jpg",
    "imageEnabled":true,
    "faceImageEnabled": true
}
```

{% endcode %}

{% file src="<https://253651193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpQle72tz7-gm8Gk4Bg%2F-LzB2M45OIddoz53l2BG%2F-LzB2jjmMAmQoWqSolqW%2FOkayID-%20OCR.postman_collection.json?alt=media&token=b85ffc14-e92b-4896-924e-49c4c9eaf26f>" %}
OkayID v2
{% endfile %}
