> ## 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.

# Update File Processing Result

> Update file processing result. Usually used after manual review and proofreading to upload modified key-value pairs, overriding automatically recognized results.



## OpenAPI

````yaml /docflow-global/en/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, providing file upload and file processing result retrieval
    capabilities
  version: 2.4.2
servers:
  - url: https://docflow.textin.ai
security:
  - ApiId: []
    SecretCode: []
paths:
  /api/app-api/sip/platform/v2/file/update:
    post:
      summary: Update File Processing Result
      description: >-
        Update file processing result. Usually used after manual review and
        proofreading to upload modified key-value pairs, overriding
        automatically recognized results.
      operationId: updateFile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  workspace_id:
                    type: string
                    description: Workspace ID
                    example: 1234567890
                  file_id:
                    type: string
                    description: File ID
                    example: 202412190001
                  data:
                    description: >
                      Full field update.

                      Note: Even if only updating partial fields, all fields
                      must be included.

                      If the incoming fields are more than the original fields,
                      the additional fields will be added.

                      If the incoming fields are fewer than the original fields,
                      the missing fields will be deleted.

                      If the incoming field values differ from the original
                      field values, the field values will be updated.

                      If the incoming fields are identical to the original
                      fields, the fields will be preserved.
                    type: object
                    properties:
                      fields:
                        type: array
                        items:
                          $ref: '#/components/schemas/KeyValue'
                        example:
                          - key: Invoice Code
                            value: '3100231130'
                            position:
                              - page: 0
                                vertices:
                                  - 0
                                  - 0
                                  - 100
                                  - 0
                                  - 100
                                  - 100
                                  - 0
                                  - 100
                          - key: Invoice Number
                            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: Goods and Services Name
                              value: ＊Electronic Computer＊Microcomputer Host
                              position:
                                - page: 0
                                  vertices:
                                    - 0
                                    - 0
                                    - 100
                                    - 0
                                    - 100
                                    - 100
                                    - 0
                                    - 100
                            - key: Specification Model
                              value: DMS-SC68
                              position:
                                - page: 0
                                  vertices:
                                    - 0
                                    - 0
                                    - 100
                                    - 0
                                    - 100
                                    - 100
                                    - 0
                                    - 100
                          - - key: Goods and Services Name
                              value: ＊Mechanical Computer＊Supercomputer Host
                              position:
                                - page: 0
                                  vertices:
                                    - 0
                                    - 0
                                    - 100
                                    - 0
                                    - 100
                                    - 100
                                    - 0
                                    - 100
                            - key: Specification Model
                              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: Successfully updated file processing result
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - type: object
                    properties:
                      result:
                        type: object
                        properties:
                          files:
                            description: Updated file list
                            type: array
                            items:
                              type: object
                              properties:
                                workspace_id:
                                  type: string
                                  description: Workspace ID
                                  example: 1234567890
                                id:
                                  type: string
                                  description: File ID
                                  example: 202412190001
components:
  schemas:
    KeyValue:
      type: object
      properties:
        key:
          type: string
          description: Field name
        value:
          type: string
          description: Field value
        position:
          $ref: '#/components/schemas/KeyValuePosition'
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: Status code
          example: 200
        msg:
          type: string
          description: Status description
      required:
        - code
        - msg
    KeyValuePosition:
      description: >-
        Position of the field value. Field values may span pages or rows, so
        they are displayed as arrays.
      type: array
      items:
        type: object
        properties:
          page:
            type: integer
            description: >-
              Page where the field is located. It is the index of the pages
              array
          vertices:
            type: array
            description: >-
              Bounding quadrilateral coordinates of the field value. The image
              uses the top-left as origin, array values are [top-left x,
              top-left y, top-right x, top-right y, bottom-right x, bottom-right
              y, bottom-left x, bottom-left 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

````