文档中心
接入技术服务

功能描述

国内通用票据识别。识别包含纸质医疗发票、电子医疗发票、全电票、航空运输电子客票行程单、铁路电子客票在内的31小类国内通用票据,提取其中的信息,并以整理成标准结构化的Key/Value形式返回或导出。支持单页面多票的切分识别,支持输入多种通用图片格式、单页PDF、单页OFD格式。

更新日志

2024.10.08 - v2.0.33

  • 引擎升级,优化了部份票据分类的精度
  • 升级了识别对象支持
    • 电子医疗发票(electronic_medical_invoice)
    • 纸质门诊发票(outpatient_medical_invoice)
    • 纸质住院发票(inpatient_medical_invoice)
    • 网约车行程单(ride_receipt)
  • 新增了1个API调用的入参功能
    • return_ppi
      • 是否返回pdf解码ppi,1为返回pdf解码ppi,0为不返回pdf解码ppi,api调用默认为0,前端demo页请求默认为1
  • 部份票据新增字段,详见字段表

2024.07.29 - v2.0.32

  • 新增识别对象支持
    • 数电火车票(railway_digital_ticket)
    • 数电行程单(flight_digital_ticket)

2024.05.20 - v2.0.31

  • 修复线上指定ofd等样本crash问题
  • 解决已知样本分类错误问题
  • 优化 kind分词住宿的逻辑
  • 增票类:
    • 新增【成品油】判存字段(除xml解析外),处理逻辑为:判断货物明细中是否包含 成品油相关产品,包含则输出“True”,否则输出“False”
    • 新增 参数coord_restore控制是否返回原图坐标,接口默认返回切图坐标
    • 修复涉及pdf解析导致的识别错误问题:pdf解析时ppi>300会额外识别出字符的问题。限制动态ppi取值时最大为300
    • 修复 多页全电票合并 时,最终输出的税额、金额或其他字段为空的问题
    • 修复 增票价税合计小写 为负数时,小数点错位的问题
    • 修复纸质数电票场景中数电票号码字段逻辑处理问题
  • 火车票:
    • 解决外国乘客场景中英文字符姓名未返回空格符问题
  • 飞机行程单:
    • 解决指定样本出发站到达站或行程信息因未正确后处理导致识别为空的问题
  • 增值税销货清单:
    • 新增小计字段,包括 税额小计 和 金额小计

请求URL

https://api.textin.com/robot/v1.0/api/bills_crop

HTTP请求方法 (Method)

HTTP POST

请求头说明 (Request Headers)

请在HTTP请求中添加以下自定义Header。

header 名
x-ti-app-id 请登录后前往 “工作台-账号设置-开发者信息” 查看 x-ti-app-id
x-ti-secret-code 请登录后前往 “工作台-账号设置-开发者信息” 查看 x-ti-secret-code

URL参数 (Parameters)

URL参数指以 {参数名}={参数值} 形式拼接到 URL 上的键值对。它以 ? 开头,不同参数之间使用 & 连接。形如 ?p1=v1&p2=v2

参数名 数据类型 是否必填 允许的值 描述
crop_complete_image integer 0, 1 选择是否需要输出各票据图片,1为输出各票据切片base64编码,0为不输出各票据图片,默认为0
crop_value_image integer 0, 1 选择是否返回关键字段切图图片,1为输出字段图片,0为不输出字段图片,默认为0
coord_restore integer 0, 1 是否将item_list中字段坐标映射到原图,1为映射到原图,0为映射到切边图,默认为0 ※ pdf文件的原图需要根据解析时使用的ppi确定
return_ppi integer 0, 1 是否返回pdf解码ppi,1为返回pdf解码ppi,0为不返回pdf解码ppi,api调用默认为0,前端demo页请求默认为1

请求体说明 (Request Body)

支持以下两种请求格式

1. Content-Type: application/octet-stream

要上传的图片,目前支持jpg, png, bmp, pdf, tiff, ofd, 帧gif等大部分格式.

请注意,请求体的数据格式为本地文件的二进制流,非 FormData 或其他格式。文件大小不超过 10M,图像宽高须介于 20 和 10000(像素)之间。文件大小不超过 10M,图像宽高须介于 20 和 10000(像素)之间。

2. Content-Type: text/plain

请求体的数据格式为文本,内容为在线文件的URL链接(支持http以及https协议)。在线文件大小不超过 10M,图像宽高须介于 20 和 10000(像素)之间。

响应体说明 (Response)

Content-Type: application/json

JSON结构说明如下:

字段名 类型 描述
code integer 错误码,详见“错误码说明”
message string 错误信息
result object
pageNum integer 总页数
pages array 样本每页的识别结果
page_count integer 总页数
+ object_list array
++ type string 切分后单张票据类型
- air_transport 行程单
- blockchain_electronic_invoice 区块链电子发票
- general_machine_invoice 通用机打发票
- highway_passenger_invoice 公路客运发票
- machine_printed_invoice 机打发票
- motor_vehicle_sale_invoice 机动车销售统一发票
- non_tax_income_unified_bill 非税收入票据
- parking_invoice 停车费发票
- passenger_transport_invoice 旅客运输普票
- quota_invoice 通用定额发票
- shipping_invoice 船运客票
- taxi_ticket 出租车发票
- train_ticket 火车票
- used_car_purchase_invoice 二手车销售统一发票
- vat_common_invoice 增值税普通发票
- vat_electronic_invoice 增值税电子普通发票
- vat_electronic_special_invoice 增值税电子专用发票
- vat_electronic_invoice_new 电子发票(普通发票)
- vat_electronic_toll_invoice 增值税电子普通发票(通行费)
- vat_electronic_special_invoice_new 电子发票(增值税专用发票)
- vat_invoice_sales_list 增值税销货清单
- vat_roll_invoice 增值税普通发票(卷票)
- vat_special_invoice 增值税专用发票
- vat_transport_invoice 货物运输业增值税专用发票
- vehicle_toll 过路过桥费发票
- flight_digital_ticket 数电票(飞机行程单)
- railway_digital_ticket 数电票(火车票)
- electronic_medical_invoice 电子医疗发票
- outpatient_medical_invoice 纸质门诊发票
- inpatient_medical_invoice 纸质住院发票
- ride_receipt 网约车行程单
- other 其他
++ type_description string 切分后单张票据类型中文描述
++ image_angle string 切分后单张票据的角度
++ rotated_image_width string 切分后单张票据转正后的宽度
++ rotated_image_height string 切分后单张票据转正后的高度
++ class string - nation_tax_invoice 国税类型
- local_invoice 地方票种
++ kind string 切分后单张票据的大类类型
- communication 通讯
- daily 日用
- digital_appliance 数码电器
- education 教育
- foodstuff 食品
- lodging 住宿
- medical_treatment 医疗
- office 办公
- other 其他
- post 邮寄
- raiment 服饰
- rent_decoration 房租装饰
- repast 餐饮
- service 服务
- traffic 交通
- vehicle 用车
++ kind_description string 切分后单张票据使用类型中文描述
++ item_list array 识别字段
++ product_list array 表格信息(行输出)/ 增票中商品信息(行输出)
++ flight_data_list array 飞机行程单中行本信息(行输出)
++ image array 切边图像的base64编码
++ stamp_list array 票据中的印章结果
++ qr_code_list array 票据中的二维码结果
+++ key string 识别字段key
+++ value string 字段识别结果
+++ position array 识别字段在切分后票据转正后的坐标位置 [0,1,2,3,4,5,6,7]
- (0, 1) 左上角坐标
- (2, 3) 右上角坐标
- (4, 5) 右下角坐标
- (6, 7) 左下角坐标
+++ description string 字段中文描述

结构体说明

各类型返回的字段及字段定义说明如下:

Type_railway_digital_ticket

字段名 类型 描述
type string 切分后单张票据类型
- railway_digital_ticket 数电票(铁路电子客票)
item_list array
+ key string 识别字段key
- departure_station 出发地
- train_number 车次号
- arrival_station 目的地
- seat_number 座位号
- price 票价
- class 座位类别
- passenger_id 乘客身份证
- passenger_name 乘客名称
- ticket_id 电子客票号
- number 发票号码
- date_of_issue 开票日期
- phonics_of_departure_station 出发地拼音
- phonics_of_arrival_station 目的地拼音
- pretax_amount 税前金额
- tax_rate 税率
- tax 税额
- buyer 购买方名称
- buyer_tax_id 社会统一信用代码
- number_of_original_invoice 原发票号码
- departure_date 乘车时间
- exist_invoice_seal 发票专用章存在性判断
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_flight_digital_ticket

字段名 类型 描述
type string 切分后单张票据类型
- flight_digital_ticket 数电票(航空运输电子客票行程单)
item_list array
+ key string 识别字段key
- agentcode 销售网点代号
- passenger_name 旅客姓名
- id_no 身份证件号码
- total 合计金额
- fare 票价
- civil_aviation_fund 民航发展基金
- fuel_surcharge 燃油附加费
- other_taxes 其他税费
- issued_date 填开日期
- issued_by 填开单位
- e_ticket_no 电子客票号码
- restriction 签注
- insurance 保险费
- international_flag 国内国际标签
- number_of_original_invoice 原发票号码
- tax_rate 增值税税率
- tax 增值税税额
- check_code 验证码
- prompt_information 提示信息
- buyer 购买方名称
- buyer_tax_id 统一社会信用代码/购买方纳税人识别号
- invoice_number 发票号码
- issuing_status 开票状态
- exist_invoice_seal 发票专用章存在性判断
+ value string 识别字段结果
+ description string 识别字段中文描述
flight_data_list array 飞机行程单中行本信息(行输出)
+ key string 识别字段key
- from 出发站
- to 到达站
- carrier 承运人
- flight_number 航班号
- seat_class 座位等级
- date 航班日期
- time 航班时间
- fare_basis 客票级别/客票类别
- allow 免费行李
- not_valid_before 客票生效日期
- not_valid_after 有效截至日期
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_electronic_medical_invoice

字段名 类型 描述
type string 切分后单张票据类型
- electronic_medical_invoice 电子医疗发票
item_list array
+ key string 识别字段key
- title 标题
- invoice_code 票据代码
- invoice_number 票据号码
- payer_uniform_social_credit_code 交款人统一社会信用代码
- payer 交款人
- correct_code 校验码
- date 开票日期
- amount_char 合计大写
- amount_digital 合计小写
- cashier_company 收款单位
- reviewer 复核人
- cashier 收款人
- workflow_number 业务流水号
- patient_number 门诊号
- visit_date 就诊时间/就诊日期
- medical_institution_type 医疗机构类型
- medical_insurance_type 医保类型
- medical_insurance_number 医保编号
- sex 性别
- medical_pooling_payment 医保统筹基金支付
- other_payment 其他支付
- personal_account_payment 个人账户支付
- cash_payment 个人现金支付
- individual_payment 个人自付
- personal_payment 个人自负
- self_payment 个人自费
- medical_record_number 病历号
- hospitalized_number 住院号
- hospitalization_department 住院科别
- hospitalization_date 住院时间
- advance_payment 预缴金额
- supplementary_payment 补缴金额
- refund_amount 退费金额
+ value string 识别字段结果
+ description string 识别字段中文描述
product_list array 表格信息(行输出)
+ key string 识别字段key
- project_code_table 表格项目编码
- project_name_table 表格项目名称
- unit_table 表格单位
- number_table 表格数量
- amount_table 表格金额
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_outpatient_medical_invoice

字段名 类型 描述
type string 切分后单张票据类型
- electronic_medical_invoice 电子医疗发票
item_list array
+ key string 识别字段key
- title 标题
- invoice_number 票据号码
- date 开票日期
- amount_char 合计大写
- amount_digital 合计小写
- cashier_company 收款单位
- cashier 收款人
- workflow_number 业务流水号
- patient_number 门诊号
- medical_institution_type 医疗机构类型
- medical_insurance_type 医保类型
- medical_insurance_number 医保编号
- sex 性别
- medical_pooling_payment 医保统筹基金支付
- personal_account_payment 个人账户支付
- cash_payment 个人现金支付
- personal_payment 个人自负
- self_payment 个人自费
+ value string 识别字段结果
+ description string 识别字段中文描述
product_list array 表格信息(行输出)
+ key string 识别字段key
- project_code_table 表格项目编码
- project_name_table 表格项目名称
- specs_table 表格规格
- unit_table 表格单位
- unit_price_table 表格单价
- number_table 表格数量
- amount_table 表格金额
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_inpatient_medical_invoice

字段名 类型 描述
type string 切分后单张票据类型
- electronic_medical_invoice 电子医疗发票
item_list array
+ key string 识别字段key
- title 标题
- invoice_number 票据号码
- date 开票日期
- amount_char 合计大写
- amount_digital 合计小写
- cashier_company 收款单位
- cashier 收款人
- workflow_number 业务流水号
- medical_institution_type 医疗机构类型
- medical_insurance_type 医保类型
- medical_insurance_number 医保编号
- sex 性别
- medical_pooling_payment 医保统筹基金支付
- personal_account_payment 个人账户支付
- cash_payment 个人现金支付
- medical_record_number 病历号
- hospitalized_number 住院号
- hospitalization_department 住院科别
- admission_date 住院日期
- discharge_date 住院日期
- advance_payment 预缴金额
- supplementary_payment 补缴金额
- refund_amount 退费金额
+ value string 识别字段结果
+ description string 识别字段中文描述
product_list array 表格信息(行输出)
+ key string 识别字段key
- project_name_table 表格项目名称
- amount_table 表格金额
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_ride_receipt

字段名 类型 描述
type string 切分后单张票据类型
- electronic_medical_invoice 电子医疗发票
item_list array
+ key string 识别字段key
- title 标题
- application_date 申请日期
- trip_date 行程日期
- trip_number 合计行程数量
- amount_total 合计金额
- phone_number 行程人手机号/预定人手机号
- other_expenses_total 其他费用合计
+ value string 识别字段结果
+ description string 识别字段中文描述
product_list array 表格信息(行输出)
+ key string 识别字段key
- serial_no_table 表格序号
- order_no_table 表格订单号
- service_type_table 表格订单/服务类型
- supplier_table 表格服务商
- car_type_table 表格车型
- departure_point_table 表格起点
- destination_table 表格终点
- city_table 表格城市
- driving_time_table 表格行驶时长
- order_time_table 表格下单时间
- pick_up_time_table 表格上车时间
- using_time_table 表格用车时间
- mileage_table 表格行程里程
- journey_amount_table 表格行程金额
- notes_table 表格备注
- other_expenses_table 表格其他费用
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_air_transport

字段名 类型 描述
type string 切分后单张票据类型
- air_transport 行程单
item_list array
+ key string 识别字段key
- agentcode 销售单位代号
- civil_aviation_fund 民航发展基金
- e_ticket_no 电子客票号码
- fare 票价
- fuel_surcharge 燃油附加费
- id_no 身份证件号码
- insurance
- issued_by 填开单位
- issued_date 填开日期
- other_taxes 其他税费
- passenger_name 旅客姓名
- restriction 签注
- serial_number 印刷序号
- total 合计金额
- exist_invoice_seal 发票专用章存在性判断
+ value string 识别字段结果
+ description string 识别字段中文描述
flight_data_list array 飞机行程单中行本信息(行输出)
+ key string 识别字段key
- from 出发站
- to 到达站
- carrier 承运人
- flight_number 航班号
- seat_class 座位等级
- date 航班日期
- time 航班时间
- fare_basis 客票级别
- allow 行李
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_general_machine_invoice

字段名 类型 描述
type string 切分后单张票据类型
- general_machine_invoice 通用机打发票
item_list array
+ key string 识别字段key
- invoice_code 发票代码
- invoice_number 发票号码
- money 金额
- date 日期
- time 时间
- buyer 付款方名称
- buyer_tax_id 付款方证件号
- seller 收款方名称
- seller_tax_id 收款方证件号
- machine_printed_number 机打号码
- exist_invoice_seal 发票专用章存在性判断
- title 标题
- exist_manufacture_supervising_seal 监制章存在性判断
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_highway_passenger_invoice

字段名 类型 描述
type string 切分后单张票据类型
- highway_passenger_invoice 公路客运发票
item_list array
+ key string 识别字段key
- invoice_code 发票代码
- invoice_number 发票号码
- money 金额
- date 日期
- time 时间
- passenger_name 乘客姓名
- passenger_id 乘客身份证号码
- exist_invoice_seal 发票专用章存在性判断
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_motor_vehicle_sale_invoice

字段名 类型 描述
type string 切分后单张票据类型
- motor_vehicle_sale_invoice 机动车销售统一发票
item_list array
+ key string 识别字段key
- type 类型
- vehicle_invoice_buyer 购方名称
- vehicle_invoice_buyer_id 购方身份证号码/组织机构代码
- vehicle_invoice_buyer_tax_id 购方纳税人识别号
- vehicle_invoice_car_made_place 产地
- vehicle_invoice_car_model 厂牌型号
- vehicle_invoice_car_vin 车辆识别代号/车驾号码
- vehicle_invoice_cert_id 合格证号
- vehicle_invoice_commodity_inspection_id 商检单号
- vehicle_invoice_daima 发票代码
- vehicle_invoice_dealer 销方名称
- vehicle_invoice_engine_id 发动机号码
- vehicle_invoice_haoma 发票号码
- vehicle_invoice_import_certificate_id 进口证明书号
- vehicle_invoice_issue_date 开票日期
- vehicle_invoice_issued_by 开票人
- vehicle_invoice_jida_daima 机打代码
- vehicle_invoice_jida_haoma 机打号码
- vehicle_invoice_limit_number 限乘人数
- vehicle_invoice_machine_id 机器编号
- vehicle_invoice_page_number 发票联
- vehicle_invoice_price_without_tax 不含税价
- vehicle_invoice_qr_code 二维码
- vehicle_invoice_seller_address 销方地址
- vehicle_invoice_seller_bank_account 销方账号
- vehicle_invoice_seller_bank_name 销方开户银行
- vehicle_invoice_seller_tax_id 销方纳税人识别号
- vehicle_invoice_tax_amount 增值税税额
- vehicle_invoice_tax_author_id 主管税务机关代码
- vehicle_invoice_tax_author_name 主管税务机关
- vehicle_invoice_tax_authorith 主管税务机关
- vehicle_invoice_tax_authorith_id 主管税务机关代码
- vehicle_invoice_tax_code 税控码
- vehicle_invoice_tax_payment_certificate_number 完税凭证号
- vehicle_invoice_tax_rate 增值税税率
- vehicle_invoice_telephone 销方电话
- vehicle_invoice_tonnage 吨位
- vehicle_invoice_total_price 价税合计
- vehicle_invoice_total_price_digits 价税合计小写
- vehicle_invoice_vehicle_type 车辆类型
- exist_invoice_seal 发票专用章存在性判断
- digital_elec_invoice_number 数电票号码
- exist_manufacture_supervising_seal 监制章存在性判断
- exist_stample 盖章存在性判断
- invoice_type 发票类型
- title 标题
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_non_tax_income_unified_bill

字段名 类型 描述
type string 切分后单张票据类型
- non_tax_income_unified_bill 非税收入票据
item_list array
+ key string 识别字段key
- PayerPartyName 交款人名称
- EInvoiceNumber 电子票据号码
- RandomNumber 校验码
- IssuedDate 开票日期
- ItemCode 项目编码
- ItemName 项目名称
- ItemUnit 单位
- ItemQuantity 数量
- ItemStd 标准
- ItemAmount 金额
- ItemExt 明细信息扩展
- TotalAmount_Words 金额大写
- TotalAmount 总金额
- Checker 复核人
- EInvoiceCode 电子票据代码
- PayerPartyCode 交款人代码
- RecName 收款人全称
- InvoicingPartyName 开票单位名称
- Remark 备注
- exist_manufacture_supervising_seal 监制章存在性判断
- title 标题
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_parking_invoice

字段名 类型 描述
type string 切分后单张票据类型
- parking_invoice 停车费发票
item_list array
+ key string 识别字段key
- invoice_number 发票号码
- money 金额
- exist_invoice_seal 发票专用章存在性判断
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_passenger_transport_invoice

字段名 类型 描述
type string 切分后单张票据类型
- passenger_transport_invoice 旅客运输普票
item_list array
+ key string 识别字段key
- invoice_code 发票代码
- invoice_number 发票号码
- money 金额
- date 日期
- time 时间
- passenger_name 乘客姓名
- passenger_id 乘客身份证号码
- exist_invoice_seal 发票专用章存在性判断
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_quota_invoice

字段名 类型 描述
type string 切分后单张票据类型
- quota_invoice 通用定额发票
item_list array
+ key string 识别字段key
- quota_invoice_code 发票代码
- quota_invoice_number 发票号码
- location 发票所在地
- money_small 金额(小写)
- money_big 金额(大写)
- exist_invoice_seal 发票专用章存在性判断
- title 标题
- exist_manufacture_supervising_seal 监制章存在性判断
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_shipping_invoice

字段名 类型 描述
type string 切分后单张票据类型
- shipping_invoice 船运客票
item_list array
+ key string 识别字段key
- invoice_code 发票代码
- invoice_number 发票号码
- money 总金额
- date 日期
- time 时间
- passenger 乘船人
- departure 出发点
- arrival 到达点
- exist_invoice_seal 发票专用章存在性判断
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_taxi_ticket

字段名 类型 描述
type string 切分后单张票据类型
- taxi_ticket 出租车发票
item_list array
+ key string 识别字段key
- invoice_code 发票代码
- invoice_no 发票号码
- date 日期
- taxi_no 车号
- boarding_time 上车时间
- landing_time 下车时间
- mileage 里程
- sum 总计金额
- price 票面金额
- oil 燃油附加费
- location 发票所在地
- exist_invoice_seal 发票专用章存在性判断
- call_service_surcharge 电召费
- exist_manufacture_supervising_seal 监制章存在性判断
- service_surcharge 服务费
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_train_ticket

字段名 类型 描述
type string 切分后单张票据类型
- train_ticket 火车票
item_list array
+ key string 识别字段key
- ticket_number 火车票红色编码
- boarding_gate 检票口
- check 检票口
- departure_station 出发地
- train_number 车次号
- arrival_station 目的地
- departure_date 乘车时间
- seat_number 座位号
- price 价格
- class 座位类别
- passenger_id 乘客身份证
- passenger_name 乘客名称
- ticket_id 火车票ID
- code 发票代码
- number 发票号码(ticket_id后七位)
- is_refund 是否退票费
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_used_car_purchase_invoice

字段名 类型 描述
type string 切分后单张票据类型
- used_car_purchase_invoice 二手车销售统一发票
item_list array
+ key string 识别字段key
- type 类型
- vehicle_invoice_auction_house 经营、拍卖单位
- vehicle_invoice_auction_house_addr 经营、拍卖单位地址
- vehicle_invoice_auction_house_bank_account 经营、拍卖单位开户银行、账号
- vehicle_invoice_auction_house_phone 经营、拍卖单位电话
- vehicle_invoice_auction_house_tax_id 经营、拍卖单位纳税人识别号
- vehicle_invoice_buyer 买方单位/个人
- vehicle_invoice_buyer_addr 买方地址
- vehicle_invoice_buyer_id 买方单位代码/身份证号码
- vehicle_invoice_buyer_phone 买方电话号码
- vehicle_invoice_car_model 厂牌型号
- vehicle_invoice_daima 发票代码
- vehicle_invoice_dmv 转入地车辆管理所名称
- vehicle_invoice_haoma 发票号码
- vehicle_invoice_issue_date 开票日期
- vehicle_invoice_market 二手车市场
- vehicle_invoice_market_addr 二手车市场地址
- vehicle_invoice_market_bank_acount 二手车市场开户银行、账号
- vehicle_invoice_market_phone 二手车市场电话
- vehicle_invoice_market_tax_id 二手车市场纳税人识别号
- vehicle_invoice_note 备注
- vehicle_invoice_plate_num 车牌照号
- vehicle_invoice_price_total_price 车价合计
- vehicle_invoice_qr_code 二维码
- vehicle_invoice_register_num 登记证号
- vehicle_invoice_seller 卖方单位/个人
- vehicle_invoice_seller_addr 卖方地址
- vehicle_invoice_seller_id 卖方单位代码/身份证号码
- vehicle_invoice_seller_phone 卖方电话号码
- vehicle_invoice_total_price_digits 车价合计小写
- vehicle_invoice_vehicle_type 车辆类型
- vehicle_invoice_vin 车架号/车辆识别代码
- exist_invoice_seal 发票专用章存在性判断
- vehicle_invoice_machine_id 机器编号
- vehicle_invoice_tax_code 税控码
- digital_elec_invoice_number 数电票号码
- exist_manufacture_supervising_seal 监制章存在性判断
- invoice_type 发票类型
- title 标题
- vehicle_invoice_issued_by 开票人
- vehicle_invoice_jida_daima 机打代码
- vehicle_invoice_jida_haoma 机打号码
- vehicle_invoice_page_number 发票联次
- vehicle_invoice_shuikongma 税控码
- exist_stample 盖章存在性判断
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_vat_invoice_sales_list

字段名 类型 描述
type string 切分后单张票据类型
- vat_invoice_sales_list 增值税销货清单
item_list array
+ key string 识别字段key
- purchaser_name 购买方名称
- seller_name 销售方名称
- invoice_code 发票代码
- invoice_number 发票号码
- total_page 合计页码
- page 当前页码
- total 金额合计
- tax_total 税额合计
- has_stamp 销售方盖章存在性判断
- issued_date 填开日期
- exist_invoice_seal 发票专用章存在性判断
- tax_subtotal 税额小计
- subtotal 金额小计
- remarks 备注
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_vat_roll_invoice

字段名 类型 描述
type string 切分后单张票据类型
- vat_roll_invoice 增值税卷式发票
item_list array
+ key string 识别字段key
- invoice_head 发票票头
- invoice_code 发票代码
- invoice_number 发票号码
- machine_number 机器号码
- machine_code 机器编码
- sold_name 销方名称
- sold_tax_number 销方纳税人识别号
- date_of_invoice 开票日期
- cashier_name 收款员
- buy_name 购方名称
- buy_tax_number 购方纳税人识别号
- goods_name_list 项目名称明细
- goods_unit_price_list 项目单价明细
- goods_number_list 项目数量明细
- goods_money_list 项目金额明细
- total_money 合计金额(小写)
- total_money_big 合计金额(大写)
- check_number 校验码
- exist_invoice_seal 发票专用章存在性判断
- vat_invoice_seller_id_invoice_seal 销售方纳税人识别号-印章
- invoice_type 发票类型
- exist_manufacture_supervising_seal 监制章存在性判断
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_vat_transport_invoice

字段名 类型 描述
type string 切分后单张票据类型
- vat_transport_invoice 货物运输业增值税专用发票
item_list array
+ key string N/A
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_vehicle_toll

字段名 类型 描述
type string 切分后单张票据类型
- vehicle_toll 过路过桥费发票/汽车通行费
item_list array
+ key string 识别字段key
- toll_code 车辆通行费代码
- toll_number 车辆通行费号码
- money 收费金额
- date 收费日期
- time 收费时间
- exist_invoice_seal 发票专用章存在性判断
- location 发票所在地
- exist_manufacture_supervising_seal 监制章存在性判断
- entrance 入口
- exit 出口
+ value string 字段识别结果
+ description string 识别字段中文描述

Type_vat_invoice

字段名 类型 描述
type string 切分后单张票据类型
- blockchain_electronic_invoice 区块链电子发票
- machine_printed_invoice 机打发票
- vat_common_invoice 增值税普通发票
- vat_special_invoice 增值税专用发票
- vat_electronic_invoice 增值税电子普通发票
- vat_electronic_special_invoice 增值税电子专用发票
- vat_electronic_invoice_new 电子发票(普通发票)
- vat_electronic_special_invoice_new 电子发票(增值税专用发票)
- vat_electronic_toll_invoice 增值税电子普通发票(通行费)
item_list array
+ key string 识别字段key
- vat_invoice_cipher_field 密码区
- vat_invoice_correct_code 校验码
- vat_invoice_corrent_code_print 打印校验码
- vat_invoice_credit_memo 红冲/非红冲
- vat_invoice_dai_kai_flag 代开(非代开条目为空)
- vat_invoice_daima 发票代码
- vat_invoice_daima_print 打印发票代码
- vat_invoice_daima_right_side 右侧打印发票代码
- vat_invoice_drawer 开票人
- vat_invoice_elec_payment_id 购买方电子支付标识
- vat_invoice_electrans_quantity 数量
- vat_invoice_electrans_unit 单位
- vat_invoice_electrans_unit_price 单价
- vat_invoice_goods_list 货物或应税劳务、服务名称/项目名称
- vat_invoice_goods_type_list 类型
- vat_invoice_haoma 发票号码
- vat_invoice_haoma_large_size 增值税发票No号码
- vat_invoice_haoma_right_side 右侧打印发票号码
- vat_invoice_headline_page_number 标题发票联
- vat_invoice_issue_date 开票日期
- vat_invoice_issue_date_print 右侧打印开票日期
- vat_invoice_license_plate_number 车牌号
- vat_invoice_machine_no 机器编号
- vat_invoice_note_correct_code 备注校验码
- vat_invoice_page_number 发票联/抵扣联
- vat_invoice_pass_end_date 通行日期止
- vat_invoice_pass_start_date 通行日期起
- vat_invoice_payee 收款人
- vat_invoice_payer_addr_tell 购买方地址、电话
- vat_invoice_payer_bank_account 购买方开户行及账号
- vat_invoice_payer_name 购买方名称
- vat_invoice_plate_specific 规格型号
- vat_invoice_price_list 金额明细
- vat_invoice_qr_code qr码
- vat_invoice_rate_payer_id 购买方纳税人识别号
- vat_invoice_review 复核
- vat_invoice_seller_addr_tell 销售方地址、电话
- vat_invoice_seller_bank_account 销售方开户行及账号
- vat_invoice_seller_id 销售方纳税人识别号
- vat_invoice_seller_name 销售方名称
- vat_invoice_tax_list 税额明细
- vat_invoice_tax_rate 税率
- vat_invoice_tax_rate_list 税率明细
- vat_invoice_tax_total 税额合计
- vat_invoice_total 合计
- vat_invoice_total_cover_tax 价税合计大写
- vat_invoice_total_cover_tax_digits 价税合计小写
- vat_invoice_total_note 备注
- vat_invoice_total_print 打印合计
- exist_stample 盖章存在性判断
- exist_invoice_seal 发票专用章存在性判断
- vat_invoice_note_handwrite 备注手写
- vat_invoice_seller_id_invoice_seal 销售方纳税人识别号-印章
- vat_invoice_quandianfapiao_flag 判断是否全电票
- exist_manufacture_supervising_seal 监制章存在性判断
- digital_elec_invoice_number 数电票号码
- is_oil_products 是否成品油
- invoice_type 发票类型
- title 标题
- vat_invoice_service_type 全电票标签
- vat_invoice_subtotal 金额小计
- vat_invoice_tax_subtotal 税额小计
+ value string 字段识别结果
+ description string 识别字段中文描述
product_list array 增票中商品信息(行输出)
+ key string 识别字段key
- vat_invoice_goods 货物或服务名称
- vat_invoice_tax 税额明细
- vat_invoice_tax_rate 税率明细
- vat_invoice_price 金额明细
- vat_invoice_electrans_unit_price 单价明细
- vat_invoice_electrans_quantity 数量明细
- vat_invoice_electrans_unit 单位明细
- vat_invoice_plate_specific 规格型号
- vat_invoice_goods_type 类型
- vat_invoice_license_plate_number 车牌号
- vat_invoice_pass_end_date 通行日期止
- vat_invoice_pass_start_date 通行日期起
+ value string 字段识别结果
+ description string 字段中文描述

TypeOther

字段名 类型 描述
type string 切分后单张票据类型
- other 其他票据

JSON结构示例

{"message":"success","cost_time":735,"result":{"object_list":[{"type":"","type_description":"","image_angle":0,"rotated_image_width":77814075,"rotated_image_height":35139295,"class":"","kind":"","kind_description":"","position":[-19146653],"image":"","lines":[{"text":"","poly":[-84224702],"score":0.0913783623765776,"handwritten":2,"char_centers":[[-78878407]],"char_polygons":[[82935450]],"char_candidates":[[""]],"char_candidates_score":[[-59725494.92140589]],"char_scores":[7050395.016493827],"angle":180,"property":-33206189,"attributes":{"print":96124496}}]}]},"code":200,"ppi":400}

错误码说明

错误码 描述
40101 x-ti-app-id 或 x-ti-secret-code 为空
40102 x-ti-app-id 或 x-ti-secret-code 无效,验证失败
40103 客户端IP不在白名单
40003 余额不足,请充值后再使用
40004 参数错误,请查看技术文档,检查传参
40007 机器人不存在或未发布
40008 机器人未开通,请至市场开通后重试
40301 文件类型不支持,接口会返回实际检测到的文件类型,如“当前文件类型为.gif”
40302 上传文件大小不符,文件大小不超过 10M
40303 文件类型不支持
40304 图片尺寸不符,图像宽高须介于 20 和 10000(像素)之间
40305 识别文件未上传
40400 无效的请求链接,请检查链接是否正确
30203 基础服务故障,请稍后重试
500 服务器内部错误
人工咨询
技术交流群

联系我们