ファイルを同期アップロード
curl --request POST \
--url https://docflow.textin.com/api/app-api/sip/platform/v2/file/upload/sync \
--header 'Content-Type: multipart/form-data' \
--header 'x-ti-app-id: <api-key>' \
--header 'x-ti-secret-code: <api-key>' \
--form file='@example-file'{
"code": 200,
"msg": "<string>",
"result": {
"total": 100,
"page": 1,
"page_size": 20,
"files": [
{
"id": 202412190001,
"name": "invoice.pdf",
"format": "<string>",
"category": "invoice",
"task_id": 202412190001,
"task_detail_url": "<string>",
"task_type": 1,
"batch_number": 202412190001,
"failure_causes": "<string>",
"pages": [
{
"page": 1,
"width": 1024,
"height": 1024,
"dpi": 144
}
],
"data": {
"fields": [
{
"key": "インボイスコード",
"identifier": "インボイスコード識別子",
"value": "3100231130",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "インボイス番号",
"identifier": "インボイス番号識別子",
"value": "28737000",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"items": [
[
{
"key": "商品・サービス名",
"value": "*Electronic Computer*Microcomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "仕様モデル",
"value": "DMS-SC68",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
[
{
"key": "商品・サービス名",
"value": "*Mechanical Computer*Supercomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "仕様モデル",
"value": "AN/FSQ-7",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
]
],
"tables": [
{
"tableName": "table1",
"tableType": 0,
"extractModel": "<string>",
"items": [
[
{
"key": "<string>",
"identifier": "<string>",
"value": "<string>",
"textInLines": [
{
"angle": 0,
"pos": [
1
],
"page": 1,
"text": "テキスト内容",
"char_pos": [
[
1
]
]
}
],
"position": [
{
"page": 123,
"vertices": [
123
]
}
],
"index": 123,
"confidence": 0.95
}
]
]
}
],
"stamps": [
{
"angel": 0,
"page": 0,
"text": "全国統一インボイス監督印",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
},
{
"angel": 0,
"page": 0,
"text": "税務局印",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
],
"handwritings": [
{
"angel": 0,
"page": 0,
"text": "3月1日",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"angel": 0,
"page": 0,
"text": "山田太郎",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"invoiceVerifyResult": {
"invoiceVerifyStatus": 0,
"invoiceVerifyErrorCode": 0,
"invoiceVerifyCanRetry": 0,
"invoiceVerifyFailMsg": "1日の上限を超過しました"
}
},
"document": {
"pages": [
{
"angle": 123,
"width": 123,
"height": 123,
"lines": [
{
"text": "<string>",
"position": [
123
],
"charPositions": [
[
123
]
]
}
]
}
]
},
"child_files": [
{
"id": 202412190001,
"task_id": 202412190001,
"task_detail_url": "<string>",
"task_type": 1,
"parent_task_id": 202412190001,
"batch_number": 202412190001,
"name": "invoice.pdf",
"format": "<string>",
"category": "invoice",
"pages": [
{
"page": 1,
"width": 1024,
"height": 1024,
"dpi": 144
}
],
"data": {
"fields": [
{
"key": "インボイスコード",
"identifier": "インボイスコード識別子",
"value": "3100231130",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "インボイス番号",
"identifier": "インボイス番号識別子",
"value": "28737000",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"items": [
[
{
"key": "商品・サービス名",
"value": "*Electronic Computer*Microcomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "仕様モデル",
"value": "DMS-SC68",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
[
{
"key": "商品・サービス名",
"value": "*Mechanical Computer*Supercomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "仕様モデル",
"value": "AN/FSQ-7",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
]
],
"tables": [
{
"tableName": "table1",
"tableType": 0,
"extractModel": "<string>",
"items": [
[
{
"key": "<string>",
"identifier": "<string>",
"value": "<string>",
"textInLines": [
{
"angle": 0,
"pos": [
1
],
"page": 1,
"text": "テキスト内容",
"char_pos": [
[
1
]
]
}
],
"position": [
{
"page": 123,
"vertices": [
123
]
}
],
"index": 123,
"confidence": 0.95
}
]
]
}
],
"stamps": [
{
"angel": 0,
"page": 0,
"text": "全国統一インボイス監督印",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
},
{
"angel": 0,
"page": 0,
"text": "税務局印",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
],
"handwritings": [
{
"angel": 0,
"page": 0,
"text": "3月1日",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"angel": 0,
"page": 0,
"text": "山田太郎",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"invoiceVerifyResult": {
"invoiceVerifyStatus": 0,
"invoiceVerifyErrorCode": 0,
"invoiceVerifyCanRetry": 0,
"invoiceVerifyFailMsg": "1日の上限を超過しました"
}
},
"document": {
"pages": [
{
"angle": 123,
"width": 123,
"height": 123,
"lines": [
{
"text": "<string>",
"position": [
123
],
"charPositions": [
[
123
]
]
}
]
}
]
},
"from_parent_position_list": [
1
],
"crop_info": {
"page": 123,
"image角度": "<string>"
}
}
],
"duration_ms": 10000,
"total_page_num": 10,
"parser_params": {
"formula_level": 0,
"apply_merge": 1,
"table_text_split_mode": 0,
"crop_dewarp": 0,
"remove_watermark": 0,
"dpi": 144,
"parse_mode": "auto",
"pdf_pwd": "<string>"
}
}
]
}
}API Reference
ファイルを同期アップロード
ファイルをアップロードし、処理完了を待ってから処理結果を直接返します
POST
/
api
/
app-api
/
sip
/
platform
/
v2
/
file
/
upload
/
sync
ファイルを同期アップロード
curl --request POST \
--url https://docflow.textin.com/api/app-api/sip/platform/v2/file/upload/sync \
--header 'Content-Type: multipart/form-data' \
--header 'x-ti-app-id: <api-key>' \
--header 'x-ti-secret-code: <api-key>' \
--form file='@example-file'{
"code": 200,
"msg": "<string>",
"result": {
"total": 100,
"page": 1,
"page_size": 20,
"files": [
{
"id": 202412190001,
"name": "invoice.pdf",
"format": "<string>",
"category": "invoice",
"task_id": 202412190001,
"task_detail_url": "<string>",
"task_type": 1,
"batch_number": 202412190001,
"failure_causes": "<string>",
"pages": [
{
"page": 1,
"width": 1024,
"height": 1024,
"dpi": 144
}
],
"data": {
"fields": [
{
"key": "インボイスコード",
"identifier": "インボイスコード識別子",
"value": "3100231130",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "インボイス番号",
"identifier": "インボイス番号識別子",
"value": "28737000",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"items": [
[
{
"key": "商品・サービス名",
"value": "*Electronic Computer*Microcomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "仕様モデル",
"value": "DMS-SC68",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
[
{
"key": "商品・サービス名",
"value": "*Mechanical Computer*Supercomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "仕様モデル",
"value": "AN/FSQ-7",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
]
],
"tables": [
{
"tableName": "table1",
"tableType": 0,
"extractModel": "<string>",
"items": [
[
{
"key": "<string>",
"identifier": "<string>",
"value": "<string>",
"textInLines": [
{
"angle": 0,
"pos": [
1
],
"page": 1,
"text": "テキスト内容",
"char_pos": [
[
1
]
]
}
],
"position": [
{
"page": 123,
"vertices": [
123
]
}
],
"index": 123,
"confidence": 0.95
}
]
]
}
],
"stamps": [
{
"angel": 0,
"page": 0,
"text": "全国統一インボイス監督印",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
},
{
"angel": 0,
"page": 0,
"text": "税務局印",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
],
"handwritings": [
{
"angel": 0,
"page": 0,
"text": "3月1日",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"angel": 0,
"page": 0,
"text": "山田太郎",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"invoiceVerifyResult": {
"invoiceVerifyStatus": 0,
"invoiceVerifyErrorCode": 0,
"invoiceVerifyCanRetry": 0,
"invoiceVerifyFailMsg": "1日の上限を超過しました"
}
},
"document": {
"pages": [
{
"angle": 123,
"width": 123,
"height": 123,
"lines": [
{
"text": "<string>",
"position": [
123
],
"charPositions": [
[
123
]
]
}
]
}
]
},
"child_files": [
{
"id": 202412190001,
"task_id": 202412190001,
"task_detail_url": "<string>",
"task_type": 1,
"parent_task_id": 202412190001,
"batch_number": 202412190001,
"name": "invoice.pdf",
"format": "<string>",
"category": "invoice",
"pages": [
{
"page": 1,
"width": 1024,
"height": 1024,
"dpi": 144
}
],
"data": {
"fields": [
{
"key": "インボイスコード",
"identifier": "インボイスコード識別子",
"value": "3100231130",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "インボイス番号",
"identifier": "インボイス番号識別子",
"value": "28737000",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"items": [
[
{
"key": "商品・サービス名",
"value": "*Electronic Computer*Microcomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "仕様モデル",
"value": "DMS-SC68",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
[
{
"key": "商品・サービス名",
"value": "*Mechanical Computer*Supercomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "仕様モデル",
"value": "AN/FSQ-7",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
]
],
"tables": [
{
"tableName": "table1",
"tableType": 0,
"extractModel": "<string>",
"items": [
[
{
"key": "<string>",
"identifier": "<string>",
"value": "<string>",
"textInLines": [
{
"angle": 0,
"pos": [
1
],
"page": 1,
"text": "テキスト内容",
"char_pos": [
[
1
]
]
}
],
"position": [
{
"page": 123,
"vertices": [
123
]
}
],
"index": 123,
"confidence": 0.95
}
]
]
}
],
"stamps": [
{
"angel": 0,
"page": 0,
"text": "全国統一インボイス監督印",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
},
{
"angel": 0,
"page": 0,
"text": "税務局印",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
],
"handwritings": [
{
"angel": 0,
"page": 0,
"text": "3月1日",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"angel": 0,
"page": 0,
"text": "山田太郎",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"invoiceVerifyResult": {
"invoiceVerifyStatus": 0,
"invoiceVerifyErrorCode": 0,
"invoiceVerifyCanRetry": 0,
"invoiceVerifyFailMsg": "1日の上限を超過しました"
}
},
"document": {
"pages": [
{
"angle": 123,
"width": 123,
"height": 123,
"lines": [
{
"text": "<string>",
"position": [
123
],
"charPositions": [
[
123
]
]
}
]
}
]
},
"from_parent_position_list": [
1
],
"crop_info": {
"page": 123,
"image角度": "<string>"
}
}
],
"duration_ms": 10000,
"total_page_num": 10,
"parser_params": {
"formula_level": 0,
"apply_merge": 1,
"table_text_split_mode": 0,
"crop_dewarp": 0,
"remove_watermark": 0,
"dpi": 144,
"parse_mode": "auto",
"pdf_pwd": "<string>"
}
}
]
}
}クエリパラメータ
ワークスペース ID
例:
1234567890
ファイルカテゴリ
例:
"invoice"
バッチ番号。同じバッチ番号で複数回アップロードできます。後からそのバッチ番号を使って、同一バッチ内の複数ファイルの処理結果を取得できます。値が空の場合、システムが最大 20 文字の文字列を自動生成します。
例:
202412190001
VAT インボイスを自動検証するかどうか
ファイル分割を実行するかどうか
複数画像クロップを実行するかどうか
対象処理タイプ。指定可能な値: - classify: 分類 - extract: 抽出
利用可能なオプション:
classify, extract 例:
"classify"
透かし除去(0: いいえ、1: はい)
クロップと歪み補正(0: いいえ、1: はい)
ページをまたぐ段落とテーブルを結合(0: いいえ、1: はい)
数式認識レベル(0: 表示数式とインライン数式を認識、1: 表示数式のみ認識、2: 数式を認識しない)
テーブル罫線と交差するテキストブロックを分割(0: いいえ、1: はい)
ファイル解像度(144: デフォルト、216: 高精度)
利用可能なオプション:
144, 216 解析モード
auto: 自動(デフォルト)scan: スキャン文書モードvlm: VLM モード
利用可能なオプション:
auto, scan, vlm 暗号化 PDF ファイルを復号するための PDF パスワード
タスク詳細ページ URL を返すかどうか
ボディ
multipart/form-dataapplication/json
ファイルアップロードのリクエストボディ
⌘I

