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

# Extract domestic general bill (sync)

> Extract fields from domestic general bills. Returned fields and classification results depend on the preset application configuration. Verifiable invoices can include the verification result, verification error message, and voided flag in their extracted fields.



## OpenAPI

````yaml /en/api-reference/preset-domestic-bills.yaml post /open/agentic_doc_processor/{tenant_name}/v1/app/doc/extract
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:
    post:
      tags:
        - Domestic bill extraction
      summary: Extract domestic general bill (sync)
      description: >-
        Extract fields from domestic general bills. Returned fields and
        classification results depend on the preset application configuration.
        Verifiable invoices can include the verification result, verification
        error message, and voided flag in their extracted fields.
      operationId: extractDomesticBill
      parameters:
        - $ref: '#/components/parameters/TenantName'
      requestBody:
        $ref: '#/components/requestBodies/DocumentExtractRequest'
      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
  requestBodies:
    DocumentExtractRequest:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DocumentExtractRequest'
          examples:
            fileUrl:
              $ref: '#/components/examples/DomesticBillsFileUrl'
            fileBase64:
              $ref: '#/components/examples/DomesticBillsFileBase64'
  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:
    DocumentExtractRequest:
      oneOf:
        - title: Use file URL
          type: object
          additionalProperties: false
          properties:
            file_url:
              default: >-
                https://adp.laiye.com/web/agentic_doc_processor/laiye/file/2003c711818811f1a36200163e358400
              type: string
              format: uri
              description: File URL. Use either file_url or file_base64.
            app_id:
              default: ootb_v9x2y5z8a1b4c7d0e3f6h9j1k4m7
              type: string
              description: >-
                Unique identifier of the domestic general bills preset
                application.
          required:
            - app_id
            - file_url
        - title: Use file Base64
          type: object
          additionalProperties: false
          properties:
            file_base64:
              default: >-
                data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAwICQsJCAwLCgsODQwOEh4UEhEREiUbHBYeLCcuLisnKyoxN0Y7MTRCNCorPVM+QkhKTk9OLztWXFVMW0ZNTkv/wAALCAA7AHQBAREA/8QAGwABAAIDAQEAAAAAAAAAAAAAAAQGAgMFAQf/xAAuEAACAgIBAwMDBQABBQAAAAABAgMEBREAEiExBhNBFCIyFVFhcYEWJDVTgqH/2gAIAQEAAD8A+q8cccccccccccccch5Wy1WoXjmghdmCq829Df7Ad2P7D55SK8sVk2BGuXVJpOtcjCLxE6kDThEHT1a7fC9gQNduSPUkyNRw0lCCTJwSFQiy3JVkmUeepCujvtsnvsga5iJJa7z/AE2Z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13pwyXvdx1CQyVq/sgMp0QoZ9/cFDHXYfG989pemnrvThkvGXH0JDLWr+0AynRChn39wUMddh8b3ywcccccg52xLUwmQsQN0TQ1pJEbQOmCkg6P88rf6rT+j9z/nI932+rp96n+WvGvb55kM9kqmN9PWxbroLlcGf3Yk+9zGG3tpIwO/wCP98c575zOyYp7It2XdMabQapFXVVbcmi4cnY0o/D9vHL59QRYih9mVvcQuZQo6F1rsT+532/o838rctu/jM1RhnyX1i2RK88Hsqvsoqk9a67gbAX7id75Go5PKLHhMlatCSvlpFRqvtqFhDoWQqwGyRoA7J3v45KaxkKGex9aXJC4LfuNNAYVUQoqkh113A6tL9xO98h4L1GMjNDbnyhjWcO8dIV9RlACQBIR9zgAE6b9xr557SyeUEOFyVm2Hgy0gRqwiUCASIWQqdbJGgDsne/jm4/qNTPV6363aswxRNZtrJDCAI+4UfagOyd/PhTzTSyeUEOFyVm2Hgy0gRqwiUCASIWQqdbJGgDsne/jklEycPqKpSTNWrMaxme0ssMIAT8VG1QHZbfz4U8svIOdry28JkK8C9c01aSNF2BtipAGz/POfvPfQez+mY7ftdH/cH341/wCHX/3kOPCZOSLAxpZmomjTVZXUxMFfo6SACp2d+TvWh27nY5knpfIJjL8U0dq1O9YU6whtiMa05LvooCvU+ukhj28HfLtqyLMQURfTBD7hJPX1dta+Ned/5zcd6PTrfxvlZwOLzFIsL9XHSyWT/wBXaW1I0kn9AxjsPAXYAHPaGByMaYynblrNSxTdUDIW9yYqpWPqGtLoHvonZA8cen8bmKDk3auOllsHdu2tqRpJP6BjA0PAXYAHNdP05dWLHY6y9U43Gy+5G6FvdlADBVYa0vZu5BO9fG+bMfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnSx+Mkit5WxbKO12UdPST2iVAqqe3nfUf8A25zcfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnUxePlrX8nbssjSW5gU6CT0xKoCg9vO+o/7zpcccccccccccccccc//Z
              type: string
              description: Base64-encoded file. Use either file_base64 or file_url.
            app_id:
              default: ootb_v9x2y5z8a1b4c7d0e3f6h9j1k4m7
              type: string
              description: >-
                Unique identifier of the domestic general bills preset
                application.
          required:
            - app_id
            - file_base64
    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.
  examples:
    DomesticBillsFileUrl:
      summary: Use file URL
      value:
        file_url: >-
          https://adp.laiye.com/web/agentic_doc_processor/laiye/file/2003c711818811f1a36200163e358400
        app_id: ootb_v9x2y5z8a1b4c7d0e3f6h9j1k4m7
    DomesticBillsFileBase64:
      summary: Use file Base64
      value:
        file_base64: >-
          data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAwICQsJCAwLCgsODQwOEh4UEhEREiUbHBYeLCcuLisnKyoxN0Y7MTRCNCorPVM+QkhKTk9OLztWXFVMW0ZNTkv/wAALCAA7AHQBAREA/8QAGwABAAIDAQEAAAAAAAAAAAAAAAQGAgMFAQf/xAAuEAACAgIBAwMDBQABBQAAAAABAgMEBREAEiExBhNBFCIyFVFhcYEWJDVTgqH/2gAIAQEAAD8A+q8cccccccccccccch5Wy1WoXjmghdmCq829Df7Ad2P7D55SK8sVk2BGuXVJpOtcjCLxE6kDThEHT1a7fC9gQNduSPUkyNRw0lCCTJwSFQiy3JVkmUeepCujvtsnvsga5iJJa7z/AE2ZkqT2VdmZET6eGRWSJY9NEW6V6lBOwNg+NnV1C2lsQgPG1cRkSFlPWz9tEa7a87/zm/lXoepppMxBWllrWK1lZSsleCRVQoN/m32yDW/GuQbl7JZOpg79hKqU7eQryRRoG9yNSdr1MTptjzoDX88lTZ/MJTyuQSKl9JjbMqNGQ3XLGh7kHelOv4Oz+3LWjB1DDwRscy444445wsb6ftUMfWqLn7/TXiWMdEUAGgNdgYydf2T/AGeZVfTsdenj4fe65qZTcxTRdVJOtb7dzxB6djSw4laJ6IrPWjrLERpHILdTFj1EkedDyedNagWeGRJplSGMxiLq2jb13O+5I12O/k83OodGRhtWGiP3HOJQ9L1qVilKLdyYUVaOvHK6lUQr09Ogo2NfJ79vPMIvSNSM1VFy8a9OdZ69cyr7cRB2APt2R8dydDxrkWl6WM5yAyE1qOCzelmaskq+3MhbaluxI2PIBG/kctXHHHHHIGbn9jGWOkzLJIjJG0MMkjKxB0dICR/euU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qdbJGgDsne/jklEycPqKpSTNWrMaxme0ssMIAT8VG1QHZbfz4U8svIOdry28JkK8C9c01aSNF2BtipAGz/POfvPfQez+mY7ftdH/cH341/wCHX/3kOPCZOSLAxpZmomjTVZXUxMFfo6SACp2d+TvWh27nY5knpfIJjL8U0dq1O9YU6whtiMa05LvooCvU+ukhj28HfLtqyLMQURfTBD7hJPX1dta+Ned/5zcd6PTrfxvlZwOLzFIsL9XHSyWT/wBXaW1I0kn9AxjsPAXYAHPaGByMaYynblrNSxTdUDIW9yYqpWPqGtLoHvonZA8cen8bmKDk3auOllsHdu2tqRpJP6BjA0PAXYAHNdP05dWLHY6y9U43Gy+5G6FvdlADBVYa0vZu5BO9fG+bMfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnSx+Mkit5WxbKO12UdPST2iVAqqe3nfUf8A25zcfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnUxePlrX8nbssjSW5gU6CT0xKoCg9vO+o/7zpcccccccccccccccc//Z
        app_id: ootb_v9x2y5z8a1b4c7d0e3f6h9j1k4m7
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````