Skip to main content

Overview

Domestic general bills use the document extraction API.
POST /open/agentic_doc_processor/{tenant_name}/v1/app/doc/extract
The API returns extracted fields and classification results based on the preset application configuration.

Request parameters

NameTypeRequiredDescription
tenant_namestringYesTenant name. Default: laiye.
app_idstringYesUnique ID of the domestic general bill preset application.
file_base64stringOptionalBase64 content of the file. Use either file_base64 or file_url.
file_urlstringOptionalOnline file URL. Use either file_url or file_base64. Only HTTP URLs are supported.

Supported bill types

Bill typeKey
Air transport e-ticket itineraryair_transport
Customs declaration formcustom_declaration_form
Customs payment formcustoms_payment_form
Electronic air transport e-ticket itineraryelectronic_air_transport
Electronic motor vehicle sales invoiceelectronic_motor_vehicle_sale_invoice
Electronic train ticketelectronic_train_ticket
Electronic used car sales invoiceelectronic_used_car_purchase_invoice
Fiscal paperfiscal_paper
Electronic fiscal paperfiscal_paper_electronic
General machine-printed invoicegeneral_machine_invoice
Highway passenger invoicehighway_passenger_invoice
Machine-printed electronic invoicemachine_printed_invoice
Electronic medical invoicemedical_electronic_invoice
Medical invoicemedical_invoice
Motor vehicle sales invoicemotor_vehicle_sale_invoice
Other invoiceother
Quota invoicequota_invoice
Shipping invoiceshipping_invoice
Tax clearance certificatetax_clearance_certificate
Taxi tickettaxi_ticket
Train ticket refund feeticket_refund_fee
Train tickettrain_ticket
Ride-hailing itinerarytravel_transport
VAT invoice sales listvat_invoice_sales_list
Used car sales invoiceused_car_purchase_invoice
VAT special invoicevat_special_invoice
VAT electronic special invoicevat_electronic_special_invoice
VAT electronic invoicevat_electronic_invoice
VAT common invoicevat_common_invoice
Blockchain electronic invoiceblockchain_electronic_invoice
New VAT electronic invoicevat_electronic_invoice_new
New VAT electronic special invoicevat_electronic_special_invoice_new
VAT electronic toll invoicevat_electronic_toll_invoice
VAT roll invoicevat_roll_invoice
Vehicle toll invoicevehicle_toll

Response

The response uses the common document extraction structure.
FieldTypeDescription
codestringBusiness code. success means the request succeeded.
messagestringResponse message.
data.task_idstringExtraction task ID.
data.statusintegerExtraction status. 4 means success, and 5 means failure.
data.extraction_resultarrayField extraction results.
data.classify_resultobjectDocument classification result.
The field list is long and may change with preset application updates. Actual returned fields depend on the configuration for the app_id.