> ## Documentation Index
> Fetch the complete documentation index at: https://docs-docflow.textin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ファイル処理結果を更新

> ファイル処理結果を更新します。通常は手動確認や校正後に、修正済みのキー値ペアをアップロードして自動認識結果を上書きするために使用します。



## OpenAPI

````yaml /docflow-global/ja/rest-api/openapi.bundle.yaml post /api/app-api/sip/platform/v2/file/update
openapi: 3.0.0
info:
  title: DocFlow API
  description: DocFlow REST API。ファイルアップロードとファイル処理結果の取得機能を提供します。
  version: 2.8.4
  contact:
    name: TextIn
    url: https://www.textin.ai/contact?type=27&sub_type=1
servers:
  - url: https://docflow.textin.ai
security:
  - ApiId: []
    SecretCode: []
tags:
  - name: ワークスペース管理
    description: ワークスペース関連 API
  - name: ファイルカテゴリ
    description: ファイルカテゴリ関連 API
  - name: ファイルカテゴリサンプル
    description: ファイルカテゴリサンプル関連 API
  - name: スマートレビュー
    description: スマートレビュー関連 API
  - name: 廃止済み
    description: 廃止済み API
paths:
  /api/app-api/sip/platform/v2/file/update:
    post:
      summary: ファイル処理結果を更新
      description: ファイル処理結果を更新します。通常は手動確認や校正後に、修正済みのキー値ペアをアップロードして自動認識結果を上書きするために使用します。
      operationId: updateFile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  workspace_id:
                    type: string
                    description: ワークスペース ID
                    example: 1234567890
                  file_id:
                    type: string
                    description: ファイル ID
                    example: 202412190001
                  data:
                    description: |
                      フィールド全体を更新します。
                      注意: 一部のフィールドのみを更新する場合でも、すべてのフィールドを含める必要があります。
                      入力フィールドが元のフィールドより多い場合、追加分のフィールドが追加されます。
                      入力フィールドが元のフィールドより少ない場合、不足しているフィールドは削除されます。
                      入力フィールド値が元のフィールド値と異なる場合、フィールド値が更新されます。
                      入力フィールドが元のフィールドと同一の場合、フィールドは保持されます。
                    type: object
                    properties:
                      fields:
                        type: array
                        items:
                          $ref: '#/components/schemas/KeyValue'
                        example:
                          - key: インボイスコード
                            value: '3100231130'
                            position:
                              - page: 0
                                vertices:
                                  - 0
                                  - 0
                                  - 100
                                  - 0
                                  - 100
                                  - 100
                                  - 0
                                  - 100
                          - key: インボイス番号
                            value: '28737000'
                            position:
                              - page: 0
                                vertices:
                                  - 0
                                  - 0
                                  - 100
                                  - 0
                                  - 100
                                  - 100
                                  - 0
                                  - 100
                      items:
                        type: array
                        items:
                          type: array
                          items:
                            $ref: '#/components/schemas/KeyValue'
                        example:
                          - - 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
                required:
                  - workspace_id
                  - file_id
                  - data
      responses:
        '200':
          description: ファイル処理結果の更新に成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - type: object
                    properties:
                      result:
                        type: object
                        properties:
                          files:
                            description: 更新後のファイルリスト
                            type: array
                            items:
                              type: object
                              properties:
                                workspace_id:
                                  type: string
                                  description: ワークスペース ID
                                  example: 1234567890
                                id:
                                  type: string
                                  description: ファイル ID
                                  example: 202412190001
components:
  schemas:
    KeyValue:
      type: object
      properties:
        key:
          type: string
          description: フィールド名
        value:
          type: string
          description: フィールド値
        position:
          $ref: '#/components/schemas/KeyValuePosition'
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: ステータスコード
          example: 200
        msg:
          type: string
          description: ステータス説明
      required:
        - code
        - msg
    KeyValuePosition:
      description: フィールド値の位置。フィールド値はページや行をまたぐ場合があるため、配列として表示されます。
      type: array
      items:
        type: object
        properties:
          page:
            type: integer
            description: フィールドが存在するページ。pages 配列のインデックスです
          vertices:
            type: array
            description: >-
              フィールド値の外接四角形座標。画像の左上を原点とし、配列値は [左上 x, 左上 y, 右上 x, 右上 y, 右下 x, 右下
              y, 左下 x, 左下 y] です
            items:
              type: integer
            minItems: 8
            maxItems: 8
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````