Document Classifiers - Get Classify Result

Gets the result of document classifier.

GET {endpoint}/documentintelligence/documentClassifiers/{classifierId}/analyzeResults/{resultId}?api-version=2024-07-31-preview

URI Parameters

Name In Required Type Description
classifierId
path True

string

Unique document classifier name.

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

endpoint
path True

string

uri

The Document Intelligence service endpoint.

resultId
path True

string

uuid

Analyze operation result ID.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

AnalyzeResultOperation

The request has succeeded.

Other Status Codes

ErrorResponse

An unexpected error response.

Security

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

Examples

Get Classify Document Result

Sample request

GET https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentClassifiers/myClassifier/analyzeResults/3b31320d-8bab-4f88-b19c-2322a7f11034?api-version=2024-07-31-preview

Sample response

{
  "status": "succeeded",
  "createdDateTime": "2021-09-24T13:00:46Z",
  "lastUpdatedDateTime": "2021-09-24T13:00:49Z",
  "analyzeResult": {
    "apiVersion": "2024-07-31-preview",
    "modelId": "myClassifier",
    "stringIndexType": "textElements",
    "contentFormat": "text",
    "content": "",
    "pages": [
      {
        "pageNumber": 1,
        "width": 8.5,
        "height": 11,
        "unit": "inch",
        "spans": []
      },
      {
        "pageNumber": 2,
        "width": 8.5,
        "height": 11,
        "unit": "inch",
        "spans": []
      },
      {
        "pageNumber": 3,
        "width": 8.5,
        "height": 11,
        "unit": "inch",
        "spans": []
      }
    ],
    "documents": [
      {
        "docType": "formA",
        "boundingRegions": [
          {
            "pageNumber": 1,
            "polygon": [
              0,
              0,
              8.5,
              0,
              8.5,
              11,
              0,
              11
            ]
          },
          {
            "pageNumber": 2,
            "polygon": [
              0,
              0,
              8.5,
              0,
              8.5,
              11,
              0,
              11
            ]
          }
        ],
        "confidence": 0.97,
        "spans": []
      },
      {
        "docType": "formB",
        "boundingRegions": [
          {
            "pageNumber": 3,
            "polygon": [
              0,
              0,
              8.5,
              0,
              8.5,
              11,
              0,
              11
            ]
          }
        ],
        "confidence": 0.97,
        "spans": []
      }
    ]
  }
}

Definitions

Name Description
AddressValue

Address field value.

AnalyzeResult

Document analysis result.

AnalyzeResultOperation

Status and result of the analyze operation.

BoundingRegion

Bounding polygon on a specific page of the input.

ContentFormat

Format of the content in analyzed result.

CurrencyValue

Currency field value.

Document

An object describing the location and semantic content of a document.

DocumentBarcode

A barcode object.

DocumentBarcodeKind

Barcode kind.

DocumentCaption

A caption object describing a table or figure.

DocumentField

An object representing the content and location of a field value.

DocumentFieldType

Semantic data type of the field value.

DocumentFigure

An object representing a figure in the document.

DocumentFootnote

A footnote object describing a table or figure.

DocumentFormula

A formula object.

DocumentFormulaKind

Formula kind.

DocumentKeyValueElement

An object representing the field key or value in a key-value pair.

DocumentKeyValuePair

An object representing a form field with distinct field label (key) and field value (may be empty).

DocumentLanguage

An object representing the detected language for a given text span.

DocumentLine

A content line object consisting of an adjacent sequence of content elements, such as words and selection marks.

DocumentPage

Content and layout elements extracted from a page from the input.

DocumentParagraph

A paragraph object consisting with contiguous lines generally with common alignment and spacing.

DocumentSection

An object representing a section in the document.

DocumentSelectionMark

A selection mark object representing check boxes, radio buttons, and other elements indicating a selection.

DocumentSelectionMarkState

State of the selection mark.

DocumentSignatureType

Presence of signature.

DocumentSpan

Contiguous region of the concatenated content property, specified as an offset and length.

DocumentStyle

An object representing observed text styles.

DocumentTable

A table object consisting table cells arranged in a rectangular layout.

DocumentTableCell

An object representing the location and content of a table cell.

DocumentTableCellKind

Table cell kind.

DocumentWord

A word object consisting of a contiguous sequence of characters. For non-space delimited languages, such as Chinese, Japanese, and Korean, each character is represented as its own word.

Error

The error object.

ErrorResponse

Error response object.

FontStyle

Font style.

FontWeight

Font weight.

InnerError

An object containing more specific information about the error.

LengthUnit

The unit used by the width, height, and polygon properties. For images, the unit is "pixel". For PDF, the unit is "inch".

OperationStatus

Operation status.

ParagraphRole

Semantic role of the paragraph.

StringIndexType

Method used to compute string offset and length.

Warning

The error object.

AddressValue

Address field value.

Name Type Description
city

string

Name of city, town, village, etc.

cityDistrict

string

Districts or boroughs within a city, such as Brooklyn in New York City or City of Westminster in London.

countryRegion

string

Country/region.

house

string

Build name, such as World Trade Center.

houseNumber

string

House or building number.

level

string

Floor number, such as 3F.

poBox

string

Post office box number.

postalCode

string

Postal code used for mail sorting.

road

string

Street name.

state

string

First-level administrative division.

stateDistrict

string

Second-level administrative division used in certain locales.

streetAddress

string

Street-level address, excluding city, state, countryRegion, and postalCode.

suburb

string

Unofficial neighborhood name, like Chinatown.

unit

string

Apartment or office number

AnalyzeResult

Document analysis result.

Name Type Description
apiVersion

string

API version used to produce this result.

content

string

Concatenate string representation of all textual and visual elements in reading order.

contentFormat

ContentFormat

Format of the analyze result top-level content.

documents

Document[]

Extracted documents.

figures

DocumentFigure[]

Extracted figures.

keyValuePairs

DocumentKeyValuePair[]

Extracted key-value pairs.

languages

DocumentLanguage[]

Detected languages.

modelId

string

Document model ID used to produce this result.

pages

DocumentPage[]

Analyzed pages.

paragraphs

DocumentParagraph[]

Extracted paragraphs.

sections

DocumentSection[]

Extracted sections.

stringIndexType

StringIndexType

Method used to compute string offset and length.

styles

DocumentStyle[]

Extracted font styles.

tables

DocumentTable[]

Extracted tables.

warnings

Warning[]

List of warnings encountered.

AnalyzeResultOperation

Status and result of the analyze operation.

Name Type Description
analyzeResult

AnalyzeResult

Document analysis result.

createdDateTime

string

Date and time (UTC) when the analyze operation was submitted.

error

Error

Encountered error during document analysis.

lastUpdatedDateTime

string

Date and time (UTC) when the status was last updated.

status

OperationStatus

Operation status. notStarted, running, succeeded, or failed

BoundingRegion

Bounding polygon on a specific page of the input.

Name Type Description
pageNumber

integer

1-based page number of page containing the bounding region.

polygon

number[]

Bounding polygon on the page, or the entire page if not specified. Coordinates specified relative to the top-left of the page. The numbers represent the x, y values of the polygon vertices, clockwise from the left (-180 degrees inclusive) relative to the element orientation.

ContentFormat

Format of the content in analyzed result.

Name Type Description
markdown

string

Markdown representation of the document content with section headings, tables, etc.

text

string

Plain text representation of the document content without any formatting.

CurrencyValue

Currency field value.

Name Type Description
amount

number

Currency amount.

currencyCode

string

Resolved currency code (ISO 4217), if any.

currencySymbol

string

Currency symbol label, if any.

Document

An object describing the location and semantic content of a document.

Name Type Description
boundingRegions

BoundingRegion[]

Bounding regions covering the document.

confidence

number

Confidence of correctly extracting the document.

docType

string

Document type.

fields

<string,  DocumentField>

Dictionary of named field values.

spans

DocumentSpan[]

Location of the document in the reading order concatenated content.

DocumentBarcode

A barcode object.

Name Type Description
confidence

number

Confidence of correctly extracting the barcode.

kind

DocumentBarcodeKind

Barcode kind.

polygon

number[]

Bounding polygon of the barcode, with coordinates specified relative to the top-left of the page. The numbers represent the x, y values of the polygon vertices, clockwise from the left (-180 degrees inclusive) relative to the element orientation.

span

DocumentSpan

Location of the barcode in the reading order concatenated content.

value

string

Barcode value.

DocumentBarcodeKind

Barcode kind.

Name Type Description
Aztec

string

Aztec code, as defined in ISO/IEC 24778:2008.

Codabar

string

Codabar barcode, as defined in ANSI/AIM BC3-1995.

Code128

string

Code 128 barcode, as defined in ISO/IEC 15417:2007.

Code39

string

Code 39 barcode, as defined in ISO/IEC 16388:2007.

Code93

string

Code 93 barcode, as defined in ANSI/AIM BC5-1995.

DataBar

string

GS1 DataBar barcode.

DataBarExpanded

string

GS1 DataBar Expanded barcode.

DataMatrix

string

Data matrix code, as defined in ISO/IEC 16022:2006.

EAN13

string

GS1 13-digit International Article Number (European Article Number).

EAN8

string

GS1 8-digit International Article Number (European Article Number).

ITF

string

Interleaved 2 of 5 barcode, as defined in ANSI/AIM BC2-1995.

MaxiCode

string

MaxiCode, as defined in ISO/IEC 16023:2000.

MicroQRCode

string

Micro QR code, as defined in ISO/IEC 23941:2022.

PDF417

string

PDF417, as defined in ISO 15438.

QRCode

string

QR code, as defined in ISO/IEC 18004:2015.

UPCA

string

GS1 12-digit Universal Product Code.

UPCE

string

GS1 6-digit Universal Product Code.

DocumentCaption

A caption object describing a table or figure.

Name Type Description
boundingRegions

BoundingRegion[]

Bounding regions covering the caption.

content

string

Content of the caption.

elements

string[]

Child elements of the caption.

spans

DocumentSpan[]

Location of the caption in the reading order concatenated content.

DocumentField

An object representing the content and location of a field value.

Name Type Description
boundingRegions

BoundingRegion[]

Bounding regions covering the field.

confidence

number

Confidence of correctly extracting the field.

content

string

Field content.

spans

DocumentSpan[]

Location of the field in the reading order concatenated content.

type

DocumentFieldType

Data type of the field value.

valueAddress

AddressValue

Address value.

valueArray

DocumentField[]

Array of field values.

valueBoolean

boolean

Boolean value.

valueCountryRegion

string

3-letter country code value (ISO 3166-1 alpha-3).

valueCurrency

CurrencyValue

Currency value.

valueDate

string

Date value in YYYY-MM-DD format (ISO 8601).

valueInteger

integer

Integer value.

valueNumber

number

Floating point value.

valueObject

<string,  DocumentField>

Dictionary of named field values.

valuePhoneNumber

string

Phone number value in E.164 format (ex. +19876543210).

valueSelectionGroup

string[]

Selection group value.

valueSelectionMark

DocumentSelectionMarkState

Selection mark value.

valueSignature

DocumentSignatureType

Presence of signature.

valueString

string

String value.

valueTime

string

Time value in hh:mm:ss format (ISO 8601).

DocumentFieldType

Semantic data type of the field value.

Name Type Description
address

string

Parsed address.

array

string

List of subfields of the same type.

boolean

string

Boolean value, normalized to true or false.

countryRegion

string

Country/region, normalized to ISO 3166-1 alpha-3 format (ex. USA).

currency

string

Currency amount with optional currency symbol and unit.

date

string

Date, normalized to ISO 8601 (YYYY-MM-DD) format.

integer

string

Integer number, normalized to 64-bit signed integer.

number

string

Floating point number, normalized to double precision floating point.

object

string

Named list of subfields of potentially different types.

phoneNumber

string

Phone number, normalized to E.164 (+{CountryCode}{SubscriberNumber}) format.

selectionGroup

string

Array of selected string values.

selectionMark

string

Is field selected?

signature

string

Is signature present?

string

string

Plain text.

time

string

Time, normalized to ISO 8601 (hh:mm:ss) format.

DocumentFigure

An object representing a figure in the document.

Name Type Description
boundingRegions

BoundingRegion[]

Bounding regions covering the figure.

caption

DocumentCaption

Caption associated with the figure.

elements

string[]

Child elements of the figure, excluding any caption or footnotes.

footnotes

DocumentFootnote[]

List of footnotes associated with the figure.

id

string

Figure ID.

spans

DocumentSpan[]

Location of the figure in the reading order concatenated content.

DocumentFootnote

A footnote object describing a table or figure.

Name Type Description
boundingRegions

BoundingRegion[]

Bounding regions covering the footnote.

content

string

Content of the footnote.

elements

string[]

Child elements of the footnote.

spans

DocumentSpan[]

Location of the footnote in the reading order concatenated content.

DocumentFormula

A formula object.

Name Type Description
confidence

number

Confidence of correctly extracting the formula.

kind

DocumentFormulaKind

Formula kind.

polygon

number[]

Bounding polygon of the formula, with coordinates specified relative to the top-left of the page. The numbers represent the x, y values of the polygon vertices, clockwise from the left (-180 degrees inclusive) relative to the element orientation.

span

DocumentSpan

Location of the formula in the reading order concatenated content.

value

string

LaTex expression describing the formula.

DocumentFormulaKind

Formula kind.

Name Type Description
display

string

A formula in display mode that takes up an entire line.

inline

string

A formula embedded within the content of a paragraph.

DocumentKeyValueElement

An object representing the field key or value in a key-value pair.

Name Type Description
boundingRegions

BoundingRegion[]

Bounding regions covering the key-value element.

content

string

Concatenated content of the key-value element in reading order.

spans

DocumentSpan[]

Location of the key-value element in the reading order concatenated content.

DocumentKeyValuePair

An object representing a form field with distinct field label (key) and field value (may be empty).

Name Type Description
confidence

number

Confidence of correctly extracting the key-value pair.

key

DocumentKeyValueElement

Field label of the key-value pair.

value

DocumentKeyValueElement

Field value of the key-value pair.

DocumentLanguage

An object representing the detected language for a given text span.

Name Type Description
confidence

number

Confidence of correctly identifying the language.

locale

string

Detected language. Value may an ISO 639-1 language code (ex. "en", "fr") or BCP 47 language tag (ex. "zh-Hans").

spans

DocumentSpan[]

Location of the text elements in the concatenated content the language applies to.

DocumentLine

A content line object consisting of an adjacent sequence of content elements, such as words and selection marks.

Name Type Description
content

string

Concatenated content of the contained elements in reading order.

polygon

number[]

Bounding polygon of the line, with coordinates specified relative to the top-left of the page. The numbers represent the x, y values of the polygon vertices, clockwise from the left (-180 degrees inclusive) relative to the element orientation.

spans

DocumentSpan[]

Location of the line in the reading order concatenated content.

DocumentPage

Content and layout elements extracted from a page from the input.

Name Type Description
angle

number

The general orientation of the content in clockwise direction, measured in degrees between (-180, 180].

barcodes

DocumentBarcode[]

Extracted barcodes from the page.

formulas

DocumentFormula[]

Extracted formulas from the page.

height

number

The height of the image/PDF in pixels/inches, respectively.

lines

DocumentLine[]

Extracted lines from the page, potentially containing both textual and visual elements.

pageNumber

integer

1-based page number in the input document.

selectionMarks

DocumentSelectionMark[]

Extracted selection marks from the page.

spans

DocumentSpan[]

Location of the page in the reading order concatenated content.

unit

LengthUnit

The unit used by the width, height, and polygon properties. For images, the unit is "pixel". For PDF, the unit is "inch".

width

number

The width of the image/PDF in pixels/inches, respectively.

words

DocumentWord[]

Extracted words from the page.

DocumentParagraph

A paragraph object consisting with contiguous lines generally with common alignment and spacing.

Name Type Description
boundingRegions

BoundingRegion[]

Bounding regions covering the paragraph.

content

string

Concatenated content of the paragraph in reading order.

role

ParagraphRole

Semantic role of the paragraph.

spans

DocumentSpan[]

Location of the paragraph in the reading order concatenated content.

DocumentSection

An object representing a section in the document.

Name Type Description
elements

string[]

Child elements of the section.

spans

DocumentSpan[]

Location of the section in the reading order concatenated content.

DocumentSelectionMark

A selection mark object representing check boxes, radio buttons, and other elements indicating a selection.

Name Type Description
confidence

number

Confidence of correctly extracting the selection mark.

polygon

number[]

Bounding polygon of the selection mark, with coordinates specified relative to the top-left of the page. The numbers represent the x, y values of the polygon vertices, clockwise from the left (-180 degrees inclusive) relative to the element orientation.

span

DocumentSpan

Location of the selection mark in the reading order concatenated content.

state

DocumentSelectionMarkState

State of the selection mark.

DocumentSelectionMarkState

State of the selection mark.

Name Type Description
selected

string

The selection mark is selected, often indicated by a check ✓ or cross X inside the selection mark.

unselected

string

The selection mark is not selected.

DocumentSignatureType

Presence of signature.

Name Type Description
signed

string

A signature is detected.

unsigned

string

No signatures are detected.

DocumentSpan

Contiguous region of the concatenated content property, specified as an offset and length.

Name Type Description
length

integer

Number of characters in the content represented by the span.

offset

integer

Zero-based index of the content represented by the span.

DocumentStyle

An object representing observed text styles.

Name Type Description
backgroundColor

string

Background color in #rrggbb hexadecimal format..

color

string

Foreground color in #rrggbb hexadecimal format.

confidence

number

Confidence of correctly identifying the style.

fontStyle

FontStyle

Font style.

fontWeight

FontWeight

Font weight.

isHandwritten

boolean

Is content handwritten?

similarFontFamily

string

Visually most similar font from among the set of supported font families, with fallback fonts following CSS convention (ex. 'Arial, sans-serif').

spans

DocumentSpan[]

Location of the text elements in the concatenated content the style applies to.

DocumentTable

A table object consisting table cells arranged in a rectangular layout.

Name Type Description
boundingRegions

BoundingRegion[]

Bounding regions covering the table.

caption

DocumentCaption

Caption associated with the table.

cells

DocumentTableCell[]

Cells contained within the table.

columnCount

integer

Number of columns in the table.

footnotes

DocumentFootnote[]

List of footnotes associated with the table.

rowCount

integer

Number of rows in the table.

spans

DocumentSpan[]

Location of the table in the reading order concatenated content.

DocumentTableCell

An object representing the location and content of a table cell.

Name Type Default value Description
boundingRegions

BoundingRegion[]

Bounding regions covering the table cell.

columnIndex

integer

Column index of the cell.

columnSpan

integer

1

Number of columns spanned by this cell.

content

string

Concatenated content of the table cell in reading order.

elements

string[]

Child elements of the table cell.

kind

DocumentTableCellKind

content

Table cell kind.

rowIndex

integer

Row index of the cell.

rowSpan

integer

1

Number of rows spanned by this cell.

spans

DocumentSpan[]

Location of the table cell in the reading order concatenated content.

DocumentTableCellKind

Table cell kind.

Name Type Description
columnHeader

string

Describes the content of the column.

content

string

Contains the main content/data.

description

string

Describes the content in (parts of) the table.

rowHeader

string

Describes the content of the row.

stubHead

string

Describes the row headers, usually located at the top left corner of a table.

DocumentWord

A word object consisting of a contiguous sequence of characters. For non-space delimited languages, such as Chinese, Japanese, and Korean, each character is represented as its own word.

Name Type Description
confidence

number

Confidence of correctly extracting the word.

content

string

Text content of the word.

polygon

number[]

Bounding polygon of the word, with coordinates specified relative to the top-left of the page. The numbers represent the x, y values of the polygon vertices, clockwise from the left (-180 degrees inclusive) relative to the element orientation.

span

DocumentSpan

Location of the word in the reading order concatenated content.

Error

The error object.

Name Type Description
code

string

One of a server-defined set of error codes.

details

Error[]

An array of details about specific errors that led to this reported error.

innererror

InnerError

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

target

string

The target of the error.

ErrorResponse

Error response object.

Name Type Description
error

Error

Error info.

FontStyle

Font style.

Name Type Description
italic

string

Characters are visually slanted to the right.

normal

string

Characters are represented normally.

FontWeight

Font weight.

Name Type Description
bold

string

Characters are represented with thicker strokes.

normal

string

Characters are represented normally.

InnerError

An object containing more specific information about the error.

Name Type Description
code

string

One of a server-defined set of error codes.

innererror

InnerError

Inner error.

message

string

A human-readable representation of the error.

LengthUnit

The unit used by the width, height, and polygon properties. For images, the unit is "pixel". For PDF, the unit is "inch".

Name Type Description
inch

string

Length unit for PDF files.

pixel

string

Length unit for image files.

OperationStatus

Operation status.

Name Type Description
canceled

string

The operation has been canceled.

completed

string

The operation has completed.

failed

string

The operation has failed.

notStarted

string

The operation has not started yet.

running

string

The operation is in progress.

succeeded

string

The operation has succeeded.

ParagraphRole

Semantic role of the paragraph.

Name Type Description
footnote

string

A note usually placed after the main content on a page.

formulaBlock

string

A block of formulas, often with shared alignment.

pageFooter

string

Text near the bottom edge of the page.

pageHeader

string

Text near the top edge of the page.

pageNumber

string

Page number.

sectionHeading

string

Sub heading describing a section of the document.

title

string

Top-level title describing the entire document.

StringIndexType

Method used to compute string offset and length.

Name Type Description
textElements

string

User-perceived display character, or grapheme cluster, as defined by Unicode 8.0.0.

unicodeCodePoint

string

Character unit represented by a single unicode code point. Used by Python 3.

utf16CodeUnit

string

Character unit represented by a 16-bit Unicode code unit. Used by JavaScript, Java, and .NET.

Warning

The error object.

Name Type Description
code

string

One of a server-defined set of warning codes.

message

string

A human-readable representation of the warning.

target

string

The target of the error.