> ## 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 extraction application

> Update the name, labels, fields, and extraction configuration of an extraction application, and create a new configuration version. To update a high-speed custom extraction application, reuse this endpoint and pass the app_id of the high-speed application. The request body does not need ai_function. High-speed custom extraction applications do not support setting parse_mode, enable_highlight, enable_pdf_parse, pdf_pic_second_parsing, enable_stamp_recognition, or enable_long_doc.



## OpenAPI

````yaml /en/api-reference/adp-api.yaml post /open/agentic_doc_processor/{tenant_name}/v1/app-manage/update
openapi: 3.1.0
info:
  title: ADP API
  version: 1.0.0
  description: >-
    Laiye ADP OpenAPI reference for document extraction, document recognition,
    application management, credit usage, workflow runs, and workflow 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: Application management
    description: >-
      Create, update, delete, and query extraction applications and
      configurations.
  - name: Account
    description: Query credit usage.
  - name: Workflow
    description: Run workflow applications and query run results.
  - name: Workflow files
    description: Upload and manage files used by workflow applications.
paths:
  /open/agentic_doc_processor/{tenant_name}/v1/app-manage/update:
    post:
      tags:
        - Application management
      summary: Update extraction application
      description: >-
        Update the name, labels, fields, and extraction configuration of an
        extraction application, and create a new configuration version. To
        update a high-speed custom extraction application, reuse this endpoint
        and pass the app_id of the high-speed application. The request body does
        not need ai_function. High-speed custom extraction applications do not
        support setting parse_mode, enable_highlight, enable_pdf_parse,
        pdf_pic_second_parsing, enable_stamp_recognition, or enable_long_doc.
      operationId: updateExtractionApp
      parameters:
        - $ref: '#/components/parameters/TenantName'
      requestBody:
        $ref: '#/components/requestBodies/ExtractionAppUpdateRequest'
      responses:
        '200':
          $ref: '#/components/responses/ExtractionAppUpdateResponse'
        '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
  requestBodies:
    ExtractionAppUpdateRequest:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ExtractionAppUpdateRequest'
          examples:
            standardCustomExtractionApp:
              summary: Update standard custom extraction application
              value:
                app_id: app_1406
                app_name: Purchase order extraction app (new version)
                config_version: v1
                app_label:
                  - purchase-order
                extract_fields:
                  - field_name: Order number
                    field_type: string
                    field_prompt: Extract the purchase order number.
                  - field_name: Supplier name
                    field_type: string
                    field_prompt: Extract the supplier name.
                parse_mode: fast_vlm
                enable_highlight: 1
                enable_pdf_parse: true
                pdf_pic_second_parsing: false
                enable_stamp_recognition: true
                enable_long_doc: false
            highSpeedCustomExtractionApp:
              summary: Update high-speed custom extraction application
              value:
                app_id: app_1425
                app_name: High-speed invoice extraction app (new version)
                config_version: v1
                app_label:
                  - invoice
                  - high-speed
                extract_fields:
                  - field_key: invoice_no
                    field_name: Invoice number
                    field_type: string
                    field_prompt: Extract the unique invoice number from the invoice.
                  - field_key: invoice_date
                    field_name: Invoice date
                    field_type: date
                    field_prompt: Extract the invoice issue date.
                  - field_key: total_amount
                    field_name: Total amount
                    field_type: string
                    field_prompt: Extract the total amount including tax.
                  - field_key: line_items
                    field_name: Line items
                    field_type: table
                    sub_fields:
                      - field_key: item_name
                        field_name: Item name
                        field_type: string
                      - field_key: item_amount
                        field_name: Amount
                        field_type: string
                enable_field_value_translation: false
  responses:
    ExtractionAppUpdateResponse:
      description: Extraction application update result.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ExtractionAppUpdateResponse'
          example:
            code: success
            message: ''
            tips: null
            data:
              app_id: app_1425
              config_version: v2
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SimpleResponse'
  schemas:
    ExtractionAppUpdateRequest:
      oneOf:
        - $ref: '#/components/schemas/StandardExtractionAppUpdateRequest'
        - $ref: '#/components/schemas/HighSpeedExtractionAppUpdateRequest'
    ExtractionAppUpdateResponse:
      allOf:
        - $ref: '#/components/schemas/SimpleResponse'
        - type: object
          properties:
            data:
              type: object
              properties:
                app_id:
                  type: string
                  description: Application ID.
                config_version:
                  type: string
                  description: New configuration version.
    SimpleResponse:
      type: object
      properties:
        code:
          oneOf:
            - type: string
            - type: integer
          description: Business code. A successful response is usually success or 200.
        message:
          type: string
          description: Response message.
        tips:
          type:
            - string
            - 'null'
          description: Details. Defaults to null.
    StandardExtractionAppUpdateRequest:
      type: object
      additionalProperties: false
      title: Update standard custom extraction application
      properties:
        app_id:
          type: string
          description: Application ID.
        app_name:
          type: string
          description: >-
            Application name. If omitted or passed as an empty string, the name
            is not updated.
        config_version:
          type: string
          description: Current configuration version. The update is saved as a new version.
        app_label:
          type: array
          maxItems: 5
          description: Application labels. Up to 5 labels.
          items:
            type: string
        extract_fields:
          type: array
          maxItems: 20
          description: Extraction field configuration list. Up to 20 fields.
          items:
            $ref: '#/components/schemas/ExtractionFieldConfig'
        parse_mode:
          type: string
          enum:
            - standard
            - advance
            - fast_vlm
            - agentic
          description: >
            Parsing mode. Required for standard custom extraction applications.
            High-speed custom extraction applications do not support setting
            this parameter. Mode capabilities match the Web parsing
            configuration:


            - standard: Standard parsing for clear digital documents. Supports
            source locations, PDF text first, and stamp recognition.

            - advance: Enhanced parsing 1.0 for documents with stamps,
            signatures, multiple tables, or moderately complex layouts. Source
            locations are not supported.

            - fast_vlm: Enhanced parsing 2.0 for complex layouts, scanned files,
            and multi-table documents. Supports source locations, PDF text
            first, and stamp recognition.

            - agentic: Smart parsing that combines multiple models for complex
            documents. Supports source locations, PDF text first, and stamp
            recognition.
        enable_highlight:
          type: integer
          enum:
            - 0
            - 1
          default: 1
          description: >-
            Whether to include source locations. Pass 1 to enable or 0 to
            disable. Supported by standard, fast_vlm, and agentic. Not supported
            by advance.
        enable_pdf_parse:
          type: boolean
          default: false
          description: >-
            Whether to prefer PDF text extraction. Use this for digital PDFs
            with selectable text to improve processing speed and text stability.
        pdf_pic_second_parsing:
          type: boolean
          default: false
          description: >-
            When PDF text extraction is enabled, whether to run secondary
            parsing on images inside the PDF.
        enable_stamp_recognition:
          type: boolean
          default: false
          description: >-
            Whether to enable stamp recognition. The service attempts to
            recognize stamp information in the document. Stamp recognition
            capability must be enabled.
        enable_field_value_translation:
          type: boolean
          default: false
          description: Whether to enable extracted value translation. Disabled by default.
        enable_long_doc:
          type: boolean
          default: false
          description: >-
            Whether to enable long document support. Standard custom extraction
            applications support this parameter. High-speed custom extraction
            applications do not support setting this parameter.
        long_doc_config:
          type: array
          maxItems: 5
          description: Long document configuration. Used only when enable_long_doc is true.
          items:
            $ref: '#/components/schemas/LongDocConfig'
      required:
        - app_id
        - config_version
        - extract_fields
        - parse_mode
    HighSpeedExtractionAppUpdateRequest:
      type: object
      additionalProperties: false
      title: Update high-speed extraction application
      properties:
        app_id:
          type: string
          description: High-speed custom extraction application ID.
        app_name:
          type: string
          description: >-
            Application name. If omitted or passed as an empty string, the name
            is not updated.
        config_version:
          type: string
          description: Current configuration version. The update is saved as a new version.
        app_label:
          type: array
          maxItems: 5
          description: Application labels. Up to 5 labels.
          items:
            type: string
        extract_fields:
          type: array
          minItems: 1
          maxItems: 20
          description: >-
            High-speed extraction field configuration list. Up to 20 fields.
            Every field must provide field_key.
          items:
            $ref: '#/components/schemas/HighSpeedExtractionFieldConfig'
        enable_field_value_translation:
          type: boolean
          default: false
          description: Whether to enable extracted value translation. Disabled by default.
      required:
        - app_id
        - config_version
        - extract_fields
    ExtractionFieldConfig:
      type: object
      additionalProperties: false
      properties:
        field_key:
          type: string
          pattern: ^[A-Za-z][A-Za-z0-9_]{0,63}$
          description: >-
            Unique field identifier. Required when you create a high-speed
            custom extraction application. Standard applications do not require
            this field.
        field_name:
          type: string
          minLength: 1
          maxLength: 50
          description: Field name.
        field_type:
          type: string
          enum:
            - string
            - date
            - table
          description: Field type. Use table for table fields.
        field_prompt:
          type: string
          description: Field extraction prompt.
        sub_fields:
          type: array
          description: >-
            Table sub-fields. When field_type is table, provide at least one
            valid sub-field.
          items:
            $ref: '#/components/schemas/ExtractionSubFieldConfig'
      required:
        - field_name
        - field_type
    LongDocConfig:
      type: object
      additionalProperties: false
      properties:
        doc_type:
          type: string
          description: Document type.
        doc_desc:
          type: string
          description: Document type description.
      required:
        - doc_type
    HighSpeedExtractionFieldConfig:
      type: object
      additionalProperties: false
      title: High-speed field
      description: >-
        High-speed field configuration. For ordinary fields, set field_type to
        string or date and do not pass sub_fields. For table fields, set
        field_type to table and pass sub_fields.
      properties:
        field_key:
          type: string
          pattern: ^[A-Za-z][A-Za-z0-9_]{0,63}$
          description: >-
            Unique field identifier. It must start with an English letter and
            can contain only English letters, numbers, and underscores. Maximum
            64 characters.
        field_name:
          type: string
          minLength: 1
          maxLength: 50
          description: Field name.
        field_type:
          type: string
          enum:
            - string
            - date
            - table
          description: >-
            Field type. Use string or date for ordinary fields. Use table for
            table fields.
        field_prompt:
          type: string
          maxLength: 200
          description: Field extraction prompt.
        sub_fields:
          type: array
          maxItems: 50
          description: >-
            Table sub-fields. Fill this only when field_type is table, and
            provide at least one valid sub-field. Do not pass this parameter for
            ordinary fields.
          items:
            $ref: '#/components/schemas/HighSpeedExtractionSubFieldConfig'
          examples:
            - - field_key: item_name
                field_name: Item name
                field_type: string
      required:
        - field_key
        - field_name
        - field_type
      allOf:
        - if:
            properties:
              field_type:
                const: table
            required:
              - field_type
          then:
            required:
              - sub_fields
            properties:
              sub_fields:
                minItems: 1
    ExtractionSubFieldConfig:
      type: object
      additionalProperties: false
      properties:
        field_key:
          type: string
          pattern: ^[A-Za-z][A-Za-z0-9_]{0,63}$
          description: >-
            Unique sub-field identifier. Required when you create a high-speed
            custom extraction application. Standard applications do not require
            this field.
        field_name:
          type: string
          minLength: 1
          maxLength: 50
          description: Sub-field name.
        field_type:
          type: string
          enum:
            - string
            - date
          description: Sub-field type. Nested tables are not supported inside a table.
        field_prompt:
          type: string
          description: Sub-field extraction prompt.
      required:
        - field_name
        - field_type
    HighSpeedExtractionSubFieldConfig:
      type: object
      additionalProperties: false
      properties:
        field_key:
          type: string
          pattern: ^[A-Za-z][A-Za-z0-9_]{0,63}$
          description: >-
            Unique sub-field identifier. It must start with an English letter
            and can contain only English letters, numbers, and underscores.
            Maximum 64 characters.
        field_name:
          type: string
          minLength: 1
          maxLength: 50
          description: Sub-field name.
        field_type:
          type: string
          enum:
            - string
            - date
          description: Sub-field type. Nested tables are not supported inside a table.
        field_prompt:
          type: string
          maxLength: 200
          description: Sub-field extraction prompt.
      required:
        - field_key
        - field_name
        - field_type
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Production OpenAPI Accessor access_key. You can find it in My API in the
        ADP platform. If the key is disabled, expired, or does not belong to the
        production environment, the API returns Accessor not found.

````