Document Models - Get Model

詳細なドキュメント モデル情報を取得します。

GET {endpoint}/formrecognizer/documentModels/{modelId}?api-version=2023-07-31

URI パラメーター

名前 / 必須 説明
endpoint
path True

string

url

サポートされている Cognitive Services エンドポイント (プロトコルとホスト名など)。 https://westus2.api.cognitive.microsoft.com

modelId
path True

string

一意のドキュメント モデル名。

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$

api-version
query True

string

要求された API バージョン。

要求ヘッダー

名前 必須 説明
Ocp-Apim-Subscription-Key True

string

Azure Cognitive Services サブスクリプションのシークレット キー。

応答

名前 説明
200 OK

DocumentModelDetails

OK です。

Other Status Codes

ErrorResponse

エラーが発生しました。

セキュリティ

Ocp-Apim-Subscription-Key

Azure Cognitive Services サブスクリプションのシークレット キー。

Type: apiKey
In: header

Get Custom Document Model
Get Prebuilt Document Model

Get Custom Document Model

Sample Request

GET https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentModels/myCustomModel?api-version=2023-07-31

Sample Response

{
  "modelId": "myCustomModel",
  "description": "Custom model description",
  "createdDateTime": "2021-09-24T12:54:35Z",
  "expirationDateTime": "2023-01-01T00:00:00Z",
  "apiVersion": "2023-07-31",
  "docTypes": {
    "myForm": {
      "fieldSchema": {
        "Name": {
          "type": "string"
        },
        "Date": {
          "type": "date"
        },
        "Amount": {
          "type": "number"
        }
      },
      "buildMode": "template",
      "fieldConfidence": {
        "Name": 0.9,
        "Date": 0.95,
        "Amount": 0.93
      }
    }
  },
  "tags": {
    "createdBy": "myUserId"
  }
}

Get Prebuilt Document Model

Sample Request

GET https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentModels/prebuilt-invoice?api-version=2023-07-31

Sample Response

{
  "modelId": "prebuilt-invoice",
  "description": "Prebuilt model to extract key information from English invoices, including customer, vendor, invoice ID, due date, total, and more.",
  "createdDateTime": "2021-07-30T00:00:00Z",
  "apiVersion": "2023-07-31",
  "docTypes": {
    "prebuilt:invoice": {
      "fieldSchema": {
        "CustomerName": {
          "type": "string"
        },
        "CustomerId": {
          "type": "string"
        },
        "PurchaseOrder": {
          "type": "string"
        },
        "InvoiceId": {
          "type": "string"
        },
        "InvoiceDate": {
          "type": "date"
        },
        "DueDate": {
          "type": "date"
        },
        "VendorName": {
          "type": "string"
        },
        "VendorAddress": {
          "type": "string"
        },
        "VendorAddressRecipient": {
          "type": "string"
        },
        "CustomerAddress": {
          "type": "string"
        },
        "CustomerAddressRecipient": {
          "type": "string"
        },
        "BillingAddress": {
          "type": "string"
        },
        "BillingAddressRecipient": {
          "type": "string"
        },
        "ShippingAddress": {
          "type": "string"
        },
        "ShippingAddressRecipient": {
          "type": "string"
        },
        "SubTotal": {
          "type": "number"
        },
        "TotalTax": {
          "type": "number"
        },
        "InvoiceTotal": {
          "type": "number"
        },
        "AmountDue": {
          "type": "number"
        },
        "PreviousUnpaidBalance": {
          "type": "number"
        },
        "RemittanceAddress": {
          "type": "string"
        },
        "RemittanceAddressRecipient": {
          "type": "string"
        },
        "ServiceAddress": {
          "type": "string"
        },
        "ServiceAddressRecipient": {
          "type": "string"
        },
        "ServiceStartDate": {
          "type": "date"
        },
        "ServiceEndDate": {
          "type": "date"
        },
        "Items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "Amount": {
                "type": "number"
              },
              "Date": {
                "type": "date"
              },
              "Description": {
                "type": "string"
              },
              "Quantity": {
                "type": "number"
              },
              "ProductCode": {
                "type": "string"
              },
              "Tax": {
                "type": "number"
              },
              "Unit": {
                "type": "string"
              },
              "UnitPrice": {
                "type": "number"
              }
            }
          }
        }
      }
    }
  },
  "tags": {}
}

定義

名前 説明
DocumentBuildMode

カスタム ドキュメント モデルのビルド モード。

DocumentFieldSchema

JSON スキーマ スタイル構文を使用したフィールド セマンティック スキーマの説明。

DocumentFieldType

フィールド値のセマンティック データ型。

DocumentModelDetails

ドキュメント モデル情報。

DocumentTypeDetails

ドキュメントの種類の情報。

Error

エラー情報。

ErrorResponse

エラー応答オブジェクト。

InnerError

詳細なエラー。

DocumentBuildMode

カスタム ドキュメント モデルのビルド モード。

名前 説明
neural

string

多様なビジュアル テンプレートを使用してドキュメントをサポートします。

template

string

類似のビジュアル テンプレートを使用してドキュメントをターゲットに設定します。

DocumentFieldSchema

JSON スキーマ スタイル構文を使用したフィールド セマンティック スキーマの説明。

名前 説明
description

string

フィールドの説明。

example

string

フィールドコンテンツの例。

items

DocumentFieldSchema

各配列要素のフィールド型スキーマ。

properties

<string,  DocumentFieldSchema>

オブジェクト フィールドの名前付きサブフィールド。

type

DocumentFieldType

フィールド値のセマンティック データ型。

DocumentFieldType

フィールド値のセマンティック データ型。

名前 説明
address

string

解析されたアドレス。

array

string

同じ型のサブフィールドの一覧。

boolean

string

true または false に正規化されたブール値。

countryRegion

string

ISO 3166-1 alpha-3 形式 (米国など) に正規化された国/地域。

currency

string

通貨記号と単位を省略可能な通貨金額。

date

string

ISO 8601 (YYYY-MM-DD) 形式に正規化された日付。

integer

string

64 ビット符号付き整数に正規化された整数。

number

string

倍精度浮動小数点に正規化された浮動小数点数。

object

string

異なる可能性がある型のサブフィールドの名前付きリスト。

phoneNumber

string

E.164 (+{CountryCode}{SubscriberNumber}) 形式に正規化された電話番号。

selectionMark

string

フィールドは選択されていますか?

signature

string

署名は存在しますか?

string

string

プレーンテキスト。

time

string

ISO 8601 (hh:mm:ss) 形式に正規化された時間。

DocumentModelDetails

ドキュメント モデル情報。

名前 説明
apiVersion

string

このドキュメント モデルの作成に使用される API バージョン。

createdDateTime

string

ドキュメント モデルが作成された日時 (UTC)。

description

string

ドキュメント モデルの説明。

docTypes

<string,  DocumentTypeDetails>

サポートされているドキュメントの種類。

expirationDateTime

string

ドキュメント モデルの有効期限が切れる日時 (UTC)。

modelId

string

一意のドキュメント モデル名。

tags

object

ドキュメント モデルに関連付けられているキーと値のタグ属性の一覧。

DocumentTypeDetails

ドキュメントの種類の情報。

名前 説明
buildMode

DocumentBuildMode

カスタム ドキュメント モデルのビルド モード。

description

string

ドキュメント モデルの説明。

fieldConfidence

object

各フィールドの推定信頼度。

fieldSchema

<string,  DocumentFieldSchema>

JSON スキーマ スタイル構文を使用したドキュメント セマンティック スキーマの説明。

Error

エラー情報。

名前 説明
code

string

エラー コード。

details

Error[]

詳細なエラーの一覧。

innererror

InnerError

詳細なエラー。

message

string

エラー メッセージ。

target

string

エラーのターゲット。

ErrorResponse

エラー応答オブジェクト。

名前 説明
error

Error

エラー情報。

InnerError

詳細なエラー。

名前 説明
code

string

エラー コード。

innererror

InnerError

詳細なエラー。

message

string

エラー メッセージ。