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

# Amend File Category

> - For regular tasks, modify the file category of the regular task
- For document splitting tasks, modify the file type and page numbers of the split files
- For multi-image cropping tasks, modify the file type of the cropped files




## OpenAPI

````yaml /docflow/en/rest-api/openapi.bundle.yaml post /api/app-api/sip/platform/v2/file/amend_category
openapi: 3.0.0
info:
  title: DocFlow API
  description: >-
    DocFlow REST API, providing file upload and file processing result retrieval
    capabilities
  version: 2.8.4
servers:
  - url: https://docflow.textin.com
security:
  - ApiId: []
    SecretCode: []
paths:
  /api/app-api/sip/platform/v2/file/amend_category:
    post:
      summary: Amend File Category
      description: >
        - For regular tasks, modify the file category of the regular task

        - For document splitting tasks, modify the file type and page numbers of
        the split files

        - For multi-image cropping tasks, modify the file type of the cropped
        files
      operationId: amendCategory
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace_id:
                  type: string
                  description: Workspace ID
                  example: 1234567890
                task_id:
                  type: string
                  description: Task ID
                  example: 1234567890
                category:
                  type: string
                  description: |
                    New file category.
                    Only supported when the task type is a regular task.
                  example: Electronic Invoice (Ordinary Invoice)
                split_tasks:
                  description: Document splitting task list
                  type: array
                  items:
                    type: object
                    properties:
                      category:
                        type: string
                        description: Subtask file category
                        example: Electronic Invoice (Ordinary Invoice)
                      pages:
                        type: array
                        items:
                          type: integer
                          description: Subfile page numbers, starting from 0
                        example:
                          - 0
                          - 1
                crop_tasks:
                  description: Multi-image cropping task list
                  type: array
                  items:
                    type: object
                    properties:
                      crop_child_task_id:
                        type: string
                        description: Multi-image cropping subtask ID
                        example: 1234567890
                      category:
                        type: string
                        description: Subtask file category
                        example: Electronic Invoice (Ordinary Invoice)
              required:
                - workspace_id
                - task_id
      responses:
        '200':
          description: Successfully updated file category
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
components:
  schemas:
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: Status code
          example: 200
        msg:
          type: string
          description: Status description
      required:
        - code
        - msg
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````