CLOVA OCR Document API
    • PDF

    CLOVA OCR Document API

    • PDF

    Article Summary

    version

    VersionDateChanges
    v1.0.02021-03-04最初の作成
    v1.0.22021-07-22foundValuesSum -> foundValueSum
    身分証明書に maskingPolysを追加
    v1.0.32021-09-16身分証明証に外国人登録証を追加
    v1.0.42022-04-21身分証明証の範囲位置表記
    外国人登録証 alienRegNumEtcを追加
    クレジットカードに名前を追加
    v1.0.52023-05-25パスポート MRZ API
    v1.0.62023-11-23領収書に税金および割引金額を追加

    リクエスト

    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パスポート(Global)/document/passport

    リクエストヘッダ

    ヘッダ名説明
    X-OCR-SECRETドメインで API Gatewayと連携時作成した X-OCR-SECRET:{Client Secret}
    Content-Typeapplication/json : リクエストに JSON本文使用。Base64でエンコードされた image.dataサポート
    - multipart/form-data : リクエストにマルチパート本文を使用。ストリーミングで送信された画像ファイルのサポート

    リクエストボディ

    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値です
    imagesYesstringJSON arrayで入力され、現在は1つの画像のみ入力できる
    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
    uidstringAPIの有効性をチェックするために提供される固有 IDで、有効性チェックリクエストを追跡するのに使用
    namestringリクエストされた画像名
    inferResultstring画像類推結果。
    「SUCCESS」: 画像認識成功。「FAILURE」: 画像認識失敗。「ERROR」画像認識例外事項
    messagestring画像認識が成功した場合「SUCCESS」
    画像認識失敗の場合、エラーメッセージが表示される。
    エラーメッセージは下記に詳細が表示される
    receiptjson objectreceiptオブジェクトを参照
    creditCardjson objectcreditCardオブジェクトを参照
    bizLicensejson objectbizLicenseオブジェクトを参照
    idCardjson objectidCardオブジェクトを参照
    nameCardjson objectnameCardオブジェクトを参照
    passportjson objectpassportオブジェクトを参照
    validationResultjson object有効性チェックの結果
    validationResult.resultstring結果コード
    「NO_REQUESTED」: 有効性チェックの作業が実行されない。
    「UNCHECKED」: 動作レスポンスが確認されていないか、受け入れられていない。
    「ERROR」: 有効性チェック実行エラー。
    「VALID」: 認証結果が有効。
    「INVALID」: 認証結果が有効ではない。
    「UNCHECHED」、「ERROR」および「INVALID」などは有効性チェックの失敗と表示される。
    validationResult.messagestring有効性チェックの詳細メッセージで常に返還される値ではない。
    convertedImageInfojson object画像形式が PDF/TIFFである場合のみレスポンス。
    リクエスト形式が PDF/TIFFである場合、座標は返還された画像を基準とする。
    convertedImageInfo.widthinteger基本画像の幅。
    convertedImageInfo.heightinteger基本画像の高さ。
    convertedImageInfo.pageIndexintegerPDF/TIFFのページ索引
    1. receipt object
    ClassificationJson Model
    receipt Field{
    "meta": {},
    "result": {},
    }

    Receipt Object Field Details

    Field NameData TypeDescription
    metajson objectメタ情報
    meta.estimatedLanguagestringOCRで推定した言語(en: 英語、ja: 日本語、ko: 韓国語) | OCR認識言語
    resultjson object認識結果
    result.storeInfojson object店舗情報
    result.storeInfo.poiInfoPoiObject[]POIグラウンディングの結果
    result.storeInfo.nameStringObject商号
    result.storeInfo.subNameStringObject支店名
    result.storeInfo.bizNumStringObject事業者番号
    result.storeInfo.movieNameStringObject映画のタイトル(映画チケット関連項目)
    result.storeInfo.addressesStringObject[]店舗の住所
    result.storeInfo.telTelObject[]Telephone number of the store
    result.paymentInfojson object決済情報
    result.paymentInfo.dateDateObject決済日
    result.paymentInfo.timeTimeObject決済時間
    result.paymentInfo.cardInfojson objectTransaction card information
    result.paymentInfo.cardInfo.companyStringObjectカード会社名
    result.paymentInfo.cardInfo.numberStringObjectカード番号
    result.paymentInfo.confirmNumBaseObject決済番号
    result.subResultsjson array項目グループ情報
    result.subResults.itemsjson array認識された項目情報(メニューなど)
    result.subResults.items.nameStringObject項目名
    result.subResults.items.codeStringObject項目コード
    result.subResults.items.countFloatObject項目数
    result.subResults.items.pricejson object価格情報
    result.subResults.items.price.priceFloatObject価格
    result.subResults.items.price.unitPriceFloatObject単価
    result.totalPricejson object総額情報
    result.totalPrice.priceFloatObject総額
    result.subtotalFloatObject総計情報
    result.subtotal.taxpriceFloatObject税金
    result.subtotal.discountpriceFloatObject割引金額
    1. creditCard object
    ClassificationJson Model
    creditCard Field{
    "meta": {},
    "result": {},
    }

    creditCard Object Field Details

    Field NameData TypeDescription
    metajson objectメタ情報
    meta.estimatedLanguagestringOCRで推定した言語(en: 英語、ja: 日本語、ko: 韓国語)
    resultjson object認識結果
    result.numberField objectFieldオブジェクトを参照
    result.validThruField objectFieldオブジェクトを参照
    result.nameField objectカードの所有者名
    Fieldオブジェクトを参照
    1. bizLicense object
    ClassificationJson Model
    bizLicense Field{
    "meta": {},
    "result": {},
    }

    bizLicense Object Field Details

    Field NameData TypeDescription
    metajson objectメタ情報
    meta.estimatedLanguagestringOCRで推定した言語(en: 英語、ja: 日本語、ko: 韓国語)
    resultjson object認識結果
    result.birthBaseObject[]生年月日
    result.bisAddressBaseObject[]事業者住所
    result.bisAreaBaseObject[]事業場の所在地
    result.bisItemBaseObject[]事業項目
    result.registerNumberBaseObject[]事業者登録番号
    result.bisTypeBaseObject[]業種
    result.companyNameBaseObject[]商号
    result.coRepNameBaseObject[]共同代表者名
    result.corpNameBaseObject[]法人(グループ)名
    result.corpRegisterNumBaseObject[]事業者登録番号
    result.coRepSocialNumBaseObject[]共同代表者の住民登録番号
    result.documentTypeStringObject[]文書タイプ
    result.headAddressBaseObject[]本社住所
    result.issuanceDateBaseObject[]発行日
    result.issuanceReasonBaseObject[]発行理由
    result.openDateBaseObject[]事業開始日
    result.repNameBaseObject[]代表者名
    result.socialNumberBaseObject[]住民登録番号
    result.taxTypeBaseObject[]課税タイプ
    1. idCard object
    ClassificationJson Model
    idcard Field{
    "meta": {},
    "result": {},
    }

    idCard Object Field Details

    Field NameData TypeDescription
    metajson objectメタ情報
    meta.estimatedLanguagestringOCRで推定した言語(en: 英語、ja: 日本語、ko: 韓国語)
    resultjson object認識結果
    result.isConfidentboolean信頼性資格リクエストを反映する指標
    各 IDタイプに必要な詳細情報がある場合 Trueで出力され、そうではない場合 Falseで出力される。
    result.IDTypestring身分証明書タイプ
    返還値は「身分証明書」、「運転免許証」、「パスポート」、「不明」のいずれかである。
    result.roisBoundingPoly[]オブジェクト範囲の位置情報
    result.icjson object住民登録証情報
    result.ic.nameStringObject[]名前(韓国語)
    result.ic.personalNumStringObject[]住民登録番号
    result.ic.addressStringObject[]住所
    result.ic.issueDateDateObject[]発行日
    result.ic.authorityStringObject[]発給機関
    result.dljson object運転免許証情報
    result.dl.typeBaseObject[]免許の種類
    result.dl.numStringObject[]免許番号
    result.dl.nameStringObject[]名前(韓国語)
    result.dl.personalNumStringObject[]住民登録番号
    result.dl.addressStringObject[]Address
    result.dl.renewStartDateDateObject[]更新期間開始日
    result.dl.renewEndDateDateObject[]更新期間終了日
    result.dl.conditionStringObject[]免許条件
    result.dl.codeStringObject[]免許コード
    result.dl.organDonationBaseObject[]臓器および組織提供登録
    result.dl.issueDateDateObject[]発行日
    result.dl.authorityStringObject[]発給機関
    result.ppjson objectパスポートの情報
    result.pp.typeStringObject[]パスポートのタイプ
    result.pp.issueCountryBaseObject[]発行国
    result.pp.numStringObject[]パスポート番号
    result.pp.surNameStringObject[]
    result.pp.givenNameStringObject[]氏名
    result.pp.nationalityStringObject[]国籍
    result.pp.birthDateDateObject[]生年月日
    result.pp.personalNumStringObject[]住民登録番号
    result.pp.sexStringObject[]性別
    result.pp.issueDateDateObject[]発行日
    result.pp.expireDateDateObject[]終了日
    result.pp.authorityBaseObject[]発行機関
    result.pp.fullNameKorStringObject[]名前(韓国語)
    result.pp.MRZ1StringObject[]Machine Readable Zone (MRZ) 1
    result.pp.MRZ2StringObject[]Machine Readable Zone (MRZ) 2
    result.acjson object外国人登録証情報
    result.ac.alienRegNumStringObject[]外国人登録番号
    result.ac.sexStringObject[]性別
    result.ac.nameStringObject[]氏名
    result.ac.nationalityStringObject[]国籍
    result.ac.visaTypeStringObject[]ビザタイプ
    result.ac.issueDateDateObject[]発行日
    result.ac.authorityStringObject[]発給機関
    result.ac.authorityEngStringObject[]発行機関(英語)
    result.ac.alienRegNumEtcStringObject[]外国人登録番号など
    1. nameCard object
    ClassificationJson Model
    nameCard Field{
    "meta": {},
    "result": {},
    }

    nameCard Object Field Details

    Field NameData TypeDescription
    metajson objectメタ情報
    meta.estimatedLanguagestringOCRで推定した言語(en: 英語、ja: 日本語、ko: 韓国語)
    resultjson object認識結果
    result.nameStringObject[]名前情報
    result.nameFuriganaStringObject[]フリガナ名前の情報(言語が jaのときのみ回答)
    result.companyStringObject[]会社情報
    result.departmentStringObject[]部署情報
    result.addressStringObject[]住所情報
    result.positionStringObject[]役職情報
    result.mobileTelObject[]携帯電話情報
    result.telTelObject[]電話情報
    result.faxTelObject[]ファックス情報
    result.emailStringObject[]メールアドレス情報
    result.homepageStringObject[]ホームページ情報
    1. passport object
    ClassificationJson Model
    passport Field{
    " passportResult": {},
    }

    passport Object Field Details

    Field NameData TypeDescription
    passportResultjson object認識結果
    passportResult.documentClassCodeMrzString文章コード。「パスポート」
    passportResult.issuingStateCodeMrzString発行国
    passportResult.firstNameMrzString氏名
    passportResult.lastName1MrzStringひとつ目の名字
    passportResult.lastName2MrzStringふたつ目の名字
    passportResult.documentNumberMrzStringパスポート番号
    passportResult.checkDigitForDocumentNumberMrzString文書番号に関する確認の数字
    passportResult.nationalityMrzString国籍
    passportResult.dateOfBirthMrzString生年月日
    passportResult.ageMrzInt年齢
    passportResult.checkDigitForDateOfBirthMrzString生年月日に関する確認の数字
    passportResult.genderMrzString性別
    passportResult.dateOfExpiryMrzString満了日
    passportResult.checkDigitForDateOfExpiryMrzString満了日に関する確認の数字
    passportResult.personalNumberMrzString住民登録番号
    passportResult.checkDigitForPersonalNumberMrzString住民登録番号に関する確認の数字
    passportResult.finalCheckDigitMrzString最終確認の数字
    passportResult.mrzTypeMrzStringMRZタイプ
    passportResult.mrzLinesMrzStringMRZテキスト
    passportResult.isExpiredMrzbool満了
    1. field object
    ClassificationJson Model
    field Field{
    "text": "",
    "confidence": 0.0,
    "boundingPoly": {},
    "subBoundingPolys": []
    }

    field Object Field Details

    Field NameData TypeDescription
    textstring認識結果テキスト
    confidencefloat推論結果の信頼度。 0 ~ 1の値が大きいほど正確度が高い。
    boundingPolyBoundingPoly objectboundingPolyオブジェクトを参照
    subBoundingPolysBoundingPoly[]boundingPolyオブジェクトを参照
    1. boundingPoly object
    ClassificationJson Model
    boundingPoly{
    "vertices":[{}]
    }

    boundingPoly Object Field Details

    Field NameData TypeDescription
    verticesvertices objectverticesオブジェクトを参照
    1. vertices object
    ClassificationJson Model
    vertices{
    "x": 0.0,
    "y": 0.0
    }

    vertices Object Field Details

    Field NameData TypeDescription
    xfloatX座標
    yfloatY座標
    1. baseObject
    ClassificationJson Model
    baseObject{
    "text": "",
    "boundingPolys": [],
    "keyText":"",
    "confidenceScore":0.0
    }

    baseObject Field Details

    Field NameData TypeDescription
    textstringパースされたテキスト
    boundingPolysBoundingPoly[]boundingPolyオブジェクトを参照
    keyTextstringパースされたテキスト関連キーの値
    confidenceScorefloat推論結果の信頼度。0 ~ 1の値が大きいほど正確度が高い。
    1. dateObject
    ClassificationJson Model
    dateObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "maskingPolys":[],
    "keyText":"",
    "confidenceScore":0.0
    }

    dateObject Field Details

    Field NameData TypeDescription
    textstringパースされたテキスト
    formattedjson objectパースされたテキストについての追加情報
    formatted.yearstring年。四桁の数字の年度を示す。空文字列である可能性があることを除けば ISO 8601標準形式に従う。
    formatted.monthstring月。二桁の数字の月を示す。空文字列である可能性があることを除けば ISO 8601標準形式に従う。
    formatted.daystring日付。二桁の数字の日付を示す。空文字列である可能性があることを除けば ISO 8601標準形式に従う。
    boundingPolysBoundingPoly[]boundingPolyオブジェクトを参照
    maskingPolysBoundingPoly[]個人情報のマスキング
    keyTextstringパースされたテキスト関連キーの値
    confidenceScorefloat推論結果の信頼度。0 ~ 1の値が大きいほど正確度が高い。
    1. timeObject
    ClassificationJson Model
    timeObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "keyText":"",
    "confidenceScore":0.0
    }

    timeObject Field Details

    Field NameData TypeDescription
    textstringパースされたテキスト
    formattedjson objectパースされたテキストについての追加情報
    formatted.hourstring時。二桁の数字の時を示す。空文字列である可能性があることを除けば ISO 8601標準形式に従う
    formatted.minutestring分。二桁の数字の分を示す。空文字列である可能性があることを除けば ISO 8601標準形式に従う
    formatted.secondstring秒。二桁の数字の秒を示す。空文字列である可能性があることを除けば ISO 8601標準形式に従う
    boundingPolysBoundingPoly[]boundingPolyオブジェクトを参照
    maskingPolysBoundingPoly[]個人情報のマスキング
    keyTextstringパースされたテキスト関連キーの値
    confidenceScorefloat推論結果の信頼度。0 ~ 1の値が大きいほど正確度が高い。
    1. TelObject
    ClassificationJson Model
    TelObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "keyText":"",
    "confidenceScore":0.0
    }

    TelObject Field Details

    Field NameData TypeDescription
    textstringパースされたテキスト
    formattedjson objectパースされたテキストについての追加情報
    formatted.valuestring電話番号タイプを示す書式付きテキスト。主に数字文字列形態であるが、電話識別子(+)を含めることができる。認識細分化に失敗した場合、空文字列の可能性がある。
    boundingPolysBoundingPoly[]boundingPolyオブジェクトを参照
    keyTextstringパースされたテキスト関連キーの値
    confidenceScorefloat推論結果の信頼度。0 ~ 1の値が大きいほど正確度が高い。
    1. FloatObject
    ClassificationJson Model
    FloatObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "keyText":"",
    "confidenceScore":0.0
    }

    FloatObject Field Details

    Field NameData TypeDescription
    textstringパースされたテキスト
    formattedjson objectパースされたテキストについての追加情報
    formatted.valuestring失敗タイプを示す書式付きテキスト。失敗文字列タイプ。品目の数と価格を説明するのに有用である。認識細分化に失敗した場合、空文字列の可能性がある。
    boundingPolysBoundingPoly[]boundingPolyオブジェクトを参照
    keyTextstringパースされたテキスト関連キーの値
    confidenceScorefloat推論結果の信頼度。0 ~ 1の値が大きいほど正確度が高い。
    1. StringObject
    ClassificationJson Model
    StringObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "maskingPolys": [],
    "keyText":"",
    "confidenceScore":0.0
    }

    StringObject Field Details

    Field NameData TypeDescription
    textstringパースされたテキスト
    formattedjson objectパースされたテキストについての追加情報
    formatted.valuestring精製されたテキスト。精製過程は各身分証明書の分類により異なる。空文字列の可能性がある。
    boundingPolysBoundingPoly[]boundingPolyオブジェクトを参照
    maskingPolysBoundingPoly[]個人情報
    keyTextstringパースされたテキスト関連キーの値
    confidenceScorefloat推論結果の信頼度。0 ~ 1の値が大きいほど正確度が高い。
    1. PoiObject
    ClassificationJson Model
    PoiObject{
    "gid": "",
    "title": "",
    "phone": "",
    "address": "",
    "roadAddress": "",
    "biznum": "",
    "confidence": ""
    }

    PoiObject Field Details

    Field NameData TypeDescription
    gidstring共有 ID
    titlestring商号
    phonestring電話番号
    addressstring住所
    roadAddressstring道路名住所
    biznumstring事業者番号(まだ正式にサポートされていないため nullもあり得るが、今後追加される可能性あり)
    confidencestring信頼度(高いほど正確度が高い)

    18.Checksum object

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

    Checksum Object Field Details

    Field NameData TypeDescription
    foundjson objectチェックサムフィールドが発見されたかどうかを示すフラグ
    foundValueIdsint[]発見された値セルの ID一覧
    foundValueSumfloat発見された値の合計
    foundTotalIdsint[]発見された全体セルの ID一覧
    foundTotalSumfloat発見された全体値の合計
    differencefloat値と全体セルの差

    19.KeyCell object

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

    KeyCell Object Field Details

    Field NameData TypeDescription
    boundingPolyBoundingPolyセル範囲のボックス座標
    depthstring発見されたキーセルの深さ
    formattedstringキーセルのグラウンディングテキスト
    groupstring列/行別キーを区切るための識別子
    valuestringキーセルのグラウンディングされていないテキスト

    20.ValueCell object

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

    ValueCell Object Field Details

    Field NameData TypeDescription
    boundingPolyBoundingPolyセル範囲のボックス座標
    confidencefloat値セルの信頼度
    valuestring値セルのテキスト

    21.MrzString object

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

    MrzString Object Field Details

    Field NameData TypeDescription
    rawTextstring原本テキスト
    refinedTextstring精製されたテキスト
    postprocessedint32精製方式

    22.Mrzbool object

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

    Mrzbool Object Field Details

    Field NameData TypeDescription
    rawTextstring原本テキスト
    refinedTextbool精製されたテキスト
    postprocessedint32精製方式

    23.MrzInt object

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

    MrzInt Object Field Details

    Field NameData TypeDescription
    rawTextstring原本テキスト
    refinedTextint精製されたテキスト
    postprocessedint32精製方式

    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"
                }
            }
        ]
    }
    

    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
    400リクエストパラメータが無効、または制約に問題がある。
    401誤った API secret key(X-OCR-API-KEY)
    500内部サーバエラー

    Error Response Body:

    {
      "code": "Error Code",
      "message": "error details message.",
      "path": "request API path",
      "timestamp": 1570776853475
    }
    
    ErrorCodeDescription
    0001有効ではない URL
    0002Secret key有効性のチェックに失敗
    0011有効でないリクエスト本文
    0021サポートされていないプロトコルバージョン
    0022有効でないリクエストドメイン
    0023APIリクエスト回数が上限に達する
    0025この APIへの呼び出し料金限度を超過
    0500不明なサービスエラー
    0501OCRサービスのエラー

    この記事は役に立ちましたか?

    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.