Share via


Document Models - Get Model

Hiermee haalt u gedetailleerde informatie over het documentmodel op.

GET {endpoint}/documentintelligence/documentModels/{modelId}?api-version=2024-02-29-preview

URI-parameters

Name In Vereist Type Description
endpoint
path True

string

Het eindpunt van de Document Intelligence-service.

modelId
path True

string

Unieke documentmodelnaam.

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

api-version
query True

string

De API-versie die voor deze bewerking moet worden gebruikt.

Aanvraagkoptekst

Name Vereist Type Description
x-ms-client-request-id

string

uuid

Een ondoorzichtige, wereldwijd unieke, door de client gegenereerde tekenreeks-id voor de aanvraag.

Antwoorden

Name Type Description
200 OK

DocumentModelDetails

De aanvraag is geslaagd.

Headers

x-ms-client-request-id: string

Other Status Codes

ErrorResponse

Een onverwacht foutbericht.

Beveiliging

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

OAuth2Auth

Type: oauth2
Flow: accessCode
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize
Token URL: https://login.microsoftonline.com/common/oauth2/token

Scopes

Name Description
https://cognitiveservices.azure.com/.default

Voorbeelden

Get Custom Document Model
Get Prebuilt Document Model

Get Custom Document Model

Sample Request

GET https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/myCustomModel?api-version=2024-02-29-preview

Sample Response

{
  "modelId": "myCustomModel",
  "description": "Custom model description",
  "createdDateTime": "2021-09-24T12:54:35Z",
  "expirationDateTime": "2023-01-01T00:00:00Z",
  "apiVersion": "2024-02-29-preview",
  "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/documentintelligence/documentModels/prebuilt-invoice?api-version=2024-02-29-preview

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": "2024-02-29-preview",
  "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": {}
}

Definities

Name Description
AzureBlobContentSource

Azure Blob Storage inhoud.

AzureBlobFileListContentSource

Lijst met bestanden in Azure Blob Storage.

DocumentBuildMode

Modus voor het maken van aangepast documentmodellen.

DocumentFieldSchema

Beschrijving van het veldsemantische schema met behulp van een JSON-schemastijlsyntaxis.

DocumentFieldType

Semantisch gegevenstype van de veldwaarde.

DocumentModelDetails

Documentmodelgegevens.

DocumentTypeDetails

Informatie over documenttype.

Error

Het foutobject.

ErrorResponse

Foutreactieobject.

InnerError

Een object met specifiekere informatie over de fout.

Warning

Het foutobject.

AzureBlobContentSource

Azure Blob Storage inhoud.

Name Type Description
containerUrl

string

Azure Blob Storage container-URL.

prefix

string

Blobnaamvoorvoegsel.

AzureBlobFileListContentSource

Lijst met bestanden in Azure Blob Storage.

Name Type Description
containerUrl

string

Azure Blob Storage container-URL.

fileList

string

Pad naar een JSONL-bestand in de container waarin een subset van documenten wordt opgegeven.

DocumentBuildMode

Modus voor het maken van aangepast documentmodellen.

Name Type Description
neural

string

Ondersteuningsdocumenten met diverse visuele sjablonen.

template

string

Doeldocumenten met vergelijkbare visuele sjablonen.

DocumentFieldSchema

Beschrijving van het veldsemantische schema met behulp van een JSON-schemastijlsyntaxis.

Name Type Description
description

string

Veldbeschrijving.

example

string

Voorbeeld van veldinhoud.

items

DocumentFieldSchema

Veldtypeschema van elk matrixelement.

properties

<string,  DocumentFieldSchema>

Benoemde subvelden van het objectveld.

type

DocumentFieldType

Semantisch gegevenstype van de veldwaarde.

DocumentFieldType

Semantisch gegevenstype van de veldwaarde.

Name Type Description
address

string

Geparseerd adres.

array

string

Lijst met subvelden van hetzelfde type.

boolean

string

Booleaanse waarde, genormaliseerd naar waar of onwaar.

countryRegion

string

Land/regio, genormaliseerd naar ISO 3166-1 alfa-3-indeling (bijvoorbeeld VS).

currency

string

Valutabedrag met optioneel valutasymbool en -eenheid.

date

string

Datum, genormaliseerd naar ISO 8601-indeling (JJJJ-MM-DD).

integer

string

Geheel getal, genormaliseerd naar een 64-bits geheel getal met teken.

number

string

Drijvendekommagetal, genormaliseerd tot dubbele precisie drijvende komma.

object

string

Benoemde lijst met subvelden van mogelijk verschillende typen.

phoneNumber

string

Telefoonnummer, genormaliseerd naar E.164-indeling (+{CountryCode}{SubscriberNumber}).

selectionGroup

string

Matrix van geselecteerde tekenreekswaarden.

selectionMark

string

Is het veld geselecteerd?

signature

string

Is handtekening aanwezig?

string

string

Tekst zonder opmaak.

time

string

Tijd, genormaliseerd naar ISO 8601-indeling (uu:mm:ss).

DocumentModelDetails

Documentmodelgegevens.

Name Type Description
apiVersion

string

API-versie die wordt gebruikt om dit documentmodel te maken.

azureBlobFileListSource

AzureBlobFileListContentSource

Azure Blob Storage bestandslijst waarin de trainingsgegevens worden opgegeven. AzureBlobSource of azureBlobFileListSource moet worden opgegeven.

azureBlobSource

AzureBlobContentSource

Azure Blob Storage locatie met de trainingsgegevens. AzureBlobSource of azureBlobFileListSource moet worden opgegeven.

buildMode

DocumentBuildMode

Modus voor het maken van aangepast documentmodellen.

createdDateTime

string

De datum en tijd (UTC) waarop het documentmodel is gemaakt.

description

string

Beschrijving van documentmodel.

docTypes

<string,  DocumentTypeDetails>

Ondersteunde documenttypen.

expirationDateTime

string

De datum en tijd (UTC) waarop het documentmodel verloopt.

modelId

string

Unieke documentmodelnaam.

tags

object

Lijst met sleutel-waardetagkenmerken die zijn gekoppeld aan het documentmodel.

warnings

Warning[]

Lijst met waarschuwingen die zijn aangetroffen tijdens het bouwen van het model.

DocumentTypeDetails

Informatie over documenttype.

Name Type Description
buildMode

DocumentBuildMode

Modus voor het maken van aangepast documentmodellen.

description

string

Beschrijving van documentmodel.

fieldConfidence

object

Geschatte betrouwbaarheid voor elk veld.

fieldSchema

<string,  DocumentFieldSchema>

Beschrijving van het semantische documentschema met behulp van een JSON-schemastijlsyntaxis.

Error

Het foutobject.

Name Type Description
code

string

Een van een door de server gedefinieerde set foutcodes.

details

Error[]

Een matrix met details over specifieke fouten die tot deze gerapporteerde fout hebben geleid.

innererror

InnerError

Een object met specifiekere informatie dan het huidige object over de fout.

message

string

Een door mensen leesbare weergave van de fout.

target

string

Het doel van de fout.

ErrorResponse

Foutreactieobject.

Name Type Description
error

Error

Foutinformatie.

InnerError

Een object met specifiekere informatie over de fout.

Name Type Description
code

string

Een van een door de server gedefinieerde set foutcodes.

innererror

InnerError

Interne fout.

message

string

Een door mensen leesbare weergave van de fout.

Warning

Het foutobject.

Name Type Description
code

string

Een van een door de server gedefinieerde set waarschuwingscodes.

message

string

Een door mensen leesbare weergave van de waarschuwing.

target

string

Het doel van de fout.