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

# Get File Processing Result List



## OpenAPI

````yaml /docflow-global/en/rest-api/openapi.bundle.yaml get /api/app-api/sip/platform/v2/file/fetch
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/fetch:
    get:
      summary: Get File Processing Result List
      operationId: getFiles
      parameters:
        - name: page
          in: query
          description: Page number, default 1
          required: false
          schema:
            type: integer
            default: 1
        - name: page_size
          in: query
          description: Number of items per page, default 1000
          required: false
          schema:
            type: integer
            default: 1000
        - name: workspace_id
          in: query
          description: Workspace ID
          required: true
          schema:
            type: string
        - name: batch_number
          in: query
          description: Batch Number
          required: false
          schema:
            type: string
        - name: file_id
          in: query
          description: File ID
          required: false
          schema:
            type: string
        - name: category
          in: query
          description: File Category
          required: false
          schema:
            type: string
        - name: recognition_status
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/RecognitionStatus'
        - name: verification_status
          in: query
          description: >-
            File verification status 0: Pending verification 2: Confirmed 3:
            Rejected 4: Deleted 5: Deferred processing
          required: false
          schema:
            $ref: '#/components/schemas/VerificationStatus'
        - name: start_time
          in: query
          description: >-
            Start time for search by update time, RFC3339 format
            (YYYY-MM-DDTHH:MM:SSZ)
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-01-01T00:00:00.000Z'
        - name: end_time
          in: query
          description: >-
            End time for search by update time, RFC3339 format
            (YYYY-MM-DDTHH:MM:SSZ)
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-01-01T10:00:00.000Z'
        - name: with_document
          in: query
          description: >-
            Whether to return the complete text recognition result of the
            document
          required: false
          schema:
            type: boolean
            default: false
        - name: with_task_detail_url
          in: query
          description: Whether to return the task details page URL
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successfully retrieved file list
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - $ref: '#/components/schemas/TaskProcessResult'
components:
  schemas:
    RecognitionStatus:
      type: integer
      description: >
        File recognition status: 

        - 0: Pending recognition

        - 1: Recognition successful

        - 2: Recognition failed

        - 3: Classifying

        - 4: Extracting

        - 5: Preparing

        - 6: File splitting

        - 7: Image cropping

        - 10: Classification completed (only available when upload interface
        target_process is classify)

        - 20: Parsing
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 10
        - 20
    VerificationStatus:
      type: integer
      description: >-
        File verification status 0: Pending verification 2: Confirmed 3:
        Rejected 4: Deleted 5: Deferred processing
      enum:
        - 0
        - 2
        - 3
        - 4
        - 5
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: Status code
          example: 200
        msg:
          type: string
          description: Status description
      required:
        - code
        - msg
    TaskProcessResult:
      type: object
      properties:
        result:
          type: object
          properties:
            total:
              type: integer
              description: Total number of files
              example: 100
            page:
              type: integer
              description: Current page number
              example: 1
            page_size:
              type: integer
              description: Number of items per page
              example: 20
            files:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: File ID
                    example: 202412190001
                  task_id:
                    type: string
                    description: Task ID
                    example: 202412190001
                  task_detail_url:
                    type: string
                    description: Task Details Page URL
                  task_type:
                    $ref: '#/components/schemas/TaskType'
                  batch_number:
                    type: string
                    description: Batch Number
                    example: 202412190001
                  name:
                    type: string
                    description: File Name
                    example: invoice.pdf
                  format:
                    type: string
                    description: File Format
                  recognition_status:
                    $ref: '#/components/schemas/RecognitionStatus'
                  failure_causes:
                    type: string
                    description: |
                      Task failure reason.  
                      When recognition_status is 2, this field is present.
                  verification_status:
                    $ref: '#/components/schemas/VerificationStatus'
                  category:
                    type: string
                    description: File Category
                    example: invoice
                  pages:
                    $ref: '#/components/schemas/PagesInfo'
                  data:
                    type: object
                    description: Processing result
                    properties:
                      fields:
                        description: Field list
                        type: array
                        items:
                          $ref: '#/components/schemas/FieldRespKeyValue'
                        example:
                          - key: Invoice Code
                            identifier: Invoice Code Identifier
                            value: '3100231130'
                            position:
                              - page: 0
                                vertices:
                                  - 0
                                  - 0
                                  - 100
                                  - 0
                                  - 100
                                  - 100
                                  - 0
                                  - 100
                          - key: Invoice Number
                            identifier: Invoice Number Identifier
                            value: '28737000'
                            position:
                              - page: 0
                                vertices:
                                  - 0
                                  - 0
                                  - 100
                                  - 0
                                  - 100
                                  - 100
                                  - 0
                                  - 100
                      items:
                        description: Table data list
                        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
                      tables:
                        description: >-
                          Complete table data list (including system tables and
                          manually configured tables)
                        type: array
                        items:
                          type: object
                          properties:
                            tableName:
                              description: Table name
                              type: string
                              example: table1
                            tableType:
                              description: >
                                Table type, 0: system configured, 1: manually
                                added.
                              type: string
                              example: 0
                            extractModel:
                              description: Table-level extraction model
                              type: string
                            items:
                              type: array
                              items:
                                type: array
                                items:
                                  $ref: '#/components/schemas/CommonFieldDetailRespVO'
                      stamps:
                        description: Stamp information
                        type: array
                        items:
                          $ref: '#/components/schemas/StampValue'
                        example:
                          - angel: 0
                            page: 0
                            text: National Unified Invoice Supervision Seal
                            type: Other
                            color: Red
                            shape: Oval Seal
                            position:
                              - 0
                              - 0
                              - 100
                              - 0
                              - 100
                              - 100
                              - 0
                              - 100
                          - angel: 0
                            page: 0
                            text: Tax Bureau Seal
                            type: Other
                            color: Red
                            shape: Oval Seal
                            position:
                              - 0
                              - 0
                              - 100
                              - 0
                              - 100
                              - 100
                              - 0
                              - 100
                      handwritings:
                        description: Handwriting information
                        type: array
                        items:
                          $ref: '#/components/schemas/HandWritingValue'
                        example:
                          - angel: 0
                            page: 0
                            text: March 1st
                            position:
                              - page: 0
                                vertices:
                                  - 0
                                  - 0
                                  - 100
                                  - 0
                                  - 100
                                  - 100
                                  - 0
                                  - 100
                          - angel: 0
                            page: 0
                            text: Zhang San
                            position:
                              - page: 0
                                vertices:
                                  - 0
                                  - 0
                                  - 100
                                  - 0
                                  - 100
                                  - 100
                                  - 0
                                  - 100
                      invoiceVerifyResult:
                        description: Invoice verification result
                        type: object
                        properties:
                          invoiceVerifyStatus:
                            type: integer
                            description: >
                              Whether invoice verification is successful (0: No,
                              1: Yes, null: Not verified)
                            example: 0
                          invoiceVerifyErrorCode:
                            type: integer
                            description: Invoice verification error code
                            example: 0
                          invoiceVerifyCanRetry:
                            type: integer
                            description: >
                              Whether invoice verification can be
                              retried/initiated (0: No, 1: Yes)
                            example: 0
                          invoiceVerifyFailMsg:
                            type: string
                            description: Invoice verification failure reason
                            example: Exceeded daily limit
                  document:
                    $ref: '#/components/schemas/Document'
                  child_files:
                    description: Sub-task information
                    type: array
                    items:
                      $ref: '#/components/schemas/SubFileDetailInfo'
                  duration_ms:
                    type: integer
                    description: >
                      Task processing time, unit: milliseconds

                      Calculated from the start of the task to completion
                      (success or failure), excluding queue waiting time.
                    example: 10000
                  total_page_num:
                    type: integer
                    description: Total number of pages in the current file
                    example: 10
                required:
                  - id
                  - name
                  - format
                  - recognition_status
                  - verification_status
                  - category
    TaskType:
      type: integer
      description: >
        Task type

        - 0: **File split subtask**: When a file task with "File split" switch
        enabled executes successfully, the subtasks generated by file split
        operations in that file batch task are split subtasks, divided according
        to the actual number of file sets under the file category

        - 1: **Regular task**: File tasks without "File split" and "Multi-image
        crop" switches enabled

        - 2: **Parent task**: After file tasks with "File split" or "Multi-image
        crop" switches enabled execute, each file in that file batch task
        becomes a parent task

        - 3: **Crop subtask**: When a file task with "Multi-image crop" switch
        enabled executes successfully, the subtasks generated by multi-image
        crop operations in that file batch task are crop subtasks, divided
        according to the actual number of crop results under the file category
      example: 1
    PagesInfo:
      type: array
      description: >
        Data for rendering each page of the file.            Combined with the
        page and position fields in data.fields, you can accurately draw the
        position of fields on the page.
      items:
        type: object
        properties:
          page:
            type: integer
            description: Page number, starting from 0
            example: 1
          angle:
            type: integer
            description: Rotation angle
            enum:
              - 0
              - 90
              - 180
              - 270
          width:
            type: integer
            description: Page width after correction
            example: 1024
          height:
            type: integer
            description: Page height after correction
            example: 1024
          dpi:
            type: integer
            description: >-
              Resolution when converting PDF to image. For non-PDF files, this
              value is 0.
            example: 144
    FieldRespKeyValue:
      type: object
      properties:
        key:
          type: string
          description: Field name
        identifier:
          type: string
          description: Identifier(from export field name)
        value:
          type: string
          description: Field value
        position:
          $ref: '#/components/schemas/KeyValuePosition'
        confidence:
          type: number
          format: float
          description: Confidence score, range 0~1
          example: 0.95
        extract_model:
          type: string
          description: Actual extraction model used
    KeyValue:
      type: object
      properties:
        key:
          type: string
          description: Field name
        value:
          type: string
          description: Field value
        position:
          $ref: '#/components/schemas/KeyValuePosition'
    CommonFieldDetailRespVO:
      type: object
      properties:
        key:
          type: string
          description: Field key
        identifier:
          type: string
          description: Identifier(from export field name)
        value:
          type: string
          description: Field value
        textInLines:
          deprecated: true
          type: array
          description: |
            **Deprecated**, please use position field instead
            Field coordinates
          items:
            $ref: '#/components/schemas/TextInLines'
        position:
          $ref: '#/components/schemas/KeyValuePosition'
        index:
          type: integer
          description: Index
        confidence:
          type: number
          format: float
          description: Confidence score, range 0~1
          example: 0.95
    StampValue:
      type: object
      properties:
        angel:
          type: integer
          description: Angle
        page:
          type: integer
          description: Page number
        text:
          type: string
          description: Stamp text content
        type:
          type: string
          description: Stamp type
        color:
          type: string
          description: Stamp color
        shape:
          type: string
          description: Stamp shape
        position:
          type: array
          description: Position information
          items:
            type: integer
            example: 1
    HandWritingValue:
      type: object
      properties:
        angel:
          type: integer
          description: Angle
        page:
          type: integer
          description: Page number
        text:
          type: string
          description: Handwriting text content
        position:
          $ref: '#/components/schemas/KeyValuePosition'
    Document:
      type: object
      properties:
        pages:
          type: array
          items:
            type: object
            properties:
              angle:
                type: integer
                description: Page rotation angle
              width:
                type: integer
                description: Page width
              height:
                type: integer
                description: Page height
              lines:
                description: Page text line array
                type: array
                items:
                  type: object
                  properties:
                    text:
                      type: string
                      description: Line text
                    position:
                      type: array
                      items:
                        type: integer
                      minItems: 8
                      maxItems: 8
                    charPositions:
                      type: array
                      items:
                        type: array
                        items:
                          type: integer
                        minItems: 8
                        maxItems: 8
    SubFileDetailInfo:
      type: object
      properties:
        id:
          type: string
          description: File ID
          example: 202412190001
        task_id:
          type: string
          description: Task ID
          example: 202412190001
        task_detail_url:
          type: string
          description: File subtask details page URL
        task_type:
          $ref: '#/components/schemas/TaskType'
        parent_task_id:
          type: string
          description: Parent task ID (meaningful when not 0)
          example: 202412190001
        batch_number:
          type: string
          description: Batch Number
          example: 202412190001
        name:
          type: string
          description: File Name
          example: invoice.pdf
        format:
          type: string
          description: File Format
        recognition_status:
          $ref: '#/components/schemas/RecognitionStatus'
        verification_status:
          $ref: '#/components/schemas/VerificationStatus'
        category:
          type: string
          description: File Category
          example: invoice
        pages:
          $ref: '#/components/schemas/PagesInfo'
        data:
          type: object
          description: Processing result
          properties:
            fields:
              description: Field list
              type: array
              items:
                $ref: '#/components/schemas/FieldRespKeyValue'
              example:
                - key: Invoice Code
                  identifier: Invoice Code Identifier
                  value: '3100231130'
                  position:
                    - page: 0
                      vertices:
                        - 0
                        - 0
                        - 100
                        - 0
                        - 100
                        - 100
                        - 0
                        - 100
                - key: Invoice Number
                  identifier: Invoice Number Identifier
                  value: '28737000'
                  position:
                    - page: 0
                      vertices:
                        - 0
                        - 0
                        - 100
                        - 0
                        - 100
                        - 100
                        - 0
                        - 100
            items:
              description: Table data list
              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
            tables:
              description: >-
                Complete table data list (including system tables and manually
                configured tables)
              type: array
              items:
                type: object
                properties:
                  tableName:
                    description: Table name
                    type: string
                    example: table1
                  tableType:
                    description: |
                      Table type, 0: system configured, 1: manually added.
                    type: string
                    example: 0
                  extractModel:
                    description: Table-level extraction model
                    type: string
                  items:
                    type: array
                    items:
                      type: array
                      items:
                        $ref: '#/components/schemas/CommonFieldDetailRespVO'
            stamps:
              description: Stamp information
              type: array
              items:
                $ref: '#/components/schemas/StampValue'
              example:
                - angel: 0
                  page: 0
                  text: National Unified Invoice Supervision Seal
                  type: Other
                  color: Red
                  shape: Oval Seal
                  position:
                    - 0
                    - 0
                    - 100
                    - 0
                    - 100
                    - 100
                    - 0
                    - 100
                - angel: 0
                  page: 0
                  text: Tax Bureau Seal
                  type: Other
                  color: Red
                  shape: Oval Seal
                  position:
                    - 0
                    - 0
                    - 100
                    - 0
                    - 100
                    - 100
                    - 0
                    - 100
            handwritings:
              description: Handwriting information
              type: array
              items:
                $ref: '#/components/schemas/HandWritingValue'
              example:
                - angel: 0
                  page: 0
                  text: March 1st
                  position:
                    - page: 0
                      vertices:
                        - 0
                        - 0
                        - 100
                        - 0
                        - 100
                        - 100
                        - 0
                        - 100
                - angel: 0
                  page: 0
                  text: Zhang San
                  position:
                    - page: 0
                      vertices:
                        - 0
                        - 0
                        - 100
                        - 0
                        - 100
                        - 100
                        - 0
                        - 100
            invoiceVerifyResult:
              description: Invoice verification result
              type: object
              properties:
                invoiceVerifyStatus:
                  type: integer
                  description: >
                    Whether invoice verification is successful (0: No, 1: Yes,
                    null: Not verified)
                  example: 0
                invoiceVerifyErrorCode:
                  type: integer
                  description: Invoice verification error code
                  example: 0
                invoiceVerifyCanRetry:
                  type: integer
                  description: >
                    Whether invoice verification can be retried/initiated (0:
                    No, 1: Yes)
                  example: 0
                invoiceVerifyFailMsg:
                  type: string
                  description: Invoice verification failure reason
                  example: Exceeded daily limit
        document:
          $ref: '#/components/schemas/Document'
        from_parent_position_list:
          type: array
          description: Coordinate position of cropping result in the original file
          items:
            type: integer
            description: Position information
            example: 1
        crop_info:
          $ref: '#/components/schemas/TaskCropResult'
    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
    TextInLines:
      type: object
      properties:
        angle:
          type: string
          description: Angle
          example: 0
        pos:
          type: array
          description: Coordinates
          items:
            type: integer
            description: Coordinates
            example: 1
        page:
          type: integer
          description: Page number
          example: 1
        text:
          type: string
          description: Text
          example: Text content
        char_pos:
          type: array
          description: Character coordinates
          items:
            type: array
            description: Character coordinates
            items:
              type: integer
              description: Character coordinates
              example: 1
      description: Field coordinates
    TaskCropResult:
      type: object
      properties:
        page:
          type: integer
          description: >-
            Page index of the original file, 0 represents the first page of the
            source file
        imageAngle:
          type: string
          description: Angle information of the cropped image
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````