Analyzer - Get Analyze Receipt Result

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

GET {endpoint}/formrecognizer/v2.1/prebuilt/receipt/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/receipt/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 and time (UTC) when the analyze operation was submitted.

lastUpdatedDateTime

string

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

Number of columns.

rows

integer

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

Column index of the cell.

columnSpan

integer

1

Number of columns spanned by this cell.

confidence

number

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

Row index of the cell.

rowSpan

integer

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

Predicted document type confidence.

fields

<string,  FieldValue>

Dictionary of named field values.

modelId

string

Model identifier.

pageRange

integer[]

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

Confidence score.

elements

string[]

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

page

integer

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 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 value.

FieldValueType

Semantic data type of the field value.

Name Type Description
array

string

countryRegion

string

date

string

integer

string

number

string

object

string

phoneNumber

string

selectionMark

string

string

string

time

string

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

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.

Name Type Description
selectionMark

string

string

string

LengthUnit

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

Name Type Description
inch

string

pixel

string

OperationStatus

Status of the queued operation.

Name Type Description
failed

string

notStarted

string

running

string

succeeded

string

PageResult

Extracted information from a single page.

Name Type Description
clusterId

integer

Cluster identifier.

keyValuePairs

KeyValuePair[]

List of key-value pairs extracted from the page.

page

integer

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

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

height

number

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

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

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

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

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.

Name Type Description
handwriting

string

other

string

TextWord

An object representing a word.

Name Type Description
boundingBox

number[]

Bounding box of an extracted word.

confidence

number

Confidence value.

text

string

The text content of the word.