CLOVA OCR Document API
    • PDF

    CLOVA OCR Document API

    • PDF

    Article Summary

    version

    VersionDateChanges
    v1.0.02021-03-04최초작성
    v1.0.12021-05-19add medical receipt
    v1.0.22021-07-22foundValuesSum -> foundValueSum
    add maskingPolys in IDCard
    v1.0.32021-09-16add Alien Registration card in IDCard
    v1.0.42022-04-21IDCard add rois
    Alien Registration add alienRegNumEtc
    CreditCard add name
    v1.0.52023-05-25passport mrz api

    요청

    MethodRequest URI
    POSTCLOVA OCR 빌더에서 생성된 API Gateway의 InvokeURL로 호출합니다.
    각 도메인마다 고유의 호출 URL이 생성됩니다.

    Requesting document OCR recognition

    구분설명Path
    Document영수증/document/receipt
    Document신용카드/document/credit-card
    Document명함/document/name-card
    Document사업자등록증/document/biz-license
    Document신분증(주민등록증, 운전면허증, 여권)/document/id-card
    Document의료 영수증/document/medical-receipt
    Document여권(Global)/document/passport

    요청 헤더

    헤더명설명
    X-OCR-SECRET도메인에서 API Gateway 연동시 생성한 X-OCR-SECRET:{Client Secret}
    Content-Typeapplication/json : request use json body. Support image.data encoded with base64.
    - multipart/form-data : request use multipart form body. Support image file transferred as stream.

    요청 바디

    Content-Type : application/json

    1. 이미지 인식 요청
    구분Json Model
    이미지 인식 요청{
    "version": "string",
    "requestId": "string",
    "timestamp": 0,
    "images": [{ "format": "string", "data": "string", "name": "string"}]
    }

    이미지 인식 요청 필드 상세 설명

    필드명필수 여부타입설명제약 사항
    versionYesstring"V2"로 고정
    requestIdYesstringAPI 호출 UUID입니다.
    timestampYes0API 호출 Timestamp 값입니다.
    imagesYesstringJson array로 입력되며, 현재는 1개의 이미지 입력만 허용 됩니다. (한국어/일본어)
    images.formatYesstring이미지 포맷을 설정합니다.“jpg”, “jpeg”, “png” 이미지,"pdf","tiff" 단일 페이지 형식을 지원합니다.
    image.dataYesstringimage.data는 base64 인코딩 이미지 바이트입니다.
    image.nameYesstring이미지 명을 입력합니다. 이미지를 식별하는데 사용되며, 응답 결과 확인에 사용됩니다.

    CURL example:

    curl --request POST 'your apigw invoke url' \
    --header 'X-OCR-SECRET: your secret key' \
    --data-raw '{"images":[{"format":"jpg","name":"demo","data":"your image base64 bytes"}],"requestId":"guide-json-demo","version":"V2","timestamp":1584062336793}'
    

    Content-Type : multipart/form-data

    1. 이미지 인식 요청
    KEYRequiredVALUE
    messageY{"version": "string","requestId": "string","timestamp": 0,"images": [{ "format": "string", "name": "string" }]}
    fileYimage file steam data

    Form Data Message Value Description

    Field nameRequiredTypeDescriptionConstraints
    versionYesstring"V2"로 고정
    requestIdYesstringAPI 호출 UUID입니다.
    timestampYesintegerAPI 호출 Timestamp 값입니다.
    imagesYesstringIt is entered as Json array and currently only one image input is allowed.
    images.formatYesstring이미지 포맷을 설정합니다.“jpg”, “jpeg”, “png” 이미지 ,"pdf","tiff" 단일 페이지형식을 지원합니다.
    image.nameYesstring이미지 명을 입력합니다. 이미지를 식별하는데 사용되며, 응답 결과 확인에 사용됩니다.

    CURL example:

    curl --request POST 'your apigw invoke url' \
    --header 'X-OCR-SECRET: your secret key' \
    --form 'message={"images":[{"format":"png","name":"demo"}],"requestId":"guide-demo","version":"V2","timestamp":1584062336793}' \
    --form 'file=@image.png'
    

    응답

    응답 바디

    1. Image Recognition Results
    ClassificationJson Model
    Image Recognition Results{
    "uid": "string",
    "name": "string",
    "inferResult": "string",
    "message": "string",
    "receipt": {},
    "creditCard": {},
    "bizLicense": {},
    "idCard": {},
    "nameCard": {},
    "passport": {},
    "validationResult": { "result": "string", "message": "string"}
    }

    Detailed description of the Image Recognition Results field

    Field NameData TypeDescription
    uidstringA unique ID that is provided to validate the API, which is used to track validation requests.
    namestringThe requested image name.
    inferResultstringImage inference result.
    "SUCCESS": Image recognition successful. “FAILURE”: Image recognition failed.“ERROR”: Image recognition exception.
    messagestringSuccessful image recognition, "SUCCESS"
    If image recognition fails, an error message is displayed.
    Error messages are detailed at the bottom
    receiptjson objectreceipt object reference
    creditCardjson objectcreditCard object reference
    bizLicensejson objectbizLicense object reference
    idCardjson objectidCard object reference
    nameCardjson objectnameCard object reference
    passportjson objectpassport object reference
    medical receiptjson objectmedicalReceipt object reference
    validationResultjson objectValidation result.
    validationResult.resultstringResult Code.
    “NO_REQUESTED”: The validation task did not run.
    “UNCHECKED”: Action response not confirmed or not accepted
    “ERROR”: Error executing validation.
    “VALID”: The verification result is valid.
    “INVALID”: The verification result is invalid.
    “UNCHECHED”,“ERROR” and “INVALID” are marked as validation failures.
    validationResult.messagestringIt is not always the value that is returned in the Validation detail message.
    convertedImageInfojson objectOnly response when image format is pdf/tiff.
    Coordinates are based on converted image when request format is pdf/tiff.
    convertedImageInfo.widthintegerThe base image width.
    convertedImageInfo.heightintegerThe base image height.
    convertedImageInfo.pageIndexintegerThe page index of pdf/tiff
    1. receipt object
    ClassificationJson Model
    receipt Field{
    "meta": {},
    "result": {},
    }

    Receipt Object Field Details

    Field NameData TypeDescription
    metajson objectMeta information | 메타 정보
    meta.estimatedLanguagestringThe language estimated by OCR (en: English, ja: Japanese, ko: Korean) | OCR 인식 언어
    resultjson objectRecognition result | 인식 결과
    result.storeInfojson objectStore information | 매장 정보
    result.storeInfo.poiInfoPoiObject[]Place-of-interest (POI) grounding result | POI 그라운딩 결과
    result.storeInfo.nameStringObjectName of the store | 상호명
    result.storeInfo.subNameStringObjectBranch name of the store | 지점명
    result.storeInfo.bizNumStringObjectBusiness number of the store | 사업자번호
    result.storeInfo.movieNameStringObjectMovie name | 영화 제목 (영화표 관련 항목)
    result.storeInfo.addressStringObject[]Address of the store | 매장 주소
    result.storeInfo.telTelObject[]Telephone number of the store
    result.paymentInfojson objectPayment Information | 결제 정보
    result.paymentInfo.dateDateObjectTransaction date | 결제 날짜
    result.paymentInfo.timeTimeObjectTransaction time | 결제 시간
    result.paymentInfo.cardInfojson objectTransaction card information
    result.paymentInfo.cardInfo.companyStringObjectName of the card company | 카드사 이름
    result.paymentInfo.cardInfo.numberStringObjectCard number | 카드 번호
    result.paymentInfo.confirmNumBaseObjectTransaction confirmation number | 결제 번호
    result.subResultsjson arraySub results | 항목 그룹 정보
    result.subResults.itemsjson arrayItem list | 인식된 항목 정보 (메뉴 등)
    result.subResults.items.nameStringObjectItem name | 항목명
    result.subResults.items.codeStringObjectItem code | 항목 코드
    result.subResults.items.countFloatObjectItem quantity | 항목 수량
    result.subResults.items.priceInfojson objectItem price information | 가격정보
    result.subResults.items.priceInfo.priceFloatObjectPrice of the item | 가격
    result.subResults.items.priceInfo.unitPriceFloatObjectUnit price of the item | 단가
    result.totalPricejson objectTotal information | 총 금액 정보
    result.totalPrice.priceFloatObjectTotal price | 총 금액
    1. creditCard object
    ClassificationJson Model
    creditCard Field{
    "meta": {},
    "result": {},
    }

    creditCard Object Field Details

    Field NameData TypeDescription
    metajson objectMeta information
    meta.estimatedLanguagestringThe language estimated by OCR (en: English, ja: Japanese, ko: Korean)
    resultjson objectRecognition result
    result.numberField objectField object reference
    result.validThruField objectField object reference
    result.nameField objectCard owner name
    Field object reference
    1. bizLicense object
    ClassificationJson Model
    bizLicense Field{
    "meta": {},
    "result": {},
    }

    bizLicense Object Field Details

    Field NameData TypeDescription
    metajson objectMeta information
    meta.estimatedLanguagestringThe language estimated by OCR (en: English, ja: Japanese, ko: Korean)
    resultjson objectRecognition result
    result.birthBaseObject[]Date of birth
    result.bisAddressBaseObject[]Business Address
    result.bisAreaBaseObject[]Area of business establishment
    result.bisItemBaseObject[]Business item
    result.registerNumberBaseObject[]Business register number
    result.bisTypeBaseObject[]Business type
    result.companyNameBaseObject[]Name of company
    result.coRepNameBaseObject[]Name of co-representatives
    result.corpNameBaseObject[]Name of corporate (group)
    result.corpRegisterNumBaseObject[]Business registration number
    result.coRepSocialNumBaseObject[]Resident registration number of co-representatives
    result.documentTypeStringObject[]Document type
    result.headAddressBaseObject[]Head office address
    result.issuanceDateBaseObject[]Date of issuance
    result.issuanceReasonBaseObject[]Reason for issuance
    result.openDateBaseObject[]Date of business commencement
    result.repNameBaseObject[]Name of representative
    result.socialNumberBaseObject[]Resident registration number
    result.taxTypeBaseObject[]Type of taxation
    1. idCard object
    ClassificationJson Model
    idcard Field{
    "meta": {},
    "result": {},
    }

    idCard Object Field Details

    Field NameData TypeDescription
    metajson objectMeta information
    meta.estimatedLanguagestringThe language estimated by OCR (en: English, ja: Japanese, ko: Korean)
    resultjson objectRecognition result
    result.isConfidentbooleanIndicator reflecting qualifications for reliability
    If required details exist for each type of ID, it is output as True, otherwise it is output as False.
    result.IDTypestringType of ID
    Return value is one of "ID Card", "Driver's License", "Passport", and "unknown".
    result.roisBoundingPoly[]Region of interest
    result.icjson objectNational ID card information
    result.ic.nameStringObject[]Name (Korean)
    result.ic.personalNumStringObject[]Personal ID number
    result.ic.addressStringObject[]Address
    result.ic.issueDateDateObject[]Issued date
    result.ic.authorityStringObject[]Issuing agency
    result.dljson objectDriver's license card information
    result.dl.typeBaseObject[]License type
    result.dl.numStringObject[]License number
    result.dl.nameStringObject[]Name (Korean)
    result.dl.personalNumStringObject[]Personal number
    result.dl.addressStringObject[]Address
    result.dl.renewStartDateDateObject[]Start date of the renewal period
    result.dl.renewEndDateDateObject[]End date of the renewal period
    result.dl.conditionStringObject[]License conditions
    result.dl.codeStringObject[]License code
    result.dl.organDonationBaseObject[]Registration for organ and tissue donation
    result.dl.issueDateDateObject[]Issued date
    result.dl.authorityStringObject[]Issuing agency
    result.ppjson objectPassport information
    result.pp.typeStringObject[]Passport type
    result.pp.issueCountryBaseObject[]Issuing country
    result.pp.numStringObject[]Passport number
    result.pp.surNameStringObject[]Surname
    result.pp.givenNameStringObject[]Given names
    result.pp.nationalityStringObject[]Nationality
    result.pp.birthDateDateObject[]Date of birth
    result.pp.personalNumStringObject[]Personal ID number
    result.pp.sexStringObject[]Sex
    result.pp.issueDateDateObject[]Date of issue
    result.pp.expireDateDateObject[]Date of expiry
    result.pp.authorityBaseObject[]Issuing authority
    result.pp.fullNameKorStringObject[]Name (Korean)
    result.pp.MRZ1StringObject[]Machine Readable Zone (MRZ) 1
    result.pp.MRZ2StringObject[]Machine Readable Zone (MRZ) 2
    result.acjson objectAlien Registration card information
    result.ac.alienRegNumStringObject[]Alien Registration number
    result.ac.sexStringObject[]Sex
    result.ac.nameStringObject[]Name
    result.ac.nationalityStringObject[]Nationality
    result.ac.visaTypeStringObject[]Visa Type
    result.ac.issueDateDateObject[]Issued date
    result.ac.authorityStringObject[]Issuing agency
    result.ac.authorityEngStringObject[]Issuing agency (English)
    result.ac.alienRegNumEtcStringObject[]Alien Registration number Etc
    1. nameCard object
    ClassificationJson Model
    nameCard Field{
    "meta": {},
    "result": {},
    }

    nameCard Object Field Details

    Field NameData TypeDescription
    metajson objectMeta information
    meta.estimatedLanguagestringThe language estimated by OCR (en: English, ja: Japanese, ko: Korean)
    resultjson objectRecognition result
    result.nameStringObject[]Name information
    result.nameFuriganaStringObject[]Furigana name information (Only response when language is ja)
    result.companyStringObject[]Company information
    result.departmentStringObject[]Department information
    result.addressStringObject[]Address information
    result.positionStringObject[]Position information
    result.mobileTelObject[]Mobile information
    result.telTelObject[]Tel information
    result.faxTelObject[]Fax information
    result.emailStringObject[]Email information
    result.homepageStringObject[]Homepage information
    1. passport object
    ClassificationJson Model
    passport Field{
    " passportResult": {},
    }

    passport Object Field Details

    Field NameData TypeDescription
    passportResultjson objectRecognition result
    passportResult.documentClassCodeMrzStringDocument code. "Passport"
    passportResult.issuingStateCodeMrzStringThe country of issue
    passportResult.firstNameMrzStringFirst name
    passportResult.lastName1MrzStringLast name 1
    passportResult.lastName2MrzStringLast name 2
    passportResult.documentNumberMrzStringPassport number
    passportResult.checkDigitForDocumentNumberMrzStringCheckDigit for documentNumber
    passportResult.nationalityMrzStringNationality
    passportResult.dateOfBirthMrzStringBirth date
    passportResult.ageMrzIntAge
    passportResult.checkDigitForDateOfBirthMrzStringCheckDigit for birth date
    passportResult.genderMrzStringGender
    passportResult.dateOfExpiryMrzStringDate of expiry
    passportResult.checkDigitForDateOfExpiryMrzStringCheckDigit for date of expiry
    passportResult.personalNumberMrzStringPersonal number
    passportResult.checkDigitForPersonalNumberMrzStringCheckDigit for personal number
    passportResult.finalCheckDigitMrzStringFinal check digit
    passportResult.mrzTypeMrzStringType of MRZ
    passportResult.mrzLinesMrzStringText of mrz
    passportResult.isExpiredMrzboolExpired
    1. field object
    ClassificationJson Model
    field Field{
    "text": "",
    "confidence": 0.0,
    "boundingPoly": {},
    "subBoundingPolys": []
    }

    field Object Field Details

    Field NameData TypeDescription
    textstringRecognition Result Text
    confidencefloatConfidence of infer result. Larger values of 0-1 are more accurate.
    boundingPolyBoundingPoly objectboundingPoly Object reference
    subBoundingPolysBoundingPoly[]boundingPoly Object reference
    1. boundingPoly object
    ClassificationJson Model
    boundingPoly{
    "vertices":[{}]
    }

    boundingPoly Object Field Details

    Field NameData TypeDescription
    verticesvertices objectvertices object reference
    1. vertices object
    ClassificationJson Model
    vertices{
    "x": 0.0,
    "y": 0.0
    }

    vertices Object Field Details

    Field NameData TypeDescription
    xfloatX coodinate
    yfloaty coodinate
    1. baseObject
    ClassificationJson Model
    baseObject{
    "text": "",
    "boundingPolys": []
    }

    baseObject Field Details

    Field NameData TypeDescription
    textstringparsed text
    boundingPolysBoundingPoly[]boundingPoly Object reference
    1. dateObject
    ClassificationJson Model
    dateObject{
    "text": "",
    "formatted": {},
    "boundingPolys": []
    }

    dateObject Field Details

    Field NameData TypeDescription
    textstringparsed text
    formattedjson objectAdditional information for the parsed text
    formatted.yearstringYear. It indicates a four-digit year. It follows the ISO 8601 standard form, except that it can be an empty string.
    formatted.monthstringMonth. It indicates a two-digit month. It follows the ISO 8601 standard form, except that it can be an empty string.
    formatted.daystringDay. It indicates a two-digit day. It follows the ISO 8601 standard form, except that it can be an empty string.
    boundingPolysBoundingPoly[]boundingPoly Object reference
    1. timeObject
    ClassificationJson Model
    timeObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "maskingPolys": []
    }

    timeObject Field Details

    Field NameData TypeDescription
    textstringparsed text
    formattedjson objectAdditional information for the parsed text
    formatted.hourstringHour. It indicates a two-digit hour. It follows the ISO 8601 standard form, except that it can be an empty string.
    formatted.minutestringMinute. It indicates a two-digit minute. It follows the ISO 8601 standard form, except that it can be an empty string.
    formatted.secondstringSecond. It indicates a two-digit second. It follows the ISO 8601 standard form, except that it can be an empty string.
    boundingPolysBoundingPoly[]boundingPoly Object reference
    maskingPolysBoundingPoly[]masking personal information
    1. TelObject
    ClassificationJson Model
    TelObject{
    "text": "",
    "formatted": {},
    "boundingPolys": []
    }

    TelObject Field Details

    Field NameData TypeDescription
    textstringparsed text
    formattedjson objectAdditional information for the parsed text
    formatted.valuestringFormatted text to indicate the type of telephone number. It has a form of string of numbers primarily, but can have telephone prefix (+). It can be an empty string when refinement fails.
    boundingPolysBoundingPoly[]boundingPoly Object reference
    1. FloatObject
    ClassificationJson Model
    FloatObject{
    "text": "",
    "formatted": {},
    "boundingPolys": []
    }

    FloatObject Field Details

    Field NameData TypeDescription
    textstringparsed text
    formattedjson objectAdditional information for the parsed text
    formatted.valuestringFormatted text to indicate the type of float. It has the type of a string of float number. It can be useful to describe count and price of an item. It can be an empty string when refinement fails.
    boundingPolysBoundingPoly[]boundingPoly Object reference
    1. StringObject
    ClassificationJson Model
    StringObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "maskingPolys": []
    }

    StringObject Field Details

    Field NameData TypeDescription
    textstringparsed text
    formattedjson objectAdditional information for the parsed text
    formatted.valuestringThe refined text of the text. The refining process depends on the categories of each ID. It can be an empty string.
    boundingPolysBoundingPoly[]boundingPoly Object reference
    maskingPolysBoundingPoly[]personal information
    1. PoiObject
    ClassificationJson Model
    PoiObject{
    "gid": "",
    "title": "",
    "phone": "",
    "address": "",
    "roadAddress": "",
    "biznum": "",
    "confidence": ""
    }

    PoiObject Field Details

    Field NameData TypeDescription
    gidstringunique id
    titlestring상호명
    phonestring전화번호
    addressstring주소
    roadAddressstring도로명주소
    biznumstring사업자번호(아직 정식으로 지원되지 않아 null일 수 있으나 추후 추가될 수 있음)
    confidencestringconfidence(높을 수록 정확도가 높음)
    1. medicalReceipt object
    ClassificationJson Model
    medicalReceipt{
    "checksum": {},
    "result": []
    }

    medicalReceipt Object Field Details

    Field NameData TypeDescription
    checksumjson objectChecksum results
    checksum.sumPaidByPatientChecksum본인부담금 합계
    checksum.sumPaidByInsurerChecksum공단부담금 합계
    checksum.sumPaidByPatientFullChecksum전액본인부담금 합계
    checksum.sumTreatmentCostEtcChecksum선택진료료 합계
    checksum.sumTreatmentCostEtcChecksum선택진료료이외 합계
    checksum.totalAmountChecksum총액확인
    checksum.totalPaidChecksum환자부담액
    resultMedicalReceiptResult[]List of value cell results

    19.Checksum object

    ClassificationJson Model
    checksum Field{
    "found": "",
    "foundValueIds": [],
    "foundValueSum": "",
    "foundTotalIds": [],
    "foundTotalSum": "",
    "foundTotalSum": ""
    }

    Checksum Object Field Details

    Field NameData TypeDescription
    foundjson objectFlag indicating whether any of the checksum field is found
    foundValueIdsint[]ID List of the found value cell
    foundValueSumfloatSum of the value found
    foundTotalIdsint[]ID List of the found total cell
    foundTotalSumfloatSum of the total values found
    differencefloatDifference between value and total cell

    20.MedicalReceiptResult object

    ClassificationJson Model
    result{
    "id": "",
    "keyTexts": "",
    "valueText": "",
    "confidence": "",
    "keyCells": [],
    "valueCell": {}
    }

    MedicalReceiptResult Object Field Details

    Field NameData TypeDescription
    idintID of the cell
    keyTextsstringKey string texts separated using the “|“ token
    valueTextstringText in the value cell
    confidencefloatValue cell confidence
    keyCellsKeyCell[]List of key cell objects in columns - rows key order
    valueCellValueCellValue cell object

    21.KeyCell object

    ClassificationJson Model
    KeyCell Field{
    "boundingPoly": {},
    "depth": "",
    "formatted": "",
    "group": "",
    "value": ""
    }

    KeyCell Object Field Details

    Field NameData TypeDescription
    boundingPolyBoundingPolyCell bounding box coordinate
    depthstringDepth of the found key cell
    formattedstringGrounded text in the key cell
    groupstringIdentifier to distinguish column/row-wise key
    valuestringUngrounded text in the key cell

    22.ValueCell object

    ClassificationJson Model
    ValueCell Field{
    "boundingPoly": {},
    "confidence": "",
    "value": ""
    }

    ValueCell Object Field Details

    Field NameData TypeDescription
    boundingPolyBoundingPolyCell bounding box coordinate
    confidencefloatValue cell confidence
    valuestringText in the value cell

    23.MrzString object

    ClassificationJson Model
    MrzString Field{
    "rawText": "",
    "refinedText ": "",
    "postprocessed": [0]
    }

    MrzString Object Field Details

    Field NameData TypeDescription
    rawTextstringRwa text
    refinedTextstringRefined text
    postprocessedint32Refined method

    24.Mrzbool object

    ClassificationJson Model
    Mrzbool Field{
    "rawText": "",
    "refinedText ": "",
    "postprocessed": [0]
    }

    Mrzbool Object Field Details

    Field NameData TypeDescription
    rawTextstringRwa text
    refinedTextboolRefined text
    postprocessedint32Refined method

    25.MrzInt object

    ClassificationJson Model
    MrzInt Field{
    "rawText": "",
    "refinedText ": 0,
    "postprocessed": [0]
    }

    MrzInt Object Field Details

    Field NameData TypeDescription
    rawTextstringRwa text
    refinedTextintRefined text
    postprocessedint32Refined method

    예시

    DOCUMENT OCR 요청 예시

    {
      "version": "V2",
      "requestId": "string",
      "timestamp": 0,
      "images": [
        {
          "format": "jpg",
          "name": "test 1",
          "data": "data"
        }
      ]
    }
    

    Credit Card 응답 예시

    {
        "version": "V2",
        "requestId": "string",
        "timestamp": 1613984515468,
        "images": [
            {
                "creditCard": {
                    "result": {
                        "number": {
                            "text": "5307123456749012",
                            "confidence": 0.96435016,
                            "boundingPoly": {
                                "vertices": [
                                    {
                                        "x": 64.0,
                                        "y": 218.0
                                    },
                                    {
                                        "x": 582.0,
                                        "y": 222.0
                                    },
                                    {
                                        "x": 582.0,
                                        "y": 265.0
                                    },
                                    {
                                        "x": 64.0,
                                        "y": 261.0
                                    }
                                ]
                            },
                            "subBoundingPolys": [
                                {
                                    "vertices": [
                                        {
                                            "x": 65.0,
                                            "y": 222.0
                                        },
                                        {
                                            "x": 175.0,
                                            "y": 225.0
                                        },
                                        {
                                            "x": 174.0,
                                            "y": 260.0
                                        },
                                        {
                                            "x": 64.0,
                                            "y": 257.0
                                        }
                                    ]
                                },
                                {
                                    "vertices": [
                                        {
                                            "x": 202.0,
                                            "y": 225.0
                                        },
                                        {
                                            "x": 312.0,
                                            "y": 225.0
                                        },
                                        {
                                            "x": 312.0,
                                            "y": 262.0
                                        },
                                        {
                                            "x": 202.0,
                                            "y": 262.0
                                        }
                                    ]
                                },
                                {
                                    "vertices": [
                                        {
                                            "x": 340.0,
                                            "y": 225.0
                                        },
                                        {
                                            "x": 445.0,
                                            "y": 225.0
                                        },
                                        {
                                            "x": 445.0,
                                            "y": 260.0
                                        },
                                        {
                                            "x": 340.0,
                                            "y": 260.0
                                        }
                                    ]
                                },
                                {
                                    "vertices": [
                                        {
                                            "x": 470.0,
                                            "y": 222.0
                                        },
                                        {
                                            "x": 582.0,
                                            "y": 222.0
                                        },
                                        {
                                            "x": 582.0,
                                            "y": 260.0
                                        },
                                        {
                                            "x": 470.0,
                                            "y": 260.0
                                        }
                                    ]
                                }
                            ]
                        }
                    }
                },
                "uid": "5f824ebe5b9744bb81bd3e1ef7f42e4e",
                "name": "testV2Demo",
                "inferResult": "SUCCESS",
                "message": "SUCCESS",
                "validationResult": {
                    "result": "NO_REQUESTED"
                }
            }
        ]
    }
    

    Receipt 응답 예시

    {
    	"version": "V2",
    	"requestId": "string",
    	"timestamp": 1613984672273,
    	"images": [{
    		"receipt": {
    			"meta": {
    				"estimatedLanguage": "ko"
    			},
    			"result": {
    				"storeInfo": {
    					"name": {
    						"text": "emart everyday",
    						"formatted": {
    							"value": "emart everyday"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 263.0,
    									"y": 96.0
    								},
    								{
    									"x": 390.0,
    									"y": 100.0
    								},
    								{
    									"x": 389.0,
    									"y": 141.0
    								},
    								{
    									"x": 262.0,
    									"y": 137.0
    								}
    							]
    						}]
    					},
    					"subName": {
    						"text": "분당정지2점",
    						"formatted": {
    							"value": "분당정지2점"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 530.0,
    									"y": 102.0
    								},
    								{
    									"x": 611.0,
    									"y": 102.0
    								},
    								{
    									"x": 611.0,
    									"y": 122.0
    								},
    								{
    									"x": 530.0,
    									"y": 122.0
    								}
    							]
    						}]
    					},
    					"bizNum": {
    						"text": "212-81-25544",
    						"formatted": {
    							"value": "212-81-25544"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 402.0,
    									"y": 125.0
    								},
    								{
    									"x": 515.0,
    									"y": 124.0
    								},
    								{
    									"x": 515.0,
    									"y": 141.0
    								},
    								{
    									"x": 402.0,
    									"y": 142.0
    								}
    							]
    						}]
    					},
    					"addresses": [{
    						"text": "경기 성남시분당구 정자일로 120",
    						"formatted": {
    							"value": "경기 성남시분당구 정자일로 120"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 401.0,
    									"y": 144.0
    								},
    								{
    									"x": 432.0,
    									"y": 144.0
    								},
    								{
    									"x": 432.0,
    									"y": 165.0
    								},
    								{
    									"x": 401.0,
    									"y": 165.0
    								}
    							]
    						}]
    					}],
    					"tel": [{
    						"text": "(031)786-1171",
    						"formatted": {
    							"value": "0317861171"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 569.0,
    									"y": 122.0
    								},
    								{
    									"x": 716.0,
    									"y": 118.0
    								},
    								{
    									"x": 716.0,
    									"y": 140.0
    								},
    								{
    									"x": 570.0,
    									"y": 144.0
    								}
    							]
    						}]
    					}]
    				},
    				"paymentInfo": {
    					"date": {
    						"text": "2020-04-16",
    						"formatted": {
    							"year": "2020",
    							"month": "04",
    							"day": "16"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 261.0,
    									"y": 256.0
    								},
    								{
    									"x": 432.0,
    									"y": 260.0
    								},
    								{
    									"x": 431.0,
    									"y": 284.0
    								},
    								{
    									"x": 260.0,
    									"y": 280.0
    								}
    							]
    						}]
    					},
    					"time": {
    						"text": "20: 11",
    						"formatted": {
    							"hour": "20",
    							"minute": "11",
    							"second": "00"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 437.0,
    									"y": 261.0
    								},
    								{
    									"x": 468.0,
    									"y": 261.0
    								},
    								{
    									"x": 468.0,
    									"y": 279.0
    								},
    								{
    									"x": 437.0,
    									"y": 279.0
    								}
    							]
    						}]
    					},
    					"cardInfo": {
    						"company": {
    							"text": "신 한",
    							"formatted": {
    								"value": "신한"
    							},
    							"boundingPolys": [{
    								"vertices": [{
    										"x": 309.0,
    										"y": 585.0
    									},
    									{
    										"x": 334.0,
    										"y": 585.0
    									},
    									{
    										"x": 334.0,
    										"y": 610.0
    									},
    									{
    										"x": 309.0,
    										"y": 610.0
    									}
    								]
    							}]
    						},
    						"number": {
    							"text": "4221**8666",
    							"formatted": {
    								"value": "4221**8666"
    							},
    							"boundingPolys": [{
    								"vertices": [{
    										"x": 522.0,
    										"y": 586.0
    									},
    									{
    										"x": 716.0,
    										"y": 592.0
    									},
    									{
    										"x": 716.0,
    										"y": 612.0
    									},
    									{
    										"x": 522.0,
    										"y": 606.0
    									}
    								]
    							}]
    						}
    					},
    					"confirmNum": {
    						"text": "28672931",
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 522.0,
    									"y": 586.0
    								},
    								{
    									"x": 716.0,
    									"y": 592.0
    								},
    								{
    									"x": 716.0,
    									"y": 612.0
    								},
    								{
    									"x": 522.0,
    									"y": 606.0
    								}
    							]
    						}]
    					}
    				},
    				"subResults": [{
    					"items": [{
    						"name": {
    							"text": "씨그램 레몬350ml",
    							"formatted": {
    								"value": "씨그램 레몬350ml"
    							},
    							"boundingPolys": [{
    								"vertices": [{
    										"x": 310.0,
    										"y": 345.0
    									},
    									{
    										"x": 372.0,
    										"y": 345.0
    									},
    									{
    										"x": 372.0,
    										"y": 369.0
    									},
    									{
    										"x": 310.0,
    										"y": 369.0
    									}
    								]
    							}]
    						},
    						"count": {
    							"text": "2",
    							"formatted": {
    								"value": "2"
    							},
    							"boundingPolys": [{
    								"vertices": [{
    										"x": 601.0,
    										"y": 348.0
    									},
    									{
    										"x": 615.0,
    										"y": 348.0
    									},
    									{
    										"x": 615.0,
    										"y": 365.0
    									},
    									{
    										"x": 601.0,
    										"y": 365.0
    									}
    								]
    							}]
    						},
    						"price": {
    							"price": {
    								"text": "1,600",
    								"formatted": {
    									"value": "1600"
    								},
    								"boundingPolys": [{
    									"vertices": [{
    											"x": 662.0,
    											"y": 347.0
    										},
    										{
    											"x": 716.0,
    											"y": 347.0
    										},
    										{
    											"x": 716.0,
    											"y": 367.0
    										},
    										{
    											"x": 662.0,
    											"y": 367.0
    										}
    									]
    								}]
    							},
    							"unitPrice": {
    								"text": "800",
    								"formatted": {
    									"value": "800"
    								},
    								"boundingPolys": [{
    									"vertices": [{
    											"x": 541.0,
    											"y": 347.0
    										},
    										{
    											"x": 577.0,
    											"y": 347.0
    										},
    										{
    											"x": 577.0,
    											"y": 368.0
    										},
    										{
    											"x": 541.0,
    											"y": 368.0
    										}
    									]
    								}]
    							}
    						}
    					}]
    				}],
    				"totalPrice": {
    					"price": {
    						"text": "1,600",
    						"formatted": {
    							"value": "1600"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 651.0,
    									"y": 546.0
    								},
    								{
    									"x": 717.0,
    									"y": 548.0
    								},
    								{
    									"x": 717.0,
    									"y": 569.0
    								},
    								{
    									"x": 651.0,
    									"y": 567.0
    								}
    							]
    						}]
    					}
    				}
    			}
    		},
    		"uid": "5b9de1f9765448eca574efc1a4231bbe",
    		"name": "testV2Demo",
    		"inferResult": "SUCCESS",
    		"message": "SUCCESS",
    		"validationResult": {
    			"result": "NO_REQUESTED"
    		}
    	}]
    }
    

    biz license 응답 예시

    {
    	"version": "V2",
    	"requestId": "string",
    	"timestamp": 1613984821070,
    	"images": [{
    		"bizLicense": {
    			"meta": {
    				"estimatedLanguage": "ko"
    			},
    			"result": {
    				"birth": [{
    					"text": "1951 년 12 03 일",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 396.0,
    								"y": 254.0
    							},
    							{
    								"x": 421.0,
    								"y": 254.0
    							},
    							{
    								"x": 421.0,
    								"y": 265.0
    							},
    							{
    								"x": 396.0,
    								"y": 265.0
    							}
    						]
    					}]
    				}],
    				"bisAddress": [{
    					"text": "경상남도 사천시 사천용 보공로 54",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 193.0,
    								"y": 288.0
    							},
    							{
    								"x": 235.0,
    								"y": 288.0
    							},
    							{
    								"x": 235.0,
    								"y": 300.0
    							},
    							{
    								"x": 193.0,
    								"y": 300.0
    							}
    						]
    					}]
    				}],
    				"bisArea": [],
    				"bisItem": [{
    					"text": "비주거용 건물 임대업(점포, 자기자)",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 368.0,
    								"y": 325.0
    							},
    							{
    								"x": 399.0,
    								"y": 325.0
    							},
    							{
    								"x": 399.0,
    								"y": 334.0
    							},
    							{
    								"x": 368.0,
    								"y": 334.0
    							}
    						]
    					}]
    				}],
    				"registerNumber": [{
    					"text": "611-01-99810",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 290.0,
    								"y": 210.0
    							},
    							{
    								"x": 386.0,
    								"y": 211.0
    							},
    							{
    								"x": 386.0,
    								"y": 227.0
    							},
    							{
    								"x": 290.0,
    								"y": 225.0
    							}
    						]
    					}]
    				}],
    				"bisType": [{
    					"text": "부동산업 및 임대업",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 221.0,
    								"y": 322.0
    							},
    							{
    								"x": 262.0,
    								"y": 322.0
    							},
    							{
    								"x": 262.0,
    								"y": 333.0
    							},
    							{
    								"x": 221.0,
    								"y": 333.0
    							}
    						]
    					}]
    				}],
    				"companyName": [{
    					"text": "동성자동차종합정비",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 194.0,
    								"y": 232.0
    							},
    							{
    								"x": 293.0,
    								"y": 233.0
    							},
    							{
    								"x": 293.0,
    								"y": 247.0
    							},
    							{
    								"x": 194.0,
    								"y": 245.0
    							}
    						]
    					}]
    				}],
    				"coRepName": [],
    				"corpName": [],
    				"corpRegisterNum": [],
    				"coRepSocialNum": [],
    				"documentType": [{
    					"text": "사업자등록증",
    					"formatted": {
    						"value": "사업자등록증"
    					},
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 199.0,
    								"y": 157.0
    							},
    							{
    								"x": 396.0,
    								"y": 160.0
    							},
    							{
    								"x": 396.0,
    								"y": 189.0
    							},
    							{
    								"x": 198.0,
    								"y": 186.0
    							}
    						]
    					}]
    				}],
    				"headAddress": [],
    				"issuanceDate": [{
    					"text": "2017 년 06 월 29일",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 225.0,
    								"y": 623.0
    							},
    							{
    								"x": 259.0,
    								"y": 623.0
    							},
    							{
    								"x": 259.0,
    								"y": 637.0
    							},
    							{
    								"x": 225.0,
    								"y": 637.0
    							}
    						]
    					}]
    				}],
    				"issuanceReason": [{
    					"text": "2017 년 06 월 29일",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 225.0,
    								"y": 623.0
    							},
    							{
    								"x": 259.0,
    								"y": 623.0
    							},
    							{
    								"x": 259.0,
    								"y": 637.0
    							},
    							{
    								"x": 225.0,
    								"y": 637.0
    							}
    						]
    					}]
    				}],
    				"openDate": [{
    					"text": "2014 년 06 월 09 일",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 193.0,
    								"y": 271.0
    							},
    							{
    								"x": 218.0,
    								"y": 271.0
    							},
    							{
    								"x": 218.0,
    								"y": 280.0
    							},
    							{
    								"x": 193.0,
    								"y": 280.0
    							}
    						]
    					}]
    				}],
    				"repName": [{
    					"text": "김영두",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 193.0,
    								"y": 251.0
    							},
    							{
    								"x": 228.0,
    								"y": 251.0
    							},
    							{
    								"x": 228.0,
    								"y": 264.0
    							},
    							{
    								"x": 193.0,
    								"y": 264.0
    							}
    						]
    					}]
    				}],
    				"socialNumber": [],
    				"taxType": [{
    					"text": "일반과세자",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 238.0,
    								"y": 185.0
    							},
    							{
    								"x": 357.0,
    								"y": 187.0
    							},
    							{
    								"x": 357.0,
    								"y": 209.0
    							},
    							{
    								"x": 238.0,
    								"y": 207.0
    							}
    						]
    					}]
    				}]
    			}
    		},
    		"uid": "ecf05843a1f444b6943e9d202475c3eb",
    		"name": "testV2Demo",
    		"inferResult": "SUCCESS",
    		"message": "SUCCESS",
    		"validationResult": {
    			"result": "NO_REQUESTED"
    		}
    	}]
    }
    

    name card 응답 예시

    {
        "version": "V2",
        "requestId": "string",
        "timestamp": 1613984872349,
        "images": [
            {
                "nameCard": {
                    "meta": {
                        "estimatedLanguage": "ko"
                    },
                    "result": {
                        "name": [
                            {
                                "text": "홍길동",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 286.0,
                                                "y": 194.0
                                            },
                                            {
                                                "x": 348.0,
                                                "y": 194.0
                                            },
                                            {
                                                "x": 348.0,
                                                "y": 266.0
                                            },
                                            {
                                                "x": 286.0,
                                                "y": 266.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "nameFurigana": [],
                        "company": [
                            {
                                "text": "우리은행",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 317.0,
                                                "y": 274.0
                                            },
                                            {
                                                "x": 356.0,
                                                "y": 274.0
                                            },
                                            {
                                                "x": 356.0,
                                                "y": 316.0
                                            },
                                            {
                                                "x": 317.0,
                                                "y": 316.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "department": [],
                        "address": [
                            {
                                "text": "(홍길동)",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 338.0,
                                                "y": 189.0
                                            },
                                            {
                                                "x": 414.0,
                                                "y": 189.0
                                            },
                                            {
                                                "x": 414.0,
                                                "y": 288.0
                                            },
                                            {
                                                "x": 338.0,
                                                "y": 288.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "position": [
                            {
                                "text": "소장",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 286.0,
                                                "y": 194.0
                                            },
                                            {
                                                "x": 348.0,
                                                "y": 194.0
                                            },
                                            {
                                                "x": 348.0,
                                                "y": 266.0
                                            },
                                            {
                                                "x": 286.0,
                                                "y": 266.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "mobile": [
                            {
                                "text": "010-1234-5678",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 297.0,
                                                "y": 183.0
                                            },
                                            {
                                                "x": 396.0,
                                                "y": 183.0
                                            },
                                            {
                                                "x": 396.0,
                                                "y": 305.0
                                            },
                                            {
                                                "x": 297.0,
                                                "y": 305.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "tel": [
                            {
                                "text": "123-4567-8901",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 338.0,
                                                "y": 189.0
                                            },
                                            {
                                                "x": 414.0,
                                                "y": 189.0
                                            },
                                            {
                                                "x": 414.0,
                                                "y": 288.0
                                            },
                                            {
                                                "x": 338.0,
                                                "y": 288.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "fax": [],
                        "email": [],
                        "homepage": []
                    }
                },
                "uid": "3277149ad2324de0b412669f7eac474a",
                "name": "testV2Demo",
                "inferResult": "SUCCESS",
                "message": "SUCCESS",
                "validationResult": {
                    "result": "NO_REQUESTED"
                }
            }
        ]
    }
    

    id card 응답 예시

    {
        "version": "V2",
        "requestId": "string",
        "timestamp": 1613984543939,
        "images": [
            {
                "idCard": {
                    "meta": {
                        "estimatedLanguage": "ko"
                    },
                    "result": {
                        "isConfident": true,
                        "ic": {
                            "name": [
                                {
                                    "text": "소닉",
                                    "formatted": {
                                        "value": "소닉"
                                    },
                                    "boundingPolys": [
                                        {
                                            "vertices": [
                                                {
                                                    "x": 93.0,
                                                    "y": 135.0
                                                },
                                                {
                                                    "x": 257.0,
                                                    "y": 135.0
                                                },
                                                {
                                                    "x": 257.0,
                                                    "y": 161.0
                                                },
                                                {
                                                    "x": 93.0,
                                                    "y": 161.0
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ],
                            "personalNum": [
                                {
                                    "text": "910623-1062372",
                                    "formatted": {
                                        "value": "910623-1062372"
                                    },
                                    "boundingPolys": [
                                        {
                                            "vertices": [
                                                {
                                                    "x": 83.0,
                                                    "y": 166.0
                                                },
                                                {
                                                    "x": 260.0,
                                                    "y": 166.0
                                                },
                                                {
                                                    "x": 260.0,
                                                    "y": 186.0
                                                },
                                                {
                                                    "x": 83.0,
                                                    "y": 186.0
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ],
                            "address": [
                                {
                                    "text": "서울특별시 종로구 종로1가 24 르메이에르 종로타운",
                                    "formatted": {
                                        "value": "서울특별시 종로구 종로1가 24 르메이에르 종로타운"
                                    },
                                    "boundingPolys": [
                                        {
                                            "vertices": [
                                                {
                                                    "x": 43.0,
                                                    "y": 232.0
                                                },
                                                {
                                                    "x": 148.0,
                                                    "y": 232.0
                                                },
                                                {
                                                    "x": 148.0,
                                                    "y": 255.0
                                                },
                                                {
                                                    "x": 43.0,
                                                    "y": 255.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 47.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 150.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 150.0,
                                                    "y": 234.0
                                                },
                                                {
                                                    "x": 47.0,
                                                    "y": 234.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 154.0,
                                                    "y": 232.0
                                                },
                                                {
                                                    "x": 240.0,
                                                    "y": 232.0
                                                },
                                                {
                                                    "x": 240.0,
                                                    "y": 255.0
                                                },
                                                {
                                                    "x": 154.0,
                                                    "y": 255.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 156.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 219.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 219.0,
                                                    "y": 234.0
                                                },
                                                {
                                                    "x": 156.0,
                                                    "y": 234.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 224.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 302.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 302.0,
                                                    "y": 235.0
                                                },
                                                {
                                                    "x": 224.0,
                                                    "y": 235.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 305.0,
                                                    "y": 213.0
                                                },
                                                {
                                                    "x": 333.0,
                                                    "y": 213.0
                                                },
                                                {
                                                    "x": 333.0,
                                                    "y": 234.0
                                                },
                                                {
                                                    "x": 305.0,
                                                    "y": 234.0
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ],
                            "issueDate": [
                                {
                                    "text": "2011.3. 6.",
                                    "formatted": {
                                        "year": "2011",
                                        "month": "03",
                                        "day": "06"
                                    },
                                    "boundingPolys": [
                                        {
                                            "vertices": [
                                                {
                                                    "x": 261.0,
                                                    "y": 314.0
                                                },
                                                {
                                                    "x": 351.0,
                                                    "y": 314.0
                                                },
                                                {
                                                    "x": 351.0,
                                                    "y": 336.0
                                                },
                                                {
                                                    "x": 261.0,
                                                    "y": 336.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 354.0,
                                                    "y": 314.0
                                                },
                                                {
                                                    "x": 376.0,
                                                    "y": 314.0
                                                },
                                                {
                                                    "x": 376.0,
                                                    "y": 334.0
                                                },
                                                {
                                                    "x": 354.0,
                                                    "y": 334.0
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ],
                            "authority": [
                                {
                                    "text": "소닉대통령추진회 소덕회장",
                                    "formatted": {
                                        "value": "소닉대통령추진회 소덕회장"
                                    },
                                    "boundingPolys": [
                                        {
                                            "vertices": [
                                                {
                                                    "x": 172.0,
                                                    "y": 338.0
                                                },
                                                {
                                                    "x": 346.0,
                                                    "y": 338.0
                                                },
                                                {
                                                    "x": 346.0,
                                                    "y": 366.0
                                                },
                                                {
                                                    "x": 172.0,
                                                    "y": 366.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 347.0,
                                                    "y": 338.0
                                                },
                                                {
                                                    "x": 435.0,
                                                    "y": 336.0
                                                },
                                                {
                                                    "x": 435.0,
                                                    "y": 363.0
                                                },
                                                {
                                                    "x": 348.0,
                                                    "y": 365.0
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ]
                        },
                        "idtype": "ID Card"
                    }
                },
                "uid": "0012374f247f4e70966d35eaa3c41d2a",
                "name": "testV2Demo",
                "inferResult": "SUCCESS",
                "message": "SUCCESS",
                "validationResult": {
                    "result": "NO_REQUESTED"
                }
            }
        ]
    }
    

    medical receipt 응답 예시

    {
      "version": "V2",
      "requestId": "string",
      "timestamp": 1621394368343,
      "images": [
        {
          "medicalReceipt": {
            "result": [
              {
                "id": 60,
                "keyTexts": "선택항목|비급여|계",
                "valueText": "53435",
                "confidence": 0.9542916,
                "keyCells": [
                  {
                    "boundingPoly": {
                      "vertices": [
                        {
                          "x": 303,
                          "y": 16
                        },
                        {
                          "x": 596,
                          "y": 16
                        },
                        {
                          "x": 596,
                          "y": 33
                        },
                        {
                          "x": 303,
                          "y": 33
                        }
                      ]
                    },
                    "depth": 1,
                    "formatted": "선택항목",
                    "group": "column",
                    "value": "선택항목"
                  },
                  {
                    "boundingPoly": {
                      "vertices": [
                        {
                          "x": 513,
                          "y": 34
                        },
                        {
                          "x": 598,
                          "y": 34
                        },
                        {
                          "x": 598,
                          "y": 50
                        },
                        {
                          "x": 513,
                          "y": 50
                        }
                      ]
                    },
                    "depth": 2,
                    "formatted": "비급여",
                    "group": "column",
                    "value": "비급여"
                  }
                ],
                "valueCell": {
                  "boundingPoly": {
                    "vertices": [
                      {
                        "x": 513,
                        "y": 195
                      },
                      {
                        "x": 597,
                        "y": 195
                      },
                      {
                        "x": 597,
                        "y": 212
                      },
                      {
                        "x": 513,
                        "y": 212
                      }
                    ]
                  },
                  "confidence": 0.9542916,
                  "value": "53435"
                }
              }
            ],
            "checksum": {
              "sumPaidByPatient": {
                "found": false,
                "foundValueIds": [],
                "foundValueSum": 0,
                "foundTotalIds": [],
                "foundTotalSum": 0,
                "difference": 0
              },
              "sumPaidByInsurer": {
                "found": false,
                "foundValueIds": [],
                "foundValueSum": 0,
                "foundTotalIds": [],
                "foundTotalSum": 0,
                "difference": 0
              },
              "sumPaidByPatientFull": {
                "found": false,
                "foundValueIds": [],
                "foundValueSum": 0,
                "foundTotalIds": [],
                "foundTotalSum": 0,
                "difference": 0
              },
              "sumTreatmentCost": {
                "found": false,
                "foundValueIds": [],
                "foundValueSum": 0,
                "foundTotalIds": [],
                "foundTotalSum": 0,
                "difference": 0
              },
              "sumTreatmentCostEtc": {
                "found": false,
                "foundValueIds": [],
                "foundValueSum": 0,
                "foundTotalIds": [],
                "foundTotalSum": 0,
                "difference": 0
              },
              "totalAmount": {
                "found": true,
                "foundValueIds": [],
                "foundValueSum": 0,
                "foundTotalIds": [
                  40
                ],
                "foundTotalSum": 1541717,
                "difference": 1541717
              },
              "totalPaid": {
                "found": true,
                "foundValueIds": [],
                "foundValueSum": 0,
                "foundTotalIds": [
                  84
                ],
                "foundTotalSum": 102130,
                "difference": 102130
              }
            }
          },
          "uid": "ef80a5d290284373acad3ba23cb4edfc",
          "name": "test 1",
          "inferResult": "SUCCESS",
          "message": "SUCCESS",
          "validationResult": {
            "result": "NO_REQUESTED"
          }
        }
      ]
    }
    

    passport 응답 예시

    {
        "version": "V2",
        "requestId": "string",
        "timestamp": 1684203696126,
        "images": [
            {
                "passport": {
                    "passportResult": {
                        "documentClassCode": {
                            "rawText": "P<",
                            "refinedText": "Passport",
                            "postprocessed": [
                                1
                            ]
                        },
                        "issuingStateCode": {
                            "rawText": "KOR",
                            "refinedText": "Korea (the Republic of)",
                            "postprocessed": []
                        },
                        "firstName": {
                            "rawText": "HONG",
                            "refinedText": "HONG",
                            "postprocessed": []
                        },
                        "lastName1": {
                            "rawText": "GILSOON",
                            "refinedText": "GILSOON",
                            "postprocessed": []
                        },
                        "lastName2": {
                            "rawText": "-",
                            "refinedText": "-",
                            "postprocessed": []
                        },
                        "documentNumber": {
                            "rawText": "M123A4567",
                            "refinedText": "M123A4567",
                            "postprocessed": []
                        },
                        "checkDigitForDocumentNumber": {
                            "rawText": "0",
                            "refinedText": "0",
                            "postprocessed": []
                        },
                        "nationality": {
                            "rawText": "KOR",
                            "refinedText": "Korea (the Republic of)",
                            "postprocessed": []
                        },
                        "dateOfBirth": {
                            "rawText": "870201",
                            "refinedText": "1987/02/01",
                            "postprocessed": []
                        },
                        "age": {
                            "rawText": "",
                            "refinedText": 36,
                            "postprocessed": []
                        },
                        "checkDigitForDateOfBirth": {
                            "rawText": "0",
                            "refinedText": "0",
                            "postprocessed": []
                        },
                        "gender": {
                            "rawText": "F",
                            "refinedText": "Female",
                            "postprocessed": []
                        },
                        "dateOfExpiry": {
                            "rawText": "300815",
                            "refinedText": "2030/08/15",
                            "postprocessed": []
                        },
                        "checkDigitForDateOfExpiry": {
                            "rawText": "0",
                            "refinedText": "0",
                            "postprocessed": []
                        },
                        "personalNumber": {
                            "rawText": "V2000000000000",
                            "refinedText": "V2000000000000",
                            "postprocessed": []
                        },
                        "checkDigitForPersonalNumber": {
                            "rawText": "0",
                            "refinedText": "0",
                            "postprocessed": []
                        },
                        "finalCheckDigit": {
                            "rawText": "0",
                            "refinedText": "0",
                            "postprocessed": []
                        },
                        "mrzType": {
                            "rawText": "",
                            "refinedText": "ID-3",
                            "postprocessed": []
                        },
                        "mrzLines": {
                            "rawText": "PMKORHONG<<GILSOON<<<<<<<<<<<<<<<<<<<<<<<<<<<<\nM123A45670KOR8702010F3008150V20000000000000000",
                            "refinedText": "PMKORHONG<<GILSOON<<<<<<<<<<<<<<<<<<<<<<<<<<<<\nM123A45670KOR8702010F3008150V20000000000000000",
                            "postprocessed": [
                                1
                            ]
                        },
                        "isExpired": {
                            "rawText": "",
                            "refinedText": false,
                            "postprocessed": []
                        }
                    }
                },
                "uid": "8f8a04985a6e429e97c3ca4184b3c0e4",
                "name": "test 1",
                "inferResult": "SUCCESS",
                "message": "SUCCESS",
                "validationResult": {
                    "result": "NO_REQUESTED"
                }
            }
        ]
    }
    

    API 예제

    다음은 각 언어별 CLOVA OCR API 구현 예제입니다

    • Request with multipart/form-data
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.util.UUID;
    
    import org.json.JSONArray;
    import org.json.JSONObject;
    
    public class OCRAPIDemo {
    
    	public static void main(String[] args) {
    		String apiURL = "YOUR_API_URL";
    		String secretKey = "YOUR_SECRET_KEY";
    		String imageFile = "YOUR_IMAGE_FILE";
    
    		try {
    			URL url = new URL(apiURL);
    			HttpURLConnection con = (HttpURLConnection)url.openConnection();
    			con.setUseCaches(false);
    			con.setDoInput(true);
    			con.setDoOutput(true);
    			con.setReadTimeout(30000);
    			con.setRequestMethod("POST");
    			String boundary = "----" + UUID.randomUUID().toString().replaceAll("-", "");
    			con.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
    			con.setRequestProperty("X-OCR-SECRET", secretKey);
    
    			JSONObject json = new JSONObject();
    			json.put("version", "V2");
    			json.put("requestId", UUID.randomUUID().toString());
    			json.put("timestamp", System.currentTimeMillis());
    			JSONObject image = new JSONObject();
    			image.put("format", "jpg");
    			image.put("name", "demo");
    			JSONArray images = new JSONArray();
    			images.put(image);
    			json.put("images", images);
    			String postParams = json.toString();
    
    			con.connect();
    			DataOutputStream wr = new DataOutputStream(con.getOutputStream());
    			long start = System.currentTimeMillis();
    			File file = new File(imageFile);
    			writeMultiPart(wr, postParams, file, boundary);
    			wr.close();
    
    			int responseCode = con.getResponseCode();
    			BufferedReader br;
    			if (responseCode == 200) {
    				br = new BufferedReader(new InputStreamReader(con.getInputStream()));
    			} else {
    				br = new BufferedReader(new InputStreamReader(con.getErrorStream()));
    			}
    			String inputLine;
    			StringBuffer response = new StringBuffer();
    			while ((inputLine = br.readLine()) != null) {
    				response.append(inputLine);
    			}
    			br.close();
    
    			System.out.println(response);
    		} catch (Exception e) {
    			System.out.println(e);
    		}
    	}
    
    	private static void writeMultiPart(OutputStream out, String jsonMessage, File file, String boundary) throws
    		IOException {
    		StringBuilder sb = new StringBuilder();
    		sb.append("--").append(boundary).append("\r\n");
    		sb.append("Content-Disposition:form-data; name=\"message\"\r\n\r\n");
    		sb.append(jsonMessage);
    		sb.append("\r\n");
    
    		out.write(sb.toString().getBytes("UTF-8"));
    		out.flush();
    
    		if (file != null && file.isFile()) {
    			out.write(("--" + boundary + "\r\n").getBytes("UTF-8"));
    			StringBuilder fileString = new StringBuilder();
    			fileString
    				.append("Content-Disposition:form-data; name=\"file\"; filename=");
    			fileString.append("\"" + file.getName() + "\"\r\n");
    			fileString.append("Content-Type: application/octet-stream\r\n\r\n");
    			out.write(fileString.toString().getBytes("UTF-8"));
    			out.flush();
    
    			try (FileInputStream fis = new FileInputStream(file)) {
    				byte[] buffer = new byte[8192];
    				int count;
    				while ((count = fis.read(buffer)) != -1) {
    					out.write(buffer, 0, count);
    				}
    				out.write("\r\n".getBytes());
    			}
    
    			out.write(("--" + boundary + "--\r\n").getBytes("UTF-8"));
    		}
    		out.flush();
    	}
    }
    
    import requests
    import uuid
    import time
    import json
    
    api_url = 'YOUR_API_URL'
    secret_key = 'YOUR_SECRET_KEY'
    image_file = 'YOUR_IMAGE_FILE'
    
    request_json = {
        'images': [
            {
                'format': 'jpg',
                'name': 'demo'
            }
        ],
        'requestId': str(uuid.uuid4()),
        'version': 'V2',
        'timestamp': int(round(time.time() * 1000))
    }
    
    payload = {'message': json.dumps(request_json).encode('UTF-8')}
    files = [
      ('file', open(image_file,'rb'))
    ]
    headers = {
      'X-OCR-SECRET': secret_key
    }
    
    response = requests.request("POST", api_url, headers=headers, data = payload, files = files)
    
    print(response.text.encode('utf8'))
    
    
    <?php
      $client_secret = "YOUR_SECRET_KEY";
      $url = "YOUR_API_URL";
      $image_file = "YOUR_IMAGE_FILE";
    
      $params->version = "V2";
      $params->requestId = uniqid();
      $params->timestamp = time();
      $image->format = "jpg";
      $image->name = "demo";
      $images = array($image);
      $params->images = $images;
      $json = json_encode($params);
      
      $boundary = uniqid();
      $is_post = true;
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_POST, $is_post);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      $post_form = array("message" => $json, "file" => new CURLFILE($image_file));
      curl_setopt($ch, CURLOPT_POSTFIELDS, $post_form);
      $headers = array();
      $headers[] = "X-OCR-SECRET: ".$client_secret;
      curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
      $response = curl_exec($ch);
      $err = curl_error($ch);
      $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
      curl_close ($ch);
    
      echo $status_code;
      if($status_code == 200) {
        echo $response;
      } else {
        echo "ERROR: ".$response;
      }
    ?>
    
    • Request with application/json
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.InputStreamReader;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.util.UUID;
    
    import org.json.JSONArray;
    import org.json.JSONObject;
    
    public class OCRGeneralAPIDemo {
    
    	public static void main(String[] args) {
    		String apiURL = "YOUR_API_URL";
    		String secretKey = "YOUR_SECRET_KEY";
    
    		try {
    			URL url = new URL(apiURL);
    			HttpURLConnection con = (HttpURLConnection)url.openConnection();
    			con.setUseCaches(false);
    			con.setDoInput(true);
    			con.setDoOutput(true);
    			con.setRequestMethod("POST");
    			con.setRequestProperty("Content-Type", "application/json; charset=utf-8");
    			con.setRequestProperty("X-OCR-SECRET", secretKey);
    
    			JSONObject json = new JSONObject();
    			json.put("version", "V2");
    			json.put("requestId", UUID.randomUUID().toString());
    			json.put("timestamp", System.currentTimeMillis());
    			JSONObject image = new JSONObject();
    			image.put("format", "jpg");
    			image should be public, otherwise, should use data
    			FileInputStream inputStream = new FileInputStream("YOUR_IMAGE_FILE");
    			byte[] buffer = new byte[inputStream.available()];
    			inputStream.read(buffer);
    			inputStream.close();
    			image.put("data", buffer);
    			image.put("name", "demo");
    			JSONArray images = new JSONArray();
    			images.put(image);
    			json.put("images", images);
    			String postParams = json.toString();
    
    			DataOutputStream wr = new DataOutputStream(con.getOutputStream());
    			wr.writeBytes(postParams);
    			wr.flush();
    			wr.close();
    
    			int responseCode = con.getResponseCode();
    			BufferedReader br;
    			if (responseCode == 200) {
    				br = new BufferedReader(new InputStreamReader(con.getInputStream()));
    			} else {
    				br = new BufferedReader(new InputStreamReader(con.getErrorStream()));
    			}
    			String inputLine;
    			StringBuffer response = new StringBuffer();
    			while ((inputLine = br.readLine()) != null) {
    				response.append(inputLine);
    			}
    			br.close();
    
    			System.out.println(response);
    		} catch (Exception e) {
    			System.out.println(e);
    		}
    	}
    
    }
    
    
    import requests
    import uuid
    import time
    import base64
    import json
    
    api_url = 'YOUR_API_URL'
    secret_key = 'YOUR_SECRET_KEY'
    image_file = 'YOUR_IMAGE_FILE'
    with open(image_file,'rb') as f:
    file_data = f.read()
    
    request_json = {
        'images': [
            {
                'format': 'jpg',
                'name': 'demo',
                'data': base64.b64encode(file_data).decode()
            }
        ],
        'requestId': str(uuid.uuid4()),
        'version': 'V2',
        'timestamp': int(round(time.time() * 1000))
    }
    
    payload = json.dumps(request_json).encode('UTF-8')
    headers = {
      'X-OCR-SECRET': secret_key,
      'Content-Type': 'application/json'
    }
    
    response = requests.request("POST", api_url, headers=headers, data = payload)
    
    print(response.text)
    
    
    <?php
      $client_secret = "YOUR_SECRET_KEY";
      $url = "YOUR_API_URL";
      $image_file = "YOUR_IMAGE_FILE";
    
      $params->version = "V2";
      $params->requestId = "uuid";
      $params->timestamp = time();
      $image->format = "jpg";
      $image->data = base64_encode(file_get_contents($image_file));
      $image->name = "demo";
      $images = array($image);
      $params->images = $images;
      $json = json_encode($params);
    
      $is_post = true;
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_POST, $is_post);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
      $headers = array();
      $headers[] = "X-OCR-SECRET: ".$client_secret;
      $headers[] = "Content-Type:application/json; charset=utf-8";
      curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
      $response = curl_exec($ch);
      $err = curl_error($ch);
      $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
      curl_close ($ch);
    
      echo $status_code;
      if($status_code == 200) {
        echo $response;
      } else {
        echo "ERROR: ".$response;
      }
    ?>
    
    

    Error code

    HttpStatusCodeDescription
    400Request parameters invalid or constraint problem.
    401Api secret(X-CHATBOT-API-KEY) wrong
    500Internal server error

    Error Response Body:

    {
      "code": "Error Code",
      "message": "error details message.",
      "path": "request API path",
      "timestamp": 1570776853475
    }
    
    ErrorCodeDescription
    0001URL is invalid.
    0002Secret key validate failed.
    0011Request body invalid.
    0021Protocol version not support.
    0022Request domain invalid.
    0023API request count reach the upper limit.
    0025Calls to this api have exceeded the rate limit.
    0500Unknown service error.
    0501OCR Service error.

    이 문서가 도움이 되었습니까?

    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.