文档中心
API调试

功能描述

电子承兑汇票

请求URL

https://api.textin.com/ai/service/v1.1/acceptance_bill

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格式.

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

响应体说明(Response Data)

Content-Type: application/json

JSON结构说明如下:

字段名 类型 描述
code integer 错误码,详见“错误码说明”
message string

错误信息

duration number

响应时间(s)

result object
+ details object

图片OCR识别结果

   ++ issue_date object

出票日期

    +++ position

识别的value在原图中的坐标是个长度为8的数组 [0,1,2,3,4,5,6,7]

  • (0, 1) 左上角坐标
  • (2, 3) 右上角坐标
  • (4, 5) 右下角坐标
  • (6, 7) 左下角坐标
    +++ value string

结构化结果字段的值

    +++ confidence number

字段置信度

    +++ description string

字段的中文描述

   ++ bill_status object

票据状态

   ++ due_date object

汇票到期日

   ++ bill_number object

票据号码

   ++ bill_number_2 object

票据号码2

   ++ drawer_name object

出票人全称

   ++ payee_name object

收款人全称

   ++ drawer_account object

出票人账号

   ++ payee_account object

收款人账号

   ++ drawer_bank object

出票人开户银行

   ++ payee_bank object

收款人开户银行

   ++ bill_amount object

票据金额

   ++ bill_amount_small object

票据金额-小写

   ++ acceptance_date object

承兑日期

   ++ acceptor_full_name object

承兑人信息-全称

   ++ acceptor_account_bank_name object

承兑人信息-开户行名称

   ++ acceptor_account_number object

承兑人信息-账号

   ++ acceptor_account_bank_number object

承兑人信息-开户行行号

   ++ contract_number object

交易合同号

   ++ can_transfer object

能否转让

   ++ drawer_commit object

出票人承诺

   ++ acceptor_commit object

承兑人承诺

   ++ guarantor_name object

出票保证信息-保证人名称

   ++ guarantor_address object

出票保证信息-保证人地址

   ++ guarantee_date object

出票保证信息-保证日期

   ++ acceptor_guarantor_name object

承兑保证信息-保证人名称

   ++ acceptor_guarantor_address object

承兑保证信息-保证人地址

   ++ acceptor_guarantee_date object

承兑保证信息-保证日期

   ++ drawer_account_bank_number object

出票人开户行号

   ++ payee_account_bank_number object

收款人开户行号

   ++ drawer_rating_main object

出票人评级主体

   ++ drawer_rating_level object

出票人评级等级

   ++ drawer_rating_due_date object

出票人评级到期日

   ++ payee_rating_main object

收款人评级主体

   ++ payee_rating_level object

收款人评级等级

   ++ payee_rating_due_date object

收款人评级到期日

   ++ acceptor_rating_main object

承兑人评级主体

   ++ acceptor_rating_level object

承兑人评级等级

   ++ acceptor_rating_due_date object

承兑人评级到期日

   ++ display_date object

显示日期

   ++ endorsement_date object

背书日期

   ++ endorser_name object

背书人名称

   ++ endorsed_name object

被背书人名称

   ++ drawer_access_institution object

出票人接入机构

   ++ payee_access_institution object

收款人接入机构

   ++ acceptor_access_institution object

承兑人信息-接入机构

   ++ standard_amount object

标准金额

+ type string
+ image_angle integer

图片角度,指原图需要经过顺时针旋转多少度,才能得到正方向的图片

+ rotated_image_width integer

正方向时图片的宽

+ rotated_image_height integer

正方向时图片高

JSON结构示例

{"code":200,"message":"success","duration":0.636,"result":{"details":{"issue_date":{"position":[0,0,50,0,50,50,0,50],"value":"2021年11月4日","confidence":0.9,"description":"出票日期"},"bill_status":{"position":[0,0,50,0,50,50,0,50],"value":"已承兑","confidence":0.9,"description":"票据状态"},"due_date":{"position":[0,0,50,0,50,50,0,50],"value":"2021年11月4日","confidence":0.9,"description":"汇票到期日"},"bill_number":{"position":[0,0,50,0,50,50,0,50],"value":"0123-456789","confidence":0.9,"description":"票据号码"},"bill_number_2":{"position":[0,0,50,0,50,50,0,50],"value":"0-1-2","confidence":0.9,"description":"票据号码2"},"drawer_name":{"position":[0,0,50,0,50,50,0,50],"value":"合小合","confidence":0.9,"description":"出票人全称"},"payee_name":{"position":[0,0,50,0,50,50,0,50],"value":"合小合","confidence":0.9,"description":"收款人全称"},"drawer_account":{"position":[0,0,50,0,50,50,0,50],"value":"0123456789","confidence":0.9,"description":"出票人账号"},"payee_account":{"position":[0,0,50,0,50,50,0,50],"value":"0123456789","confidence":0.9,"description":"收款人账号"},"drawer_bank":{"position":[0,0,50,0,50,50,0,50],"value":"YYY","confidence":0.9,"description":"出票人开户银行"},"payee_bank":{"position":[0,0,50,0,50,50,0,50],"value":"YYY","confidence":0.9,"description":"收款人开户银行"},"bill_amount":{"position":[0,0,50,0,50,50,0,50],"value":"壹佰元整","confidence":0.9,"description":"票据金额"},"bill_amount_small":{"position":[0,0,50,0,50,50,0,50],"value":"¥100","confidence":0.9,"description":"票据金额-小写"},"acceptance_date":{"position":[0,0,50,0,50,50,0,50],"value":"2021年11月4日","confidence":0.9,"description":"承兑日期"},"acceptor_full_name":{"position":[0,0,50,0,50,50,0,50],"value":"合小合","confidence":0.9,"description":"承兑人信息-全称"},"acceptor_account_bank_name":{"position":[0,0,50,0,50,50,0,50],"value":"YYY","confidence":0.9,"description":"承兑人信息-开户行名称"},"acceptor_account_number":{"position":[0,0,50,0,50,50,0,50],"value":"0","confidence":0.9,"description":"承兑人信息-账号"},"acceptor_account_bank_number":{"position":[0,0,50,0,50,50,0,50],"value":"0123456789","confidence":0.9,"description":"承兑人信息-开户行行号"},"contract_number":{"position":[0,0,50,0,50,50,0,50],"value":"0","confidence":0.9,"description":"交易合同号"},"can_transfer":{"position":[0,0,50,0,50,50,0,50],"value":"可转让","confidence":0.9,"description":"能否转让"},"drawer_commit":{"position":[0,0,50,0,50,50,0,50],"value":"承诺","confidence":0.9,"description":"出票人承诺"},"acceptor_commit":{"position":[0,0,50,0,50,50,0,50],"value":"承诺","confidence":0.9,"description":"承兑人承诺"},"guarantor_name":{"position":[0,0,50,0,50,50,0,50],"value":"合小合","confidence":0.9,"description":"出票保证信息-保证人名称"},"guarantor_address":{"position":[0,0,50,0,50,50,0,50],"value":"XXX","confidence":0.9,"description":"出票保证信息-保证人地址"},"guarantee_date":{"position":[0,0,50,0,50,50,0,50],"value":"2021年11月4日","confidence":0.9,"description":"出票保证信息-保证日期"},"acceptor_guarantor_name":{"position":[0,0,50,0,50,50,0,50],"value":"合小合","confidence":0.9,"description":"承兑保证信息-保证人名称"},"acceptor_guarantor_address":{"position":[0,0,50,0,50,50,0,50],"value":"XXX","confidence":0.9,"description":"承兑保证信息-保证人地址"},"acceptor_guarantee_date":{"position":[0,0,50,0,50,50,0,50],"value":"2021年11月4日","confidence":0.9,"description":"承兑保证信息-保证日期"},"drawer_account_bank_number":{"position":[0,0,50,0,50,50,0,50],"value":"0123456789","confidence":0.9,"description":"出票人开户行号"},"payee_account_bank_number":{"position":[0,0,50,0,50,50,0,50],"value":"0123456789","confidence":0.9,"description":"收款人开户行号"},"drawer_rating_main":{"position":[0,0,0,0,0,0,0,0],"value":"","confidence":0,"description":"出票人评级主体"},"drawer_rating_level":{"position":[0,0,0,0,0,0,0,0],"value":"","confidence":0,"description":"出票人评级等级"},"drawer_rating_due_date":{"position":[0,0,50,0,50,50,0,50],"value":"2021年11月4日","confidence":0.9,"description":"出票人评级到期日"},"payee_rating_main":{"position":[0,0,50,0,50,50,0,50],"value":"合小合","confidence":0.9,"description":"收款人评级主体"},"payee_rating_level":{"position":[0,0,0,0,0,0,0,0],"value":"","confidence":0,"description":"收款人评级等级"},"payee_rating_due_date":{"position":[0,0,50,0,50,50,0,50],"value":"2021年11月4日","confidence":0.9,"description":"收款人评级到期日"},"acceptor_rating_main":{"position":[0,0,50,0,50,50,0,50],"value":"合小合","confidence":0.9,"description":"承兑人评级主体"},"acceptor_rating_level":{"position":[0,0,0,0,0,0,0,0],"value":"","confidence":0.9,"description":"承兑人评级等级"},"acceptor_rating_due_date":{"position":[0,0,50,0,50,50,0,50],"value":"2021年11月4日","confidence":0.9,"description":"承兑人评级到期日"},"display_date":{"position":[0,0,50,0,50,50,0,50],"value":"2021年11月4日","confidence":0.9,"description":"显示日期"},"endorsement_date":{"position":[0,0,50,0,50,50,0,50],"value":"2021年11月4日","confidence":0.9,"description":"背书日期"},"endorser_name":{"position":[0,0,50,0,50,50,0,50],"value":"合小合","confidence":0.9,"description":"背书人名称"},"endorsed_name":{"position":[0,0,50,0,50,50,0,50],"value":"合小合","confidence":0.9,"description":"被背书人名称"},"drawer_access_institution":{"position":[0,0,50,0,50,50,0,50],"value":"YYY","confidence":0.9,"description":"出票人接入机构"},"payee_access_institution":{"position":[0,0,50,0,50,50,0,50],"value":"YYY","confidence":0.9,"description":"收款人接入机构"},"acceptor_access_institution":{"position":[0,0,50,0,50,50,0,50],"value":"YYY","confidence":0.9,"description":"承兑人信息-接入机构"},"standard_amount":{"position":[0,0,50,0,50,50,0,50],"value":"YYY","confidence":0.9,"description":"标准金额"}},"type":"acceptance_bill","image_angle":0,"rotated_image_width":100,"rotated_image_height":100}}

错误码说明

错误码 描述
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 服务器内部错误
版本
v1.1
技术交流群
体验中心

联系我们