共用方式為


Analyzer - Analyze Invoice

從指定的發票檔中擷取域文字和語意值。 輸入文件必須是其中一種支援的內容類型 :'application/pdf'、'image/jpeg'、'image/png'、'image/tiff' 或 'image/bmp'。 或者,使用 'application/json' 類型來指定要分析的檔位置 (Uri) 。

POST {endpoint}/formrecognizer/v2.1/prebuilt/invoice/analyze
POST {endpoint}/formrecognizer/v2.1/prebuilt/invoice/analyze?includeTextDetails={includeTextDetails}&locale={locale}&pages={pages}

URI 參數

名稱 位於 必要 類型 Description
endpoint
path True

string

支援的認知服務端點 (通訊協定和主機名,例如: https://westus2.api.cognitive.microsoft.com) 。

includeTextDetails
query

boolean

在結果中包含文字行和項目參考。

locale
query

Locale

輸入文件的地區設定。 支持的地區設定包括:en-AU、en-CA、en-GB、en-IN、en-US (預設) 。

pages
query

string[]

多頁檔的自定義頁碼 (PDF/TIFF) ,輸入您想要取得 OCR 結果的頁面數目。 對於一系列的頁面,請使用連字元。 以逗號分隔每個頁面或範圍。

要求標頭

Media Types: "application/pdf", "application/json", "image/jpeg", "image/png", "image/tiff", "image/bmp"

名稱 必要 類型 Description
Ocp-Apim-Subscription-Key True

string

要求本文

Media Types: "application/pdf", "application/json", "image/jpeg", "image/png", "image/tiff", "image/bmp"

名稱 類型 Description
source

string

檔案來源路徑。

回應

名稱 類型 Description
202 Accepted

要求已順利排入佇列。

標題

Operation-Location: string

Other Status Codes

ErrorResponse

回應實體隨附的非成功回應,其中包含有關錯誤的其他詳細數據。

安全性

Ocp-Apim-Subscription-Key

類型: apiKey
位於: header

範例

Analyze receipt

範例要求

POST {endpoint}/formrecognizer/v2.1/prebuilt/invoice/analyze

範例回覆

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

定義

名稱 Description
ErrorInformation
ErrorResponse
Locale

輸入文件的地區設定。 支持的地區設定包括:en-AU、en-CA、en-GB、en-IN、en-US (預設) 。

SourcePath

源數據的 URI 或本機路徑。

ErrorInformation

名稱 類型 Description
code

string

message

string

ErrorResponse

名稱 類型 Description
error

ErrorInformation

Locale

輸入文件的地區設定。 支持的地區設定包括:en-AU、en-CA、en-GB、en-IN、en-US (預設) 。

名稱 類型 Description
en-AU

string

en-CA

string

en-GB

string

en-IN

string

en-US

string

SourcePath

源數據的 URI 或本機路徑。

名稱 類型 Description
source

string

檔案來源路徑。