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

# Query domestic bill extraction task

> Query the status and result of a domestic bill extraction task by task_id.



## OpenAPI

````yaml /en/api-reference/preset-domestic-bills.yaml get /open/agentic_doc_processor/{tenant_name}/v1/app/doc/extract/query/task/{task_id}
openapi: 3.1.0
info:
  title: Domestic general bills
  version: 1.0.0
  description: ADP preset application API for extracting domestic general bills.
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://adp-global.laiye.com
    description: ADP global production endpoint
security: []
tags:
  - name: Domestic bill extraction
    description: Extract fields from domestic general bills.
  - name: Domestic invoice verification
    description: Verify domestic invoices from invoice details.
paths:
  /open/agentic_doc_processor/{tenant_name}/v1/app/doc/extract/query/task/{task_id}:
    get:
      tags:
        - Domestic bill extraction
      summary: Query domestic bill extraction task
      description: >-
        Query the status and result of a domestic bill extraction task by
        task_id.
      operationId: queryDomesticBillExtractTask
      parameters:
        - $ref: '#/components/parameters/TenantName'
        - $ref: '#/components/parameters/TaskId'
      responses:
        '200':
          $ref: '#/components/responses/DocumentExtractResponse'
        '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
    TaskId:
      name: task_id
      in: path
      required: true
      description: Task ID.
      schema:
        type: string
  responses:
    DocumentExtractResponse:
      description: Extraction result.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DocumentExtractResponse'
          examples:
            invoiceVerification:
              summary: Extraction result containing invoice verification fields
              value:
                code: success
                message: ''
                tips: null
                data:
                  task_id: ''
                  file_url: ''
                  status: 4
                  extraction_result:
                    - field_key: vat_electronic_special_invoice_new
                      field_name: Electronic VAT Special Invoice
                      object_values:
                        - document_type: vat_electronic_special_invoice_new
                          pages:
                            - 0
                          extraction_result:
                            - field_key: fpVerification
                              field_name: Verification result
                              field_values:
                                - field_value: ''
                                  confidence: 0
                            - field_key: fpVerificationMsg
                              field_name: Verification error message
                              field_values:
                                - field_value: ''
                                  confidence: 0
                            - field_key: fpIsVoided
                              field_name: Voided flag
                              field_values:
                                - field_value: ''
                                  confidence: 0
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SimpleResponse'
  schemas:
    DocumentExtractResponse:
      allOf:
        - $ref: '#/components/schemas/SimpleResponse'
        - type: object
          properties:
            data:
              type: object
              additionalProperties: true
              properties:
                task_id:
                  type: string
                file_url:
                  type: string
                status:
                  type: integer
                doc_recognize_result:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                extraction_result:
                  type: array
                  items:
                    $ref: '#/components/schemas/ExtractionResult'
                classify_result:
                  type: object
                  additionalProperties: true
    SimpleResponse:
      type: object
      properties:
        code:
          oneOf:
            - type: string
            - type: integer
        message:
          type: string
        tips:
          type:
            - string
            - 'null'
    ExtractionResult:
      type: object
      additionalProperties: true
      properties:
        field_key:
          type: string
          description: Unique identifier of the document type.
        field_name:
          type: string
          description: Name of the document type.
        object_values:
          type: array
          description: Extraction results for each recognized document.
          items:
            $ref: '#/components/schemas/DocumentObjectValue'
    DocumentObjectValue:
      type: object
      additionalProperties: true
      properties:
        document_type:
          type: string
          description: Identifier of the recognized document type.
        pages:
          type: array
          items:
            type: integer
          description: Zero-based page indexes containing the document.
        extraction_result:
          type: array
          description: >-
            Extracted fields. Verifiable invoices can also include
            fpVerification (verification result), fpVerificationMsg
            (verification error message), and fpIsVoided (voided flag).
          items:
            $ref: '#/components/schemas/ExtractedField'
    ExtractedField:
      type: object
      additionalProperties: true
      properties:
        field_key:
          type: string
          description: >-
            Unique field identifier. Invoice verification uses fpVerification,
            fpVerificationMsg, and fpIsVoided.
        field_name:
          type: string
          description: Display name of the field.
        field_values:
          type: array
          description: List of values for the field.
          items:
            $ref: '#/components/schemas/ExtractedFieldValue'
    ExtractedFieldValue:
      type: object
      additionalProperties: true
      properties:
        field_value:
          type: string
          description: Field value.
        field_confidence:
          type: number
          format: float
          description: Confidence score of the extracted field.
        confidence:
          type: number
          format: float
          description: Confidence score of an invoice verification field.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````