結果ファイルをダウンロードします
curl --request GET \
--url https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download \
--header 'Authorization: Bearer <token>'import requests
url = "https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"Fields": {
"Business Unit": {
"City": "Springfield",
"CountryCode": "US",
"Name": "Acme Corp"
},
"Currency": "USD",
"Invoice Date": "01/15/2024",
"Invoice Number": "INV-2024-0042",
"Line Items": [
{
"Description": "Widget, industrial grade",
"Quantity": "2",
"Total Price": "1,250.00",
"Unit Price": "625.00"
}
],
"Total": "1,250.00"
},
"Version": "3.0"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Transactions
結果ファイルをダウンロードします
トランザクションの結果ファイルをダウンロードします。
GET
/
api
/
publicapi
/
v1
/
transactions
/
{transactionId}
/
files
/
{fileId}
/
download
結果ファイルをダウンロードします
curl --request GET \
--url https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download \
--header 'Authorization: Bearer <token>'import requests
url = "https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vantage-us.abbyy.com/api/publicapi/v1/transactions/{transactionId}/files/{fileId}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"Fields": {
"Business Unit": {
"City": "Springfield",
"CountryCode": "US",
"Name": "Acme Corp"
},
"Currency": "USD",
"Invoice Date": "01/15/2024",
"Invoice Number": "INV-2024-0042",
"Line Items": [
{
"Description": "Widget, industrial grade",
"Quantity": "2",
"Total Price": "1,250.00",
"Unit Price": "625.00"
}
],
"Total": "1,250.00"
},
"Version": "3.0"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}For how to find result file identifiers and download extracted data, see Processing documents with a single API call.
承認
The access token received from the authorization server in the OAuth 2.0 flow.
パスパラメータ
トランザクション識別子。トランザクションが正常に作成されると、レスポンスで受け取ります。
ファイル識別子。トランザクションの詳細の documents - resultFiles にあります。
レスポンス
要求された結果ファイルの生のバイト列を返します。fileId はトランザクションステータスレスポンス(documents[].resultFiles[])から取得します。各エントリには type も含まれます。Document skill は、Json ファイル(完全な結果と field メタデータ。構造については JSON スキーマ リファレンス を参照)と FieldsJson ファイル(抽出値のみ)を生成します。その他の形式(XML など)は、Skill のエクスポート設定によって異なります。以下の例は、値のみ(FieldsJson)の簡略化した結果を示しています。
The response is of type file.
このページは役に立ちましたか?
