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

# Update collaboration result

> Submit corrections for a pending collaboration task and complete review.

Submit only when `task_state=2`. Use the collaboration task `id` as `file_task_id`. See [Human collaboration](/en/api-reference/collaboration) for ordinary fields, table structure, and verification after submission.


## OpenAPI

````yaml en/api-reference/adp-api.yaml POST /open/agentic_doc_processor/{tenant_name}/v1/collaboration/result/update
openapi: 3.1.0
info:
  title: ADP API
  version: 1.0.0
  description: >-
    Laiye ADP OpenAPI reference for document extraction, recognition, and
    conversion; extraction application management; webhooks; human
    collaboration; credit usage; workflow discovery, runs, exports, and file
    management.
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://adp-global.laiye.com
    description: ADP global production endpoint
security: []
tags:
  - name: Document extraction
    description: Extract structured fields from uploaded documents.
  - name: Document recognition
    description: Recognize text, layout blocks, and positions from uploaded documents.
  - name: Document conversion
    description: >-
      Convert PDFs, Office documents, OFD files, and images into page images or
      native spreadsheet structures.
  - name: Application management
    description: >-
      Create, update, delete, and query extraction applications and
      configurations.
  - name: Webhook
    description: List system events and manage event callbacks.
  - name: Account
    description: Query credit usage.
  - name: Workflow
    description: >-
      List business workflow templates, run workflow applications, and query run
      results.
  - name: Workflow files
    description: Upload and manage files used by workflow applications.
  - name: Human collaboration
    description: >-
      Configure review triggers, query collaboration tasks, and submit human
      corrections.
paths:
  /open/agentic_doc_processor/{tenant_name}/v1/collaboration/result/update:
    post:
      tags:
        - Human collaboration
      summary: Update collaboration result
      description: >-
        Confirm or correct existing fields only for a collaboration task in
        task_state=2. A successful call returns file_status=4. Query the task
        again to confirm its state and values, then read the final corrected
        values from output_result in the asynchronous extraction query response.


        Validate names, types, and values before submission: unknown fields may
        be ignored while completing the task, omitted values may clear old data,
        and shortening multi-value lists may retain trailing values. Use
        field_values for ordinary fields and table_values for tables. Tables are
        replaced in full; copy field_key/references and any other information to
        retain. A failed response may follow a saved change; read the task back
        before retrying.


        HTTP 200 does not guarantee business success; check code.


        See [Human collaboration](/en/api-reference/collaboration) for
        integration steps and current limitations.
      operationId: updateCollaborationResult
      parameters:
        - $ref: '#/components/parameters/TenantName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollaborationResultRequest'
            example:
              file_task_id: collaboration_task_id
              collaboration_result:
                - field_name: Invoice number
                  field_type: string
                  field_values:
                    - CORRECTED-002
                - field_name: Line items
                  field_type: table
                  table_values:
                    - - field_name: Item name
                        field_values:
                          - field_value: Corrected item
                            references: []
                        field_key: Item name
                      - field_name: Quantity
                        field_values:
                          - field_value: '3'
                            references: []
                        field_key: Quantity
      responses:
        '200':
          description: >-
            Business response. Check code and read business state back after
            writes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollaborationResultResponse'
              example:
                code: success
                message: ''
                tips: null
                data:
                  file_status: 4
        '401':
          description: Missing API key.
        '404':
          description: Invalid API key or inaccessible request.
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    TenantName:
      name: tenant_name
      in: path
      required: true
      description: 'Tenant name. Default: laiye.'
      schema:
        type: string
        default: laiye
  schemas:
    CollaborationResultRequest:
      type: object
      properties:
        file_task_id:
          type: string
          description: >-
            Collaboration task primary ID: data.metadata.collaboration_task_id
            from asynchronous extraction or data.id from task details. This is
            not task_number, the extraction task_id, or data_id.
        collaboration_result:
          type: array
          items:
            $ref: '#/components/schemas/CollaborationResultField'
          description: >-
            Existing fields to confirm or correct. Submit valid fields with
            explicit values only for a task in task_state=2. Submission
            completes the task.
      required:
        - file_task_id
        - collaboration_result
    CollaborationResultResponse:
      type: object
      properties:
        code:
          type: string
          description: >-
            Business result code. Success is success; failures may use
            server_error, http_server_error, or other strings. Always check this
            field, including for HTTP 200.
        message:
          type: string
        tips:
          type:
            - string
            - 'null'
        data:
          anyOf:
            - $ref: '#/components/schemas/CollaborationResultData'
            - type: 'null'
    CollaborationResultField:
      type: object
      properties:
        field_name:
          type: string
          description: >-
            Exact name of an existing extraction field. Unknown names may be
            ignored while still completing the task; validate names before
            submission.
        field_type:
          type: string
          description: >-
            Field type: string=text, date=date, table=table. Match the original
            field type.
        field_values:
          type: array
          items:
            type: string
          default: []
          description: >-
            Full value list for an ordinary field. Provide it explicitly;
            shortening the list may leave old trailing values, so read the
            complete result back. Omit this parameter for table fields.
        table_values:
          anyOf:
            - type: array
              items:
                type: array
                items:
                  $ref: '#/components/schemas/CollaborationTableCell'
            - type: 'null'
          description: >-
            Replaces the entire table: outer array=rows, each row=array of cell
            objects. Submit the complete target table, copying
            field_key/references and other information to retain. Do not also
            send field_values.
      required:
        - field_name
        - field_type
    CollaborationResultData:
      type: object
      properties:
        file_status:
          type: integer
          description: >-
            A successful submission returns 4=completed. See task_state in task
            details for the full collaboration status dictionary.
          example: 4
      required:
        - file_status
    HTTPValidationError:
      type: object
      description: FastAPI/Pydantic request validation error.
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorItem'
      required:
        - detail
    CollaborationTableCell:
      type: object
      properties:
        field_name:
          type: string
          description: Published table column name.
        field_key:
          type: string
          description: >-
            Original cell field key. Copy it from task details when it must be
            preserved.
        field_values:
          type: array
          items:
            type: object
            properties:
              field_value:
                type: string
                description: Corrected cell text.
              references:
                type: array
                items:
                  type: object
                  additionalProperties: true
                description: >-
                  Document locations from the original value. Copy them in full
                  from the query result to retain them.
            required:
              - field_value
            additionalProperties: true
          description: >-
            Cell values are an array of objects, unlike the string array used
            for ordinary fields.
        references:
          type: array
          items:
            type: object
            additionalProperties: true
          description: >-
            Original cell source locations. Copy them from task details to
            retain highlighting.
      required:
        - field_name
        - field_values
      additionalProperties: true
    ValidationErrorItem:
      type: object
      additionalProperties: true
      properties:
        type:
          type: string
          description: Validation error type.
        loc:
          type: array
          description: Location of the invalid field in the request.
          items:
            oneOf:
              - type: string
              - type: integer
        msg:
          type: string
          description: Human-readable validation error message.
        input:
          description: Input value that failed validation.
        ctx:
          type: object
          additionalProperties: true
          description: Additional context supplied by the validator.
        url:
          type: string
          format: uri
          description: Link to the Pydantic error documentation.
      required:
        - type
        - loc
        - msg
  responses:
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HTTPValidationError'
          example:
            detail:
              - type: greater_than
                loc:
                  - query
                  - limit
                msg: Input should be greater than 0
                input: 0
                ctx:
                  gt: 0
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Production API Key. You can find it under My API in the ADP platform.
        Make sure the API Key is active and belongs to the production
        environment.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.