> ## 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. Pass enable_invoice_verify=true to enable invoice verification for this extraction; omit it to use the saved application setting. 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.1.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. Pass
        enable_invoice_verify=true to enable invoice verification for this
        extraction; omit it to use the saved application setting. 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. This path parameter must be provided explicitly.
      schema:
        type: string
      example: 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: The request body, path parameter, or field type failed validation.
      headers:
        X-Process-Time:
          $ref: '#/components/headers/ProcessTime'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HTTPValidationError'
          example:
            detail:
              - type: missing
                loc:
                  - body
                  - fpNumber
                msg: Field required
                input:
                  fpDate: '2026-08-25'
                  fpAmount: '100.00'
  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.
            file_name:
              type: string
              description: >-
                File name. Provide it for Base64 input or when the name cannot
                be determined from the URL.
            app_id:
              default: ootb_v9x2y5z8a1b4c7d0e3f6h9j1k4m7
              type: string
              description: >-
                Unique identifier of the domestic general bills preset
                application.
            enable_invoice_verify:
              type: boolean
              description: >-
                Whether to enable invoice verification for this extraction. true
                enables it and false disables it; omit the field to use the
                saved application setting.
          required:
            - app_id
            - file_url
        - title: Use file Base64
          type: object
          additionalProperties: false
          properties:
            file_base64:
              default: >-
                data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAwICQsJCAwLCgsODQwOEh4UEhEREiUbHBYeLCcuLisnKyo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AHPaGByMaYynblrNSxTdUDIW9yYqpWPqGtLoHvonZA8cen8bmKDk3auOllsHdu2tqRpJP6BjA0PAXYAHNdP05dWLHY6y9U43Gy+5G6FvdlADBVYa0vZu5BO9fG+bMfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnSx+Mkit5WxbKO12UdPST2iVAqqe3nfUf8A25zcfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnUxePlrX8nbssjSW5gU6CT0xKoCg9vO+o/7zpcccccccccccccccc//Z
              type: string
              description: Base64-encoded file. Use either file_base64 or file_url.
            file_name:
              type: string
              description: >-
                File name. Provide it for Base64 input or when the name cannot
                be determined from the URL.
            app_id:
              default: ootb_v9x2y5z8a1b4c7d0e3f6h9j1k4m7
              type: string
              description: >-
                Unique identifier of the domestic general bills preset
                application.
            enable_invoice_verify:
              type: boolean
              description: >-
                Whether to enable invoice verification for this extraction. true
                enables it and false disables it; omit the field to use the
                saved application setting.
          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
                message:
                  type: string
                  description: Task status or processing result message.
                status:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                    - 4
                    - 5
                    - 6
                  description: >-
                    0=unknown, 1=ready, 2=running, 4=succeeded, 5=failed,
                    6=cancelled or rejected.
                doc_recognize_result:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                extraction_result:
                  type: array
                  items:
                    $ref: '#/components/schemas/ExtractionResult'
                extract_config_version:
                  type: string
                  description: Extraction configuration version used for this request.
                metadata:
                  type:
                    - object
                    - 'null'
                  additionalProperties: true
                  description: Document processing task metadata.
                aigc:
                  type:
                    - object
                    - 'null'
                  additionalProperties: true
                  description: AI-generated content compliance label.
                classify_result:
                  type: object
                  additionalProperties: true
    HTTPValidationError:
      type: object
      additionalProperties: true
      required:
        - detail
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorItem'
      description: Request validation error response.
    SimpleResponse:
      type: object
      additionalProperties: true
      required:
        - code
        - message
        - tips
      properties:
        code:
          oneOf:
            - type: string
            - type: integer
          description: >-
            API processing code. It is `success` after entering the verification
            flow; `success` does not mean that the invoice passed verification.
        message:
          type: string
          description: API-level message.
        tips:
          type:
            - string
            - 'null'
          description: Optional information.
      description: API response envelope.
    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'
    ValidationErrorItem:
      type: object
      additionalProperties: true
      required:
        - type
        - loc
        - msg
      properties:
        type:
          type: string
          description: Validation error type.
        loc:
          type: array
          description: Location of the invalid field.
          items:
            oneOf:
              - type: string
              - type: integer
        msg:
          type: string
          description: Validation error message.
        input:
          description: Input value that caused the validation error.
        ctx:
          type: object
          additionalProperties: true
          description: Optional validation context.
      description: One request validation error.
    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
        enable_invoice_verify: true
    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+3MhbaluxI2PI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AI+4UfagOyd/PhTzTSyeUEOFyVm2Hgy0gRqwiUCASIWQqdbJGgDsne/jklEycPqKpSTNWrMaxme0ssMIAT8VG1QHZbfz4U8svIOdry28JkK8C9c01aSNF2BtipAGz/POfvPfQez+mY7ftdH/cH341/wCHX/3kOPCZOSLAxpZmomjTVZXUxMFfo6SACp2d+TvWh27nY5knpfIJjL8U0dq1O9YU6whtiMa05LvooCvU+ukhj28HfLtqyLMQURfTBD7hJPX1dta+Ned/5zcd6PTrfxvlZwOLzFIsL9XHSyWT/wBXaW1I0kn9AxjsPAXYAHPaGByMaYynblrNSxTdUDIW9yYqpWPqGtLoHvonZA8cen8bmKDk3auOllsHdu2tqRpJP6BjA0PAXYAHNdP05dWLHY6y9U43Gy+5G6FvdlADBVYa0vZu5BO9fG+bMfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnSx+Mkit5WxbKO12UdPST2iVAqqe3nfUf8A25zcfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnUxePlrX8nbssjSW5gU6CT0xKoCg9vO+o/7zpcccccccccccccccc//Z
        app_id: ootb_v9x2y5z8a1b4c7d0e3f6h9j1k4m7
        enable_invoice_verify: true
  headers:
    ProcessTime:
      description: Server processing time in seconds.
      schema:
        type: string
      example: '0.248'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: ADP API Key.

````

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