ocr-查验-报销
<p>[TOC]</p>
<h5>简要描述</h5>
<ul>
<li>ocr-查验-报销</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://api2.taxdata.tax/new_api/ocr_reimbursement/reimburse</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>POST </li>
</ul>
<h5>请求参数</h5>
<pre><code>{
&quot;tax_id&quot;: &quot;用户税号&quot;, // 税号 可选
&quot;company_name&quot;: &quot;公司名称&quot;, // 公司名 可选
&quot;reimbursement_bill_no&quot;: &quot;报销单号&quot;, // string类型 必填
&quot;reimbursement_amount&quot;: &quot;报销金额&quot;, // string类型 必填
&quot;image_url&quot;: &quot;图片url&quot;, // string类型 image_url和image_data二选一 优先取image_url 如果两个都传入值, 优先取image_url
&quot;image_data&quot;: &quot;图片base64&quot;, // string类型 image_url和image_data二选一
}</code></pre>
<h5>返回示例</h5>
<pre><code>
{
&quot;code&quot;: 0, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重正常&quot;,
&quot;check_msg&quot;: &quot;防重正常&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 400,
&quot;invoice&quot;: 专用发票(01、08)、普通发票(04)、电子发票(10)、卷票(11)如下:{
&quot;xdpbz&quot;: &quot;数电票标志&quot;, // 1=数电票,其他=非数电
&quot;cycs&quot;: &quot;查验次数&quot;,
&quot;fpdm&quot;: &quot;发票代码&quot;,
&quot;fphm&quot;: &quot;发票号码&quot;,
&quot;kprq&quot;: &quot;开票日期&quot;, # 2017-06-09
&quot;gfmc&quot;: &quot;购方名称&quot;,
&quot;gfsh&quot;: &quot;购方税号&quot;,
&quot;gfdzdh&quot;: &quot;购方地址电话&quot;,
&quot;gfyhzh&quot;: &quot;购方银行账号&quot;,
&quot;xfmc&quot;: &quot;销方名称&quot;,
&quot;xfsh&quot;: &quot;销方税号&quot;,
&quot;xfdzdh&quot;: &quot;销方地址电话&quot;,
&quot;xfyhzh&quot;: &quot;销方银行账户&quot;,
&quot;bz&quot;: &quot;备注&quot;,
&quot;jqbm&quot;: &quot;机器编码&quot;,
&quot;fplx&quot;: &quot;发票类型&quot;,
&quot;jym&quot;: &quot;校验码&quot;,
&quot;zfbz&quot;: &quot;作废标志&quot;, // Y:已作废 N:未作废 3:红冲
&quot;txfbz&quot;: &quot;通行费标志&quot;, // Y: 是 N:否
&quot;cpybz&quot;: &quot;成品油标志&quot;, // Y: 是 N:否
&quot;pdfurl&quot;: &quot;PDF版式文件下载地址&quot;,
&quot;ofdurl&quot;: &quot;OFD版式文件下载地址&quot;,
&quot;qdbz&quot;: &quot;清单标志&quot;, // Y: 有清单 N:无清单 卷票无
&quot;qdbt&quot;: &quot;清单标题&quot;, // 卷票无
&quot;qdslv&quot;: &quot;清单税率&quot;, // 卷票无
&quot;sph&quot;: [
{
&quot;xh&quot;: &quot;序号&quot;,
&quot;spmc&quot;: &quot;商品名称&quot;,
&quot;ggxh&quot;: &quot;规格型号&quot;,
&quot;jldw&quot;: &quot;计量单位&quot;,
&quot;sl&quot;: &quot;数量&quot;,
&quot;dj&quot;: &quot;不含税单价&quot;,
&quot;je&quot;: &quot;金额&quot;,
&quot;slv&quot;: &quot;税率&quot;, // 如 17%
&quot;se&quot;: &quot;税额&quot;,
&quot;ssflbm&quot;: &quot;税收分类编码&quot;,
&quot;hsje&quot;: &quot;含税金额&quot;, // 卷票有此字段
},
{
&quot;xh&quot;: &quot;序号&quot;,
&quot;spmc&quot;: &quot;商品名称&quot;,
&quot;ggxh&quot;: &quot;规格型号&quot;,
&quot;jldw&quot;: &quot;计量单位&quot;,
&quot;sl&quot;: &quot;数量&quot;,
&quot;dj&quot;: &quot;不含税单价 &quot;,
&quot;je&quot;: &quot;金额&quot;,
&quot;slv&quot;: &quot;税率&quot;, // 如 17%
&quot;se&quot;: &quot;税额&quot;,
&quot;ssflbm&quot;: &quot;税收分类编码&quot;,
&quot;hsje&quot;: &quot;含税金额&quot;, // 卷票有此字段
}
&quot;je&quot;: &quot;不含税金额&quot;,
&quot;se&quot;: &quot;税额&quot;,
&quot;jshj&quot;: &quot;价税合计&quot;,
&quot;ypt_if_fpcy&quot;: 0 // 云票通是否已查验过, 0=未查验过, 1=已查验过
}
-------------------
机动车发票(03)如下:{
&quot;cycs&quot;: &quot;查验次数&quot;,
&quot;fpdm&quot;: &quot;发票代码&quot;,
&quot;fphm&quot;: &quot;发票号码&quot;,
&quot;kprq&quot;: &quot;开票日期&quot;,
&quot;gfmc&quot;: &quot;购方名称&quot;,
&quot;sfz&quot;: &quot;身份证/组织机构代码&quot;,
&quot;gfsh&quot;: &quot;购方税号&quot;,
&quot;jqbm&quot;: &quot;机器编码&quot;,
&quot;cllx&quot;: &quot;车辆类型&quot;,
&quot;cpxh&quot;: &quot;车牌型号&quot;,
&quot;cd&quot;: &quot;产地&quot;,
&quot;hgzh&quot;: &quot;合格证号&quot;,
&quot;sjdh&quot;: &quot;商检单号&quot;,
&quot;fdjhm&quot;: &quot;发动机号码&quot;,
&quot;clsbdh&quot;: &quot;车辆识别代号&quot;,
&quot;jkzmsh&quot;: &quot;进口证明书号&quot;,
&quot;xfmc&quot;: &quot;销方名称&quot;,
&quot;xfsh&quot;: &quot;销方税号&quot;,
&quot;dz&quot;: &quot;地址&quot;,
&quot;dh&quot;: &quot;电话&quot;,
&quot;khyh&quot;: &quot;开户银行&quot;,
&quot;zh&quot;: &quot;账号&quot;,
&quot;zgswjg&quot;: &quot;主管税务机关&quot;,
&quot;zgswjgdm&quot;: &quot;主管税务机关代码&quot;,
&quot;wspzhm&quot;: &quot;完税凭证号码&quot;,
&quot;dw&quot;: &quot;吨位&quot;,
&quot;xcrs&quot;: &quot;限乘人数&quot;,
&quot;fplx&quot;: &quot;发票类型&quot;, // 03 增值税普通机动车发票
&quot;zfbz&quot;: &quot;作废标志&quot;, // Y:已作废 N:未作废 3:红冲
&quot;sl&quot;: &quot;税率&quot;,
&quot;je&quot;: &quot;金额&quot;,
&quot;se&quot;: &quot;税额&quot;,
&quot;jshj&quot;: &quot;价税合计&quot;,
&quot;ypt_if_fpcy&quot;: 0 // 云票通是否已查验过, 0=未查验过, 1=已查验过
}
---------------
货运发票(02)如下:{
&quot;cycs&quot;: &quot;查验次数&quot;,
&quot;fpdm&quot;: &quot;发票代码&quot;,
&quot;fphm&quot;: &quot;发票号码&quot;,
&quot;kprq&quot;: &quot;开票日期&quot;,
&quot;cyr&quot;: &quot;承运人&quot;,
&quot;cyrsh&quot;: &quot;承运人税号&quot;,
&quot;spf&quot;: &quot;实际受票方&quot;,
&quot;spfsh&quot;: &quot;实际受票方税号&quot;,
&quot;shr&quot;: &quot;收货人&quot;,
&quot;shrsh&quot;: &quot;收货人税号&quot;,
&quot;fhr&quot;: &quot;发货人&quot;,
&quot;fhrsh&quot;: &quot;发货人税号&quot;,
&quot;yshwxx&quot;: &quot;运输货物信息&quot;,
&quot;qyd&quot;: &quot;起运地、经由、到达地&quot;,
&quot;czch&quot;: &quot;车种车号&quot;,
&quot;dw&quot;: &quot;吨位&quot;,
&quot;zgswjg&quot;: &quot;主管税务机关&quot;,
&quot;zgswjgdm&quot;: &quot;主管税务机关代码&quot;,
&quot;jqbm&quot;: &quot;机器编码&quot;,
&quot;zfbz&quot;: &quot;作废标志&quot;, // Y:已作废 N:未作废 3:红冲
&quot;fplx&quot;: &quot;发票类型&quot;, // 02 增值税货运发票
&quot;sph&quot;: {
&quot;xh&quot;: &quot;序号&quot;,
&quot;spmc&quot;: &quot;费用类型&quot;,
&quot;je&quot;: &quot;金额&quot;,
}
&quot;sl&quot;: &quot;税率&quot;,
&quot;je&quot;: &quot;金额&quot;,
&quot;se&quot;: &quot;税额&quot;,
&quot;jshj&quot;: &quot;价税合计&quot;,
&quot;ypt_if_fpcy&quot;: 0 // 云票通是否已查验过, 0=未查验过, 1=已查验过
}
---------------
通行费发票(14)如下:{
&quot;cycs&quot;: &quot;查验次数&quot;,
&quot;fpdm&quot;: &quot;发票代码&quot;,
&quot;fphm&quot;: &quot;发票号码&quot;,
&quot;kprq&quot;: &quot;开票日期&quot;,
&quot;gfmc&quot;: &quot;购方名称&quot;,
&quot;gfsh&quot;: &quot;购方税号&quot;,
&quot;gfdzdh&quot;: &quot;购方地址电话&quot;,
&quot;gfyhzh&quot;: &quot;购方银行账号&quot;,
&quot;xfmc&quot;: &quot;销方名称&quot;,
&quot;xfsh&quot;: &quot;销方税号&quot;,
&quot;xfdzdh&quot;: &quot;销方地址电话&quot;,
&quot;xfyhzh&quot;: &quot;销方银行账户&quot;,
&quot;bz&quot;: &quot;备注&quot;,
&quot;jqbm&quot;: &quot;机器编码&quot;,
&quot;fplx&quot;: &quot;发票类型&quot;, // 14:通行费发票
&quot;jym&quot;: &quot;校验码&quot;,
&quot;zfbz&quot;: &quot;作废标志&quot;, // Y:已作废 N:未作废 3:红冲
&quot;sph&quot;: {
&quot;xh&quot;: &quot;序号&quot;,
&quot;xmmc &quot;: &quot;项目名称&quot;,
&quot;cph&quot;: &quot;车牌号&quot;,
&quot;lx&quot;: &quot;类型&quot;,
&quot;txrqq&quot;: &quot;通行日期起&quot;,
&quot;txrqz&quot;: &quot;通行日期止&quot;,
&quot;je&quot;: &quot;金额&quot;,
&quot;slv&quot;: &quot;税率&quot;, // 如 17% 不征税 征税
&quot;se&quot;: &quot;税额&quot;, // 注意内容有为 *** 情况
&quot;ssflbm&quot;: &quot;税收分类编码&quot;,
},
{
&quot;xh&quot;: &quot;序号&quot;,
&quot;xmmc &quot;: &quot;项目名称&quot;,
&quot;cph&quot;: &quot;车牌号&quot;,
&quot;lx&quot;: &quot;类型&quot;,
&quot;txrqq&quot;: &quot;通行日期起&quot;,
&quot;txrqz&quot;: &quot;通行日期止&quot;,
&quot;je&quot;: &quot;金额&quot;,
&quot;slv&quot;: &quot;税率&quot;, // 如 17% 不征税 征税
&quot;se&quot;: &quot;税额&quot;, // 注意内容有为 *** 情况
&quot;ssflbm&quot;: &quot;税收分类编码&quot;,
},
],
&quot;je&quot;: &quot;不含税金额&quot;,
&quot;se&quot;: &quot;税额&quot;,
&quot;jshj&quot;: &quot;价税合计&quot;,
&quot;ypt_if_fpcy&quot;: 0 // 云票通是否已查验过, 0=未查验过, 1=已查验过
}
------------------
二手车发票(15)如下:{
&quot;cycs&quot;: &quot;查验次数&quot;,
&quot;sj&quot;: &quot;所属税局&quot;,
&quot;fpdm&quot;: &quot;发票代码&quot;,
&quot;fphm&quot;: &quot;发票号码&quot;,
&quot;jqbm&quot;: &quot;机器编号&quot;,
&quot;fplx&quot;: &quot;发票类型&quot;, // 15 二手车销售统一发票
&quot;zfbz&quot;: &quot;作废标志&quot;, // Y 作废 N未作废 3:红冲
&quot;kprq&quot;: &quot;开票日期&quot;,
&quot;gfdw&quot;: &quot;买方单位/个人&quot;,
&quot;gfdwdm&quot;: &quot;买方单位代码/身份证号码&quot;,
&quot;gfdwdz&quot;: &quot;买方单位/个人地址&quot;,
&quot;gfdwdh&quot;: &quot;买方单位电话&quot;,
&quot;mfdw&quot;: &quot;卖方单位/个人&quot;,
&quot;mfdwdm&quot;: &quot;卖方单位代码/身份证号码&quot;,
&quot;mfdwdz&quot;: &quot;卖方单位/个人地址&quot;,
&quot;mfdwdh&quot;: &quot;卖方单位电话&quot;,
&quot;cpzh&quot;: &quot;车牌照号&quot;,
&quot;djzh&quot;: &quot;登记证号&quot;,
&quot;cllx&quot;: &quot;车辆类型&quot;,
&quot;cjh&quot;: &quot;车架号/车辆识别代码&quot;,
&quot;cpxh&quot;: &quot;厂牌型号&quot;,
&quot;zrdclgls&quot;: &quot;转入地车辆管理所名称&quot;,
&quot;cjhj&quot;: &quot;车价合计&quot;,
&quot;jydw&quot;: &quot;经营、拍卖单位&quot;,
&quot;jydwdz&quot;: &quot;经营、拍卖单位地址&quot;,
&quot;jydwnsrsbh&quot;: &quot;经营、拍卖单位纳税人识别号&quot;,
&quot;jydwkhyhzh&quot;: &quot;经营、拍卖单位开户银行、账号&quot;,
&quot;jydwdh&quot;: &quot;经营、拍卖单位电话&quot;,
&quot;escsc&quot;: &quot;二手车市场&quot;,
&quot;escnsrsbh&quot;: &quot;二手车市场纳税人识别号&quot;,
&quot;escdz &quot;: &quot;二手车市场地址&quot;,
&quot;esckhyhzh&quot;: &quot;二手车市场开户银行、账号&quot;,
&quot;escdh&quot;: &quot;二手车市场电话&quot;,
&quot;bz&quot;: &quot;备注&quot;,
&quot;ypt_if_fpcy&quot;: 0 // 云票通是否已查验过, 0=未查验过, 1=已查验过
}
}
{
&quot;code&quot;: 4001, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单异常: 请求报文错误, image_data和image_url不能同时为空&quot;,
&quot;check_msg&quot;: &quot;&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 5001, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单异常: 请求OCR错误&quot;,
&quot;check_msg&quot;: &quot;&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 5002, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单异常: 影像识别到多张发票&quot;,
&quot;check_msg&quot;: &quot;&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 5003, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单异常: ocr识别发票信息失败,无法继续防重处理&quot;,
&quot;check_msg&quot;: &quot;&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 5004, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重异常: 该发票识别所得金额为负数&quot;,
&quot;check_msg&quot;: &quot;&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 5005, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重异常: ocr未能获取到发票关键要素,无法继续防重处理&quot;,
&quot;check_msg&quot;: &quot;&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 5006, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重异常: 该发票已作废/已红冲&quot;,
&quot;check_msg&quot;: &quot;防重异常: 该发票已作废/已红冲&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 5007, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重异常: 发票查验(jshj={jshj})结果与OCR(total={total_amount})结果比对错误&quot;,
&quot;check_msg&quot;: &quot;防重异常: 发票查验(jshj={jshj})结果与OCR(total={total_amount})结果比对错误&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 5008, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重异常: 发票查验(sl={sl})处理错误&quot;,
&quot;check_msg&quot;: &quot;防重异常: 发票查验(sl={sl})处理错误&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 5010, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重异常: 查验错误&quot;,
&quot;check_msg&quot;: &quot;防重异常: 查验错误&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 406, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单异常: 报销单号{bill_no}已存在, 无法处理报销&quot;,
&quot;check_msg&quot;: &quot;&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 407, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重异常: 该发票号({invoice_number})已在审核流程中, 无法报销&quot;,
&quot;check_msg&quot;: &quot;防重异常: 该发票号({invoice_number})已在审核流程中, 无法报销&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 408, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重异常: 该发票号({invoice_number})报销已审核, 无法报销&quot;,
&quot;check_msg&quot;: &quot;防重异常: 该发票号({invoice_number})报销已审核, 无法报销&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 409, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重异常: 该发票号({invoice_number})已被占用,无法报销&quot;,
&quot;check_msg&quot;: &quot;防重异常: 该发票号({invoice_number})已被占用,无法报销&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 412, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重异常: 发票税号有误&quot;,
&quot;check_msg&quot;: &quot;防重正常&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 413, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单正常; 防重异常: 发票公司名称有误&quot;,
&quot;check_msg&quot;: &quot;防重正常&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
{
&quot;code&quot;: 500, // 0=正常 其他=失败
&quot;msg&quot;: &quot;报销单异常: 创建报销单失败, 请检查数据并重试&quot;
&quot;check_msg&quot;: &quot;&quot;,
&quot;amount_limit&quot;: 0,
&quot;invoice_amount&quot;: 0,
&quot;invoice&quot;: ...
}
</code></pre>