メインコンテンツへスキップ
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>"
        }
      }
    ]
  }
}

承認

x-ti-app-id
string
header
必須
x-ti-secret-code
string
header
必須

クエリパラメータ

workspace_id
string
必須

ワークスペース ID

:

1234567890

category
string

ファイルカテゴリ

:

"invoice"

batch_number
string

バッチ番号。同じバッチ番号で複数回アップロードできます。後からそのバッチ番号を使って、同一バッチ内の複数ファイルの処理結果を取得できます。値が空の場合、システムが最大 20 文字の文字列を自動生成します。

:

202412190001

auto_verify_vat
boolean
デフォルト:false

VAT インボイスを自動検証するかどうか

split_flag
boolean
デフォルト:false

ファイル分割を実行するかどうか

crop_flag
boolean
デフォルト:false

複数画像クロップを実行するかどうか

target_process
enum<string>

対象処理タイプ。指定可能な値: - classify: 分類 - extract: 抽出

利用可能なオプション:
classify,
extract
:

"classify"

parser_remove_watermark
integer
デフォルト:0

透かし除去(0: いいえ、1: はい)

parser_crop_dewarp
integer
デフォルト:0

クロップと歪み補正(0: いいえ、1: はい)

parser_apply_merge
integer
デフォルト:1

ページをまたぐ段落とテーブルを結合(0: いいえ、1: はい)

parser_formula_level
integer
デフォルト:0

数式認識レベル(0: 表示数式とインライン数式を認識、1: 表示数式のみ認識、2: 数式を認識しない)

parser_table_text_split_mode
integer
デフォルト:0

テーブル罫線と交差するテキストブロックを分割(0: いいえ、1: はい)

parser_dpi
enum<integer>
デフォルト:144

ファイル解像度(144: デフォルト、216: 高精度)

利用可能なオプション:
144,
216
parser_parse_mode
enum<string>

解析モード

  • auto: 自動(デフォルト)
  • scan: スキャン文書モード
  • vlm: VLM モード
利用可能なオプション:
auto,
scan,
vlm
parser_pdf_pwd
string

暗号化 PDF ファイルを復号するための PDF パスワード

with_task_detail_url
boolean
デフォルト:false

タスク詳細ページ URL を返すかどうか

ボディ

ファイルアップロードのリクエストボディ

file
file

レスポンス

200 - application/json

ファイルのアップロードと処理に成功

code
integer
必須

ステータスコード

:

200

msg
string
必須

ステータス説明

result
object