Analyzer - Get Analyze Invoice Result

Track the progress and obtain the result of the analyze invoice operation.

GET {endpoint}/formrecognizer/v2.1/prebuilt/invoice/analyzeResults/{resultId}

URI Parameters

Name In Required Type Description
endpoint
path True

string

Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).

resultId
path True

string (uuid)

Analyze operation result identifier.

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Responses

Name Type Description
200 OK

AnalyzeOperationResult

Success

Other Status Codes

ErrorResponse

Response entity accompanying non-successful responses containing additional details about the error.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Get analyze receipt result

Sample request

GET {endpoint}/formrecognizer/v2.1/prebuilt/invoice/analyzeResults/3b1e6c5b-e113-4114-ab6b-ce65dfe8050f

Sample response

{
  "status": "running",
  "createdDateTime": "2019-05-01T10:53:21Z",
  "lastUpdatedDateTime": "2019-05-01T10:53:23Z",
  "analyzeResult": {
    "version": "v2.1",
    "readResults": [],
    "pageResults": [],
    "documentResults": [],
    "errors": []
  }
}

Definitions

Name Description
AnalyzeOperationResult

Status and result of the queued analyze operation.

AnalyzeResult

Analyze operation result.

Appearance

An object representing the appearance of the text line.

DataTable

Information about the extracted table contained in a page.

DataTableCell

Information about the extracted cell in a table.

DocumentResult

A set of extracted fields corresponding to the input document.

ErrorInformation
ErrorResponse
FieldValue

Recognized field value.

FieldValueType

Semantic data type of the field value.

KeyValueElement

Information about the extracted key or value in a key-value pair.

KeyValuePair

Information about the extracted key-value pair.

KeyValueType

Semantic data type of the key value element.

LengthUnit

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

OperationStatus

Status of the queued operation.

PageResult

Extracted information from a single page.

ReadResult

Text extracted from a page in the input document.

SelectionMark

Information about the extracted selection mark.

Style

An object representing the style of the text line.

TextLine

An object representing an extracted text line.

TextStyle

The text line style name, including handwriting and other.

TextWord

An object representing a word.

AnalyzeOperationResult

Status and result of the queued analyze operation.

Name Type Description
analyzeResult

AnalyzeResult

Results of the analyze operation.

createdDateTime

string (date-time)

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

lastUpdatedDateTime

string (date-time)

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

status

OperationStatus

Operation status.

AnalyzeResult

Analyze operation result.

Name Type Description
documentResults

DocumentResult[]

Document-level information extracted from the input.

errors

ErrorInformation[]

List of errors reported during the analyze operation.

pageResults

PageResult[]

Page-level information extracted from the input.

readResults

ReadResult[]

Text extracted from the input.

version

string

Version of schema used for this result.

Appearance

An object representing the appearance of the text line.

Name Type Description
style

Style

An object representing the style of the text line.

DataTable

Information about the extracted table contained in a page.

Name Type Description
boundingBox

number[]

Bounding box of the table.

cells

DataTableCell[]

List of cells contained in the table.

columns

integer

minimum: 1

Number of columns.

rows

integer

minimum: 1

Number of rows.

DataTableCell

Information about the extracted cell in a table.

Name Type Default value Description
boundingBox

number[]

Bounding box of the cell.

columnIndex

integer

minimum: 0

Column index of the cell.

columnSpan

integer

minimum: 1
1

Number of columns spanned by this cell.

confidence

number

minimum: 0
maximum: 1

Confidence value.

elements

string[]

When includeTextDetails is set to true, a list of references to the text elements constituting this table cell.

isFooter

boolean

False

Is the current cell a footer cell?

isHeader

boolean

False

Is the current cell a header cell?

rowIndex

integer

minimum: 0

Row index of the cell.

rowSpan

integer

minimum: 1
1

Number of rows spanned by this cell.

text

string

Text content of the cell.

DocumentResult

A set of extracted fields corresponding to the input document.

Name Type Description
docType

string

Document type.

docTypeConfidence

number

minimum: 0
maximum: 1

Predicted document type confidence.

fields

<string,  FieldValue>

Dictionary of named field values.

modelId

string (uuid)

Model identifier.

pageRange

integer[]

minimum: 1

First and last page number where the document is found.

ErrorInformation

Name Type Description
code

string

message

string

ErrorResponse

Name Type Description
error

ErrorInformation

FieldValue

Recognized field value.

Name Type Description
boundingBox

number[]

Bounding box of the field value, if appropriate.

confidence

number

minimum: 0
maximum: 1

Confidence score.

elements

string[]

When includeTextDetails is set to true, a list of references to the text elements constituting this field.

page

integer

minimum: 1

The 1-based page number in the input document.

text

string

Text content of the extracted field.

type

FieldValueType

Type of field value.

valueArray

FieldValue[]

Array of field values.

valueCountryRegion

string

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

valueDate

string (date)

Date value.

valueInteger

integer

Integer value.

valueNumber

number

Floating point value.

valueObject

<string,  FieldValue>

Dictionary of named field values.

valuePhoneNumber

string

Phone number value.

valueSelectionMark enum:
  • selected
  • unselected

Selection mark value.

valueString

string

String value.

valueTime

string (time)

Time value.

FieldValueType

Semantic data type of the field value.

Value Description
array
countryRegion
date
integer
number
object
phoneNumber
selectionMark
string
time

KeyValueElement

Information about the extracted key or value in a key-value pair.

Name Type Description
boundingBox

number[]

Bounding box of the key or value.

elements

string[]

When includeTextDetails is set to true, a list of references to the text elements constituting this key or value.

text

string

The text content of the key or value.

type

KeyValueType

Semantic data type of the key value element.

KeyValuePair

Information about the extracted key-value pair.

Name Type Description
confidence

number

minimum: 0
maximum: 1

Confidence value.

key

KeyValueElement

Information about the extracted key in a key-value pair.

label

string

A user defined label for the key/value pair entry.

value

KeyValueElement

Information about the extracted value in a key-value pair.

KeyValueType

Semantic data type of the key value element.

Value Description
selectionMark
string

LengthUnit

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

Value Description
inch
pixel

OperationStatus

Status of the queued operation.

Value Description
failed
notStarted
running
succeeded

PageResult

Extracted information from a single page.

Name Type Description
clusterId

integer (int32)

minimum: 0

Cluster identifier.

keyValuePairs

KeyValuePair[]

List of key-value pairs extracted from the page.

page

integer (int32)

minimum: 1

Page number.

tables

DataTable[]

List of data tables extracted from the page.

ReadResult

Text extracted from a page in the input document.

Name Type Description
angle

number

minimum: -180
maximum: 180
exclusiveMinimum: True

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

height

number

minimum: 0

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

lines

TextLine[]

When includeTextDetails is set to true, a list of recognized text lines. The maximum number of lines returned is 300 per page. The lines are sorted top to bottom, left to right, although in certain cases proximity is treated with higher priority. As the sorting order depends on the detected text, it may change across images and OCR version updates. Thus, business logic should be built upon the actual line location instead of order.

page

integer

minimum: 1

The 1-based page number in the input document.

selectionMarks

SelectionMark[]

List of selection marks extracted from the page.

unit

LengthUnit

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

width

number

minimum: 0

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

SelectionMark

Information about the extracted selection mark.

Name Type Description
boundingBox

number[]

Bounding box of the selection mark.

confidence

number

minimum: 0
maximum: 1

Confidence value.

state enum:
  • selected
  • unselected

State of the selection mark.

Style

An object representing the style of the text line.

Name Type Description
confidence

number (float)

The confidence of text line style.

name

TextStyle

The text line style name, including handwriting and other.

TextLine

An object representing an extracted text line.

Name Type Description
appearance

Appearance

Text appearance properties.

boundingBox

number[]

Bounding box of an extracted line.

text

string

The text content of the line.

words

TextWord[]

List of words in the text line.

TextStyle

The text line style name, including handwriting and other.

Value Description
handwriting
other

TextWord

An object representing a word.

Name Type Description
boundingBox

number[]

Bounding box of an extracted word.

confidence

number

minimum: 0
maximum: 1

Confidence value.

text

string

The text content of the word.