文档中心

- API文档
- 通用文字识别
- 身份证识别
- 通用表格识别
- 国内通用票据识别
- 营业执照识别
- 图片切边增强
- 发票验真
- 银行卡识别
- 行驶证识别
- 驾驶证识别
- 增值税发票识别
- 票据分类
- 机动车购车发票识别
- 车辆合格证识别
- 卷式发票识别
- 名片识别
- 车牌号识别
- 社保卡识别
- 护照识别
- 车辆VIN码识别
- 电子承兑汇票识别
- 车辆登记证识别
- 图片转word
- 二手车购车发票识别
- 证件分类
- 火车票识别
- 印章检测识别
- 出租车发票识别
- 税务登记证识别
- 组织机构代码证识别
- 开户许可证识别
- 通用NLP信息抽取
- 澳门身份证识别
- 港澳居民来往内地通行证
- 台湾居民来往大陆通行证识别
- 台湾身份证识别
- 马来西亚身份证识别
- 户口本识别
- 结婚证识别
- 房产证识别
- 军官证识别
- 飞机行程单识别
- 定额发票识别
- 通用机打发票识别
- 车辆通行费票据识别
- 商铺小票识别
- 公路客运发票识别
- 海关进出口货物报关单识别
- 卫生许可证识别
- 事业单位法人证识别
- 港澳台通行证识别
- 台湾健保卡识别
- 日本驾驶证识别
- 菲律宾身份证识别
- 医疗证件票据分类
- 香港身份证识别
- 办公文档识别
- 出生证明识别
- PS检测
- 不动产权证书识别
- 银行回执单识别
- 自动擦除手写文字
- 去屏幕纹
- 港澳台居民居住证
- 二维码识别
- 汽车商业险保单识别
- PDF转Word
- PDF转Excel
- PDF转PPT
- PDF转图片
- Word转PDF
- Excel转PDF
- 图片转PDF
- Word转图片
- 完税证明
- 文档图像切边矫正
- 图像水印去除
- 手写签名识别
- 区块链发票验真
- 印尼身份证
查看文档
示例代码
API调试
功能描述
增值税发票
请求URL
https://api.textin.com/robot/v1.0/api/vat_invoice
HTTP请求方法
HTTP POST
请求头说明(Request Header)
请在HTTP请求中添加以下自定义Header。
header 名 | 值 |
---|---|
x-ti-app-id | 请登录后前往 “工作台-账号设置-开发者信息” 查看 x-ti-app-id |
x-ti-secret-code | 请登录后前往 “工作台-账号设置-开发者信息” 查看 x-ti-secret-code |
请求体说明(Request Body)
Content-Type: application/octet-stream
要上传的图片,目前支持jpg, png, bmp, pdf(pdf只支持识别第一页), tiff, 单帧gif等大部分格式.
请注意,请求体的数据格式为文件的二进制流,非 FormData 或其他格式。文件大小不超过 10M,图像宽高须介于 20 和 10000(像素)之间。
响应体说明(Response Data)
Content-Type: application/json
JSON结构说明如下:
字段名 | 类型 | 描述 |
---|---|---|
code | integer | 错误码,详见“错误码说明” |
message | string |
错误信息 |
result | object | |
+type | string |
票据类型, 当为other的时候,代表无法识别的图片
|
+type_description | string |
证件类型type中文描述 |
+image_angle | integer |
图片角度,指原图需要经过顺时针旋转多少度,才能得到正方向的图片 |
+rotated_image_width | integer |
正方向时图片的宽 |
+rotated_image_height | integer |
正方向时图片高 |
+kind | string |
票据用途
|
+kind_description | string |
票据用途中文描述 |
+item_list | array | |
++key | string |
识别的字段 |
++value | string |
识别的字段的值 |
++description | string |
识别的字段中文描述 |
++position | array |
识别的value在原图中的坐标, 是个长度为8的数组 [0,1,2,3,4,5,6,7]
|
item_list 中识别字段的说明
字段名 | 描述 |
---|---|
type | 类型 |
vat_invoice_cipher_field | 密码区 |
vat_invoice_correct_code | 校验码 |
vat_invoice_corrent_code_print | 打印校验码 |
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_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_machine_no | 机器编号 |
vat_invoice_note_correct_code | 备注校验码 |
vat_invoice_page_number | 抵扣联/发票联 |
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 | 打印合计 |
vat_invoice_type | 发票类型 |
vat_invoice_zhuan_yong_flag | 专票/普票 |
exist_stample | 盖章存在性判断 |
vat_invoice_quandianfapiao_flag | 判断是否全电票 |
JSON结构示例
{
"code": 200,
"message": "success",
"result": {
"item_list": [
{
"key": ""
}
]
}
}
错误码说明
错误码 | 描述 |
---|---|
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 | 图片类型不支持 |
40302 | 上传文件大小不符,文件大小不超过 10M |
40303 | 文件类型不支持 |
40304 | 图片尺寸不符,图像宽高须介于 20 和 10000(像素)之间 |
40305 | 识别文件未上传 |
30203 | 基础服务故障,请稍后重试 |
500 | 服务器内部错误 |