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

# 查询应用配置

> 根据 app_id 查询抽取应用配置。查询高速版自定义抽取应用配置时，传入高速版应用的 app_id；不传 config_version 时返回最新配置版本。



## OpenAPI

````yaml /api-reference/adp-api.yaml post /open/agentic_doc_processor/{tenant_name}/v1/app-manage/config
openapi: 3.1.0
info:
  title: ADP API
  version: 1.0.0
  description: Laiye ADP 官方 OpenAPI 接口规范，覆盖文档抽取、文档解析、抽取应用管理、积分查询、工作流运行和工作流文件管理。
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://adp.laiye.com
    description: ADP 生产环境
security: []
tags:
  - name: 文档抽取
    description: 从上传的文档中抽取结构化字段。
  - name: 文档解析
    description: 识别上传文档中的文字、版面块和位置信息。
  - name: 应用管理
    description: 创建、修改、删除和查询抽取应用及配置。
  - name: 账户
    description: 查询账户积分和使用情况。
  - name: 工作流
    description: 运行工作流应用并查询执行结果。
  - name: 工作流文件
    description: 上传和管理工作流应用使用的文件。
paths:
  /open/agentic_doc_processor/{tenant_name}/v1/app-manage/config:
    post:
      tags:
        - 应用管理
      summary: 查询应用配置
      description: >-
        根据 app_id 查询抽取应用配置。查询高速版自定义抽取应用配置时，传入高速版应用的 app_id；不传 config_version
        时返回最新配置版本。
      operationId: getExtractionAppConfig
      parameters:
        - $ref: '#/components/parameters/TenantName'
      requestBody:
        $ref: '#/components/requestBodies/AppConfigQueryRequest'
      responses:
        '200':
          description: 应用配置。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppConfigResponse'
              examples:
                standardConfig:
                  value:
                    code: 200
                    message: success
                    data:
                      app_id: app_1406
                      app_name: 采购单抽取应用
                      app_label:
                        - purchase-order
                      config_version: v1
                      extract_fields:
                        - field_name: 订单号
                          field_type: string
                          field_prompt: 抽取采购订单编号。
                      parse_mode: fast_vlm
                      enable_highlight: 0
                      enable_pdf_parse: true
                      pdf_pic_second_parsing: false
                      enable_stamp_recognition: true
                      enable_long_doc: false
                highSpeedConfig:
                  value:
                    code: 200
                    message: success
                    data:
                      app_id: app_1425
                      app_name: 高速版发票抽取应用
                      app_label:
                        - invoice
                        - high-speed
                      config_version: v1
                      extract_fields:
                        - field_name: 发票号码
                          field_type: string
                          field_prompt: 抽取发票上的唯一发票号码。
                      parse_mode: null
                      enable_highlight: null
                      enable_pdf_parse: null
                      pdf_pic_second_parsing: null
                      enable_stamp_recognition: null
                      enable_long_doc: false
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    TenantName:
      name: tenant_name
      in: path
      required: true
      description: 租户名称，默认 laiye。
      schema:
        type: string
        default: laiye
  requestBodies:
    AppConfigQueryRequest:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AppConfigQueryRequest'
          examples:
            highSpeedConfig:
              summary: 查询高速版自定义抽取应用配置
              value:
                app_id: app_1425
            highSpeedConfigVersion:
              summary: 查询高速版指定配置版本
              value:
                app_id: app_1425
                config_version: v1
  schemas:
    AppConfigResponse:
      allOf:
        - $ref: '#/components/schemas/SimpleResponse'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/AppConfigData'
    AppConfigQueryRequest:
      type: object
      additionalProperties: false
      properties:
        app_id:
          type: string
          description: 应用 ID。查询高速版自定义抽取应用配置时，传入高速版应用的 app_id。
        config_version:
          type: string
          description: 配置版本。可选，默认返回最新版本。
      required:
        - app_id
    SimpleResponse:
      type: object
      properties:
        code:
          oneOf:
            - type: string
            - type: integer
          description: 业务码。成功通常为 success 或 200。
        message:
          type: string
          description: 返回信息。
        tips:
          type:
            - string
            - 'null'
          description: 详细信息，默认为空。
    AppConfigData:
      type: object
      additionalProperties: true
      properties:
        app_id:
          type: string
        app_name:
          type: string
        app_label:
          type: array
          items:
            type: string
        config_version:
          type: string
        extract_fields:
          type: array
          items:
            $ref: '#/components/schemas/ExtractionFieldConfig'
        parse_mode:
          type:
            - string
            - 'null'
          description: 解析模式。高速版返回 null。
        enable_highlight:
          type:
            - integer
            - 'null'
          enum:
            - 0
            - 1
            - null
          description: 是否显示来源位置。标准版返回 0 或 1；高速版返回 null。
        enable_pdf_parse:
          type:
            - boolean
            - 'null'
          description: 是否开启 PDF 文本优先。高速版返回 null。
        pdf_pic_second_parsing:
          type:
            - boolean
            - 'null'
          description: 开启 PDF 文本优先时，是否对 PDF 中的图片进行二次解析。高速版返回 null。
        enable_stamp_recognition:
          type:
            - boolean
            - 'null'
          description: 是否开启印章识别。高速版返回 null。
        enable_long_doc:
          type: boolean
        long_doc_config:
          type: array
          items:
            $ref: '#/components/schemas/LongDocConfig'
    ExtractionFieldConfig:
      type: object
      additionalProperties: false
      properties:
        field_key:
          type: string
          pattern: ^[A-Za-z][A-Za-z0-9_]{0,63}$
          description: 字段唯一标识。创建高速版自定义抽取应用时必填；标准版不要求传入。
        field_name:
          type: string
          minLength: 1
          maxLength: 50
          description: 字段名称。
        field_type:
          type: string
          enum:
            - string
            - date
            - table
          description: 字段类型。表格字段使用 table。
        field_prompt:
          type: string
          description: 字段抽取提示词。
        sub_fields:
          type: array
          description: 表格子字段。field_type 为 table 时必须至少提供 1 个有效子字段。
          items:
            $ref: '#/components/schemas/ExtractionSubFieldConfig'
      required:
        - field_name
        - field_type
    LongDocConfig:
      type: object
      additionalProperties: false
      properties:
        doc_type:
          type: string
          description: 文档类型。
        doc_desc:
          type: string
          description: 文档类型描述。
      required:
        - doc_type
    ExtractionSubFieldConfig:
      type: object
      additionalProperties: false
      properties:
        field_key:
          type: string
          pattern: ^[A-Za-z][A-Za-z0-9_]{0,63}$
          description: 子字段唯一标识。创建高速版自定义抽取应用时必填；标准版不要求传入。
        field_name:
          type: string
          minLength: 1
          maxLength: 50
          description: 子字段名称。
        field_type:
          type: string
          enum:
            - string
            - date
          description: 子字段类型。表格内不允许再嵌套表格。
        field_prompt:
          type: string
          description: 子字段抽取提示词。
      required:
        - field_name
        - field_type
  responses:
    ValidationError:
      description: 参数校验错误。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SimpleResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        生产环境的用户 OpenAPI Accessor access_key，在 ADP 平台的「我的 API」中查看。key
        被禁用、过期或不属于生产环境时会返回 Accessor not found。

````