MENU
      Resident registration card

        Resident registration card


        Article summary

        Available in Classic and VPC

        Recognize and extract key-value input information from resident registration cards using a specialized model engine.

        Request

        This section describes the request format. The method and URI are as follows:

        MethodURI
        POST/id-card

        Request headers

        For information about the headers common to all CLOVA OCR APIs, see CLOVA OCR request headers.

        Request body

        You can include the following data in the body of your request:

        If Content-Type: application/json

        You can include the following data in the body of your request if the request header's Content-Type is application/json:

        FieldTypeRequiredDescription
        versionString-Version information
        • Only use V2
        requestIdStringRequiredRandom API call UUID
        timestampIntegerRequiredRandom API call time (timestamp)
        imagesArrayRequiredimages details

        If Content-Type: multipart/form-data

        You can include the following data in the body of your request if the request header's Content-Type is multipart/form-data:

        FieldTypeRequiredDescription
        messageObjectRequiredRequest data information
        message.versionStringRequiredVersion information
        • Only use V2
        message.requestIdStringRequiredRandom API call UUID
        message.timestampIntegerRequiredRandom API call time (timestamp)
        message.imagesArrayRequiredimages details
        fileFileRequiredOCR recognition image file

        images

        The following describes images.

        FieldTypeRequiredDescription
        formatStringRequiredImage format
        • jpg | jpeg | png | pdf | tif | tiff
          • Image: jpg, jpeg, png
          • Single page: pdf, tif, tiff
        • Select and enter one of the image formats
        nameStringRequiredRandom image name
        • Use to identify images and check response results
        dataStringRequiredBase64-encoded image data
        • Can be entered if Content-Type: application/json

        Request example

        The request example is as follows:

        If Content-Type: application/json

        The request example if the request header's Content-Type is application/json is as follows:

        curl --location --request POST 'https://cbgrx5natw.apigw.ntruss.com/custom/v1/{DomainId}/{InvokeKey}/document/id-card' \
        --header 'Content-Type: application/json' \
        --header 'X-OCR-SECRET: {Secret key issued when registering the app}' \
        --data '{
            "version": "V2",
            "requestId": "string",
            "timestamp": 0,
            "images": [
                {
                    "format": "png",
                    "name": "idcard_test",
                    "data":"{Base64-encoded image data}"
                }
            ]
         }'
        Shell

        If Content-Type: multipart/form-data

        The request example if the request header's Content-Type is multipart/form-data is as follows:

        curl --location --request POST 'https://cbgrx5natw.apigw.ntruss.com/custom/v1/{DomainId}/{InvokeKey}/document/id-card' \
        --header 'X-OCR-SECRET: {Secret key issued when registering the app}' \
        --header 'Content-Type: multipart/form-data' \
        --form 'message="{\"version\": \"V2\", \"requestId\": \"1234\", \"timestamp\": 1724832750462, \"images\": [{\"format\": \"png\", \"name\": \"idcard_test\"}]}"' \
        --form 'file=@"{file}"'
        Shell

        Response

        This section describes the response format.

        Response body

        The response body includes the following data:

        FieldTypeRequiredDescription
        versionString-Version information
        • Only use V2
        requestIdString-Random API call UUID
        timestampInteger-API call time (timestamp)
        imagesArray-images details

        images

        The following describes images.

        FieldTypeRequiredDescription
        uidString-Resident registration card image UID
        • Use for API validity checks
        nameString-Resident registration card image name
        • Use to identify images and check response results
        inferResultString-Resident registration card image recognition result
        • SUCCESS | FAILURE | ERROR
          • SUCCESS: recognition successful
          • FAILURE: recognition failure
          • ERROR: recognition processing exception
        messageString-Result message
        validationResultObject-Validity check result information
        validationResult.resultString-Validity check result code
        • NO_REQUESTED | UNCHECKED | ERROR | VALID | INVALID
          • NO_REQUESTED: no validation action requested (validity check failed)
          • UNCHECKED: unable to verify validation
          • ERROR: error on validation (validity check failed)
          • VALID: validation result valid (validity check succeeded)
          • INVALID: failed to pass validation
        validationResult.messageString-Validity check result details message
        • This value is not always returned
        convertedImageInfoObject-Converted image information
        • If format is pdf or tiff
        • Coordinate values are set relative to the called image file
        convertedImageInfo.widthInteger-Converted image width
        convertedImageInfo.heightInteger-Converted image height
        convertedImageInfo.pageIndexInteger-Converted image page index
        idCardObject-ID card details
        idCard.metaObject-Meta information
        idCard.meta.estimatedLanguageString-OCR estimated language
        • ko | en | ja
          • ko:Korean
          • en: English
          • ja: Japanese
        idCard.resultObject-ID card OCR recognition result

        result

        The following describes result.

        FieldTypeRequiredDescription
        isConfidentBoolean-Whether it has details for each type
        • true | false
          • true: has
          • false: doesn't have
        icObject-Resident registration card information
        ic.nameArray-Name details
        ic.personalNumArray-Resident registration number details
        ic.addressArray-Address details
        ic.issueDateArray-Issuance date details
        ic.authorityArray-Issuing authority details
        roisArray-Object border position information
        idTypeString-ID card type
        • ID Card

        name

        The following describes ic.name.

        FieldTypeRequiredDescription
        textString-Recognized name text
        formattedObject-Recognized name text information
        formatted.valueString-Recognized name text value
        keyTextString-Key value of recognized name text
        confidenceScoreFloat-Confidence of recognized name text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        personalNum

        The following describes ic.personalNum.

        FieldTypeRequiredDescription
        textString-Recognized resident registration number text
        formattedObject-Recognized resident registration number text information
        formatted.valueString-Recognized resident registration number text value
        keyTextString-Key value of recognized resident registration number text
        confidenceScoreFloat-Confidence of recognized resident registration number text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        address

        The following describes ic.address.

        FieldTypeRequiredDescription
        textString-Recognized address text
        formattedObject-Recognized address text information
        formatted.valueString-Recognized address text value
        keyTextString-Key value of recognized address text
        confidenceScoreFloat-Confidence of recognized address text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        issueDate

        The following describes ic.issueDate.

        FieldTypeRequiredDescription
        textString-Recognized issuance date text
        formattedObject-Recognized issuance date text information
        formatted.yearString-Year (yyyy) of recognized issuance date
        formatted.monthString-Month (MM) of recognized issuance date
        formatted.dayString-Day (dd) of recognized issuance date
        keyTextString-Key value of recognized issuance date text
        confidenceScoreFloat-Confidence of recognized issuance date text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        authority

        The following describes ic.authority.

        FieldTypeRequiredDescription
        textString-Recognized issuing authority text
        formattedObject-Recognized issuing authority text information
        formatted.valueString-Recognized issuing authority text value
        keyTextString-Key value of recognized issuing authority text
        confidenceScoreFloat-Confidence of recognized issuing authority text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        rois

        The following describes rois.

        FieldTypeRequiredDescription
        FieldTypeRequiredDescription
        ------------
        xFloat-Object border position X-axis coordinate value
        yFloat-Object border position Y-axis coordinate value

        boundingPolys

        The following describes boundingPolys.

        FieldTypeRequiredDescription
        verticesArray-vertices details

        maskingPolys

        The following describes maskingPolys.

        FieldTypeRequiredDescription
        verticesArray-vertices details

        boundingPolyVertices

        The following describes boundingPolyVertices.

        FieldTypeRequiredDescription
        xFloat-X-axis coordinate value
        yFloat-Y-axis coordinate value

        Response status codes

        For response status codes common to all CLOVA OCR APIs, see Common CLOVA OCR response status codes.

        Response example

        The response example is as follows:

        Success

        The following is a sample response upon a successful call.

        {
            "version": "V2",
            "requestId": "1234",
            "timestamp": 1725406864631,
            "images": [
                {
                    "uid": "{uid}",
                    "name": "idcard_test",
                    "inferResult": "SUCCESS",
                    "message": "SUCCESS",
                    "validationResult": {
                        "result": "NO_REQUESTED"
                    },
                    "idCard": {
                        "meta": {
                            "estimatedLanguage": "ko"
                        },
                        "result": {
                            "isConfident": true,
                            "ic": {
                                "name": [
                                    {
                                        "text": "Hong**",
                                        "formatted": {
                                            "value": "Hong**"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 72.2125,
                                                        "y": 116.6
                                                    },
                                                    {
                                                        "x": 367.6875,
                                                        "y": 116.6
                                                    },
                                                    {
                                                        "x": 367.6875,
                                                        "y": 165.625
                                                    },
                                                    {
                                                        "x": 72.2125,
                                                        "y": 165.625
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": []
                                    }
                                ],
                                "personalNum": [
                                    {
                                        "text": "800***-234****",
                                        "formatted": {
                                            "value": "800***-234****"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 65.5875,
                                                        "y": 181.52498
                                                    },
                                                    {
                                                        "x": 363.71246,
                                                        "y": 181.52498
                                                    },
                                                    {
                                                        "x": 363.71246,
                                                        "y": 216.63748
                                                    },
                                                    {
                                                        "x": 65.5875,
                                                        "y": 216.63748
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 211.13873,
                                                        "y": 178.01373
                                                    },
                                                    {
                                                        "x": 367.22372,
                                                        "y": 178.01373
                                                    },
                                                    {
                                                        "x": 367.22372,
                                                        "y": 220.14873
                                                    },
                                                    {
                                                        "x": 211.13873,
                                                        "y": 220.14873
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ],
                                "address": [
                                    {
                                        "text": "Seoul***",
                                        "formatted": {
                                            "value": "Seoul***"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 51.675,
                                                        "y": 235.1875
                                                    },
                                                    {
                                                        "x": 192.7875,
                                                        "y": 235.1875
                                                    },
                                                    {
                                                        "x": 192.7875,
                                                        "y": 272.2875
                                                    },
                                                    {
                                                        "x": 51.675,
                                                        "y": 272.2875
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": []
                                    }
                                ],
                                "issueDate": [
                                    {
                                        "text": "2020.08.16",
                                        "formatted": {
                                            "year": "2020",
                                            "month": "08",
                                            "day": "16"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 242.475,
                                                        "y": 351.7875
                                                    },
                                                    {
                                                        "x": 374.3125,
                                                        "y": 351.7875
                                                    },
                                                    {
                                                        "x": 374.3125,
                                                        "y": 381.6
                                                    },
                                                    {
                                                        "x": 242.475,
                                                        "y": 381.6
                                                    }
                                                ]
                                            },
                                        ],
                                        "maskingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 239.52966,
                                                        "y": 349.0218
                                                    },
                                                    {
                                                        "x": 424.9578,
                                                        "y": 349.0217
                                                    },
                                                    {
                                                        "x": 424.9578,
                                                        "y": 384.3657
                                                    },
                                                    {
                                                        "x": 239.52968,
                                                        "y": 384.36578
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ],
                                "authority": [
                                    {
                                        "text": "Head of ** gu, Seoul**",
                                        "formatted": {
                                            "value": "Head of ** gu, Seoul"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 146.53316,
                                                        "y": 381.33884
                                                    },
                                                    {
                                                        "x": 326.93195,
                                                        "y": 383.12497
                                                    },
                                                    {
                                                        "x": 326.47778,
                                                        "y": 428.99695
                                                    },
                                                    {
                                                        "x": 146.07898,
                                                        "y": 427.21082
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": []
                                    }
                                ]
                            },
                            "rois": [
                                {
                                    "vertices": [
                                        {
                                            "x": 3.1388545,
                                            "y": 3.9956706
                                        },
                                        {
                                            "x": 754.52325,
                                            "y": -5.092327
                                        },
                                        {
                                            "x": 747.84045,
                                            "y": 473.14856
                                        },
                                        {
                                            "x": 2.264223,
                                            "y": 474.4076
                                        }
                                    ]
                                }
                            ],
                            "idtype": "ID Card"
                        }
                    }
                }
            ]
        }
        JSON

        Failure

        The following is a sample response upon a failed call.

        {
            "version": "V2",
            "requestId": "1234",
            "timestamp": 1725235840459,
            "images": [
                {
                    "uid": "{uid}",
                    "name": "idcard_sample",
                    "inferResult": "ERROR",
                    "message": "Read page:0 error.",
                    "validationResult": {
                        "result": "NO_REQUESTED"
                    }
                }
            ]
        }
        JSON

        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.