1、 通信约定
- 所有的调用都采用POST方式。
- 除了获取token接口外,都需要参数token(小写)
- 路径中不含127.0.0.1的参数路径前加前缀http://invoice.xinshui.com.cn,不是以JSON进行传送,表单方式提交值: 参数1=值1&参数2=值…… 方式传送,含有127.0.01的,都是以JSON进行传送。
- Content-Type:application/x-www-form-urlencoded;charset=UTF-8。
- 返回值是以JSON形式返回,返回值中都有Result和Message节点,Result=1时,表示调用成功,0表示失败,Message,为调用信息。
- 参数都是用小写,如果文档自动转换成大写,请忽略大写。
- 需要进行base64加密的报文,比如:FPKJ中的data参数,JSON节点都用大写。
- 参数字段说明中,如果没有 “是否必需” 这一列,说明是必需要有的。
- POSTMAN的具体调用如下:


- 所有用到Base64的地方,都采用utf-8字符集加密。
- token是需要放在head头部。
2、获取token
说明:获取平台token,有效期为一年,每次新的登陆会停止原有的token,在调用业务api时,如果返回中有Code字段(c是大写),并且Code值在2001-2009范围 ,那么需要重新获取一次token。
路径:http://invoice.xinshui.com.cn/NEWKP/LOGIN/GetToken
参数:UserName=[用户名]&Password1=[密码]
请求示例:UserName=TEST&Password1=Aa123456
返回值:
{
"Result": "1",
"Message": "系统登陆成功。",
"ID": "[mOqngQUp9/IS5qvk5VuiUZoViBuHCN787eXqq0HcopVCdw43ZKyS8uz10lRwlsu7STs4ckgbKvaqZfvi5IRdYT5MvswRBUuWhijy0MtCyDZ/GLsg0wTSh//Jh Kt/6w9/n7FKCmhTFt1FRff4ESG8BgdEYVxGq/hg3P ssuWoIE=~1064deb4d310430490cfa8237e4d5d84~190ACA1704AF55AA9FE1E8DE908C11044820A1B6C0E56F1E]"
}
返回值说明:
1、获取到的ID,用于以下接口的header头的token参数。
2、获取到的ID,前后是有[]括起来的,请不要去掉中括号。
3、所有接口头部都需要加上token,如下图:

2、发票查验
/NEWKP/JXFPAPI/FPCY
字段说明:
字段 | 是否必填项 | 字符类型 | 字符长度 | 描述 |
fpdm | 可选 | 发票代码;数电发票时可不传;注意机动车发票用纸质发票号码查验 | ||
fphm | 是 | 发票号码;数电发票时传20位;注意机动车发票用纸质发票号码查验 | ||
kprq | 是 | 开票日期,格式YYYYMMDD | ||
xym | 可选 | 校验码,除专票后,需要传这个,可以只传后6位 | ||
bhsje | 是 | 不含税金额;数电发票时需传含税金额 | ||
token | 是 | token |
返回参数
字段 | 字符类型 | 描述 |
resultCode | 查验结果:0000 查验成功,0001 代码号码输入错误, 0002 开票日期有误,0003 校验码必需输入\金额必需输入,0005 查无此票,0004/0006 系统异常,0008 超过查验次数,0009 查验不一致,0010/0011/0012 税务局异常 | |
resultTip | 查询结果的信息 | |
invoiceCode | 类型代码 | |
invoiceNo | 发票号码 | |
invoiceType | 发票种类01纸质发票(增值税专用发票)04纸质发票(普通发票)03机动车销售统一发票08电子发票(增值税专用发票)(电专)10电子发票(普通发票)14电子发票(普通发票-通行费)09全电发票,电子发票(增值税专用发票)、电子发票(普通发票)(需要再与realinvoiceType字段组合判断,realinvoiceType=08=全电专票;realinvoiceType=10=全电普票;) | |
realinvoiceType | 真实发票种类 | |
invoiceDate | 开票日期 | |
machineNo | 机器编码 | |
buyerName | 购买方名称 | |
salerName | 销方名称 | |
buyerTaxNo | 购买方税号 | |
buyerAddressPhone | 购买方地址电话 | |
buyerAccount | 购买方银行账号 | |
checkCode | 校验码 | |
checkCount | 查验次数 | |
salerTaxNo | 销方税号 | |
salerAddressPhone | 销方地址电话 | |
salerBankAccount | 销方银行账号 | |
cancellationMark | 作废标记 | |
invoiceAmount | 整张发票不含税金额 | |
taxAmount | 整张发票税额 | |
totalAmount | 整张发票价税合计 | |
hcbz | 红冲标记 | |
qdbz | 清单标记 | |
remark | 备注 | |
detailList | list | 明细 |
goodsName | 产品名称 | |
specificationModel | 产品型号 | |
unit | 计量单位 | |
num | 数量 | |
unitPrice | 单价 | |
detailAmount | 明细不含税金额 | |
taxRate | 税率 | |
taxAmount | 税额 | |
flbm | 分类编码 | |
detailNo | 明细行数 | |
bandModel | 厂牌型号 (机动车) | |
blueInvoiceCode | 蓝票发票代码 | |
blueInvoiceNo | 蓝票发票号码 | |
certificateOfImport | 进口证明(机动车) | |
commodityInspectionNo | 商检单号(机动车) | |
engineNo | 发动机号(机动车) | |
limitedPeopleCount | 限乘人数(机动车) | |
produceArea | 产地(机动车) | |
qualifiedNo | 合格证号(机动车) | |
salerAccount | 销方账号(机动车) | |
salerAddress | 销方地址(机动车) | |
salerBankName | 销方银行(机动车) | |
salerPhone | 销方电话(机动车) | |
vehicleIdentificationNo | 车架号(机动车) | |
vehicleTonnage | 吨位(机动车) | |
vehicleType | 车辆类型(机动车) | |
cjfy | 车架费用(机动车) |
请求体Body(完整的传入参数)响应示例
FPDM=[发票代码]&FPHM=[发票号码]&KPRQ=[开票日期]&XYM=[校验码]&BHSJE=[不含税金额]&token=
响应示例:
{
"invoiceCode": "044002300211",
"invoiceNo": "20313577",
"invoiceType": "10",
"realinvoiceType": "10",
"invoiceDate": "20240102",
"machineNo": "661840465301",
"buyerName": "惠州市都市康缘大药房有限公司大亚湾丽港山庄分店",
"salerName": "广东帝豪药业有限公司",
"khmc_ly": "1",
"khmc_redis": "",
"xfmc_redis": "广东帝豪药业有限公司",
"buyerTaxNo": "91441300MA52BR554R",
"buyerAddressPhone": "",
"buyerAccount": "",
"checkCode": "59249777454028895930",
"checkCount": 1,
"drawer": "",
"payee": "",
"reviewer": "",
"resultCode": "0000",
"resultTip": "查验成功发票一致",
"salerTaxNo": "914401067459551271",
"salerAddressPhone": "广州市黄埔区国际生物岛螺旋大道68号合景科盛广场A栋地上第7层01、02单元 020-89811503",
"salerBankAccount": "招商银行广州海珠支行120914388810902",
"cancellationMark": "0",
"invoiceAmount": "438.58",
"taxAmount": "57.01",
"totalAmount": "495.59",
"fplxdm": "",
"hcbz": "0",
"qdbz": "0",
"remark": "共3个订单:SKP2023c1075270,SKP2023c1075275,SKP2023c1075276",
"remark_b64": "5YWxM+S4quiuouWNle+8mlNLUDIwMjNjMTA3NTI3MCxTS1AyMDIzYzEwNzUyNzUsU0tQMjAyM2MxMDc1Mjc2",
"detailList": [
{
"goodsName": "中成药痛风舒片",
"specificationModel": "0.33g15片2板",
"unit": "盒",
"num": "4.00000000",
"unitPrice": "3.36250000",
"detailAmount": "13.45",
"taxRate": "13.0",
"taxAmount": "1.75",
"flbm": "1070304040000000000",
"detailNo": "1"
},
{
"goodsName": "中成药痛风舒片",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-0.27",
"taxRate": "13.0",
"taxAmount": "-0.03",
"flbm": "1070304040000000000",
"detailNo": "2"
},
{
"goodsName": "化学药品制剂转移因子口服溶液",
"specificationModel": "10ml6支", "unit": "盒", "num": "6.00000000", "unitPrice": "7.16833333", "detailAmount": "43.01", "taxRate": "13.0", "taxAmount": "5.59", "flbm": "1070302130000000000", "detailNo": "3" }, { "goodsName": "化学药品制剂转移因子口服溶液", "specificationModel": "", "unit": "", "num": "", "unitPrice": "", "detailAmount": "-0.85", "taxRate": "13.0", "taxAmount": "-0.11", "flbm": "1070302130000000000", "detailNo": "4" }, { "goodsName": "中成药复方枣仁胶囊", "specificationModel": "0.4g6粒",
"unit": "盒",
"num": "1.00000000",
"unitPrice": "30.87000000",
"detailAmount": "30.87",
"taxRate": "13.0",
"taxAmount": "4.01",
"flbm": "1070304080000000000",
"detailNo": "5"
},
{
"goodsName": "中成药复方枣仁胶囊",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-0.61",
"taxRate": "13.0",
"taxAmount": "-0.08",
"flbm": "1070304080000000000",
"detailNo": "6"
},
{
"goodsName": "中成药连花清瘟胶囊",
"specificationModel": "0.35g12粒2板",
"unit": "盒",
"num": "9.00000000",
"unitPrice": "9.42444444",
"detailAmount": "84.82",
"taxRate": "13.0",
"taxAmount": "11.03",
"flbm": "1070304080000000000",
"detailNo": "7"
},
{
"goodsName": "中成药连花清瘟胶囊",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-1.69",
"taxRate": "13.0",
"taxAmount": "-0.22",
"flbm": "1070304080000000000",
"detailNo": "8"
},
{
"goodsName": "化学药品制剂双氯芬酸钠缓释片",
"specificationModel": "75mg10片", "unit": "盒", "num": "3.00000000", "unitPrice": "24.33666667", "detailAmount": "73.01", "taxRate": "13.0", "taxAmount": "9.49", "flbm": "1070302050000000000", "detailNo": "9" }, { "goodsName": "化学药品制剂双氯芬酸钠缓释片", "specificationModel": "", "unit": "", "num": "", "unitPrice": "", "detailAmount": "-1.44", "taxRate": "13.0", "taxAmount": "-0.19", "flbm": "1070302050000000000", "detailNo": "10" }, { "goodsName": "中成药参苓白术丸", "specificationModel": "6g10袋",
"unit": "盒",
"num": "5.00000000",
"unitPrice": "8.39000000",
"detailAmount": "41.95",
"taxRate": "13.0",
"taxAmount": "5.45",
"flbm": "1070304010000000000",
"detailNo": "11"
},
{
"goodsName": "中成药参苓白术丸",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-0.83",
"taxRate": "13.0",
"taxAmount": "-0.11",
"flbm": "1070304010000000000",
"detailNo": "12"
},
{
"goodsName": "化学药品制剂替米沙坦片",
"specificationModel": "20mg14片2板",
"unit": "盒",
"num": "4.00000000",
"unitPrice": "7.78750000",
"detailAmount": "31.15",
"taxRate": "13.0",
"taxAmount": "4.05",
"flbm": "1070302050000000000",
"detailNo": "13"
},
{
"goodsName": "化学药品制剂替米沙坦片",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-0.61",
"taxRate": "13.0",
"taxAmount": "-0.08",
"flbm": "1070302050000000000",
"detailNo": "14"
},
{
"goodsName": "化学药品制剂维生素C泡腾片",
"specificationModel": "1.0g15片(橙味)", "unit": "盒", "num": "2.00000000", "unitPrice": "13.03500000", "detailAmount": "26.07", "taxRate": "13.0", "taxAmount": "3.39", "flbm": "1070302050000000000", "detailNo": "15" }, { "goodsName": "化学药品制剂维生素C泡腾片", "specificationModel": "", "unit": "", "num": "", "unitPrice": "", "detailAmount": "-0.51", "taxRate": "13.0", "taxAmount": "-0.07", "flbm": "1070302050000000000", "detailNo": "16" }, { "goodsName": "化学药品制剂复方葡萄糖酸钙口服溶液", "specificationModel": "10ml12支",
"unit": "盒",
"num": "5.00000000",
"unitPrice": "20.62000000",
"detailAmount": "103.1",
"taxRate": "13.0",
"taxAmount": "13.4",
"flbm": "1070302130000000000",
"detailNo": "17"
},
{
"goodsName": "化学药品制剂复方葡萄糖酸钙口服溶液",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-2.04",
"taxRate": "13.0",
"taxAmount": "-0.26",
"flbm": "1070302130000000000",
"detailNo": "18"
}
],
"balance": "1124872"
}
3、发票OCR及查验
/NEWKP/JXFPAPI/Recognize
字段说明:
字段 | 是否必填项 | 字符类型 | 字符长度 | 描述 |
img | 是 | 图像的Base64编码 | ||
token | 是 | token | ||
cy | 否 | 是否需要即时查验 1是 |
返回参数:
字段 | 字符类型 | 描述 |
code | 返回状态码。200:正常返回; 500:服务器内部错误 | |
message | 返回对应code的状态说明 | |
result | 图片结果信息 | |
+ object_list | 多张票据OCR识别结果集合 | |
++ image_angle | 切割后的单张票据图像角度 | |
++ rotated_image_width | 切割后的单张票据旋转后图片宽度 | |
++ rotated_image_height | 切割后的单张票据旋转后图片高度 | |
++ position | 切割后的单张票据在图片中的坐标 | |
++ class | 切割后的单张票据大类类型 | |
++ type | 切割后的单张票据具体类型 | |
++ type_description | 切割后的单张票据type字段对应的中文描述 | |
++ kind | 票据使用类型 | |
++ kind_description | 票据使用类型对应中文名描述 | |
++ item_list | 切割后的单张票据OCR识别结果 | |
+++ key | 识别字段类型 | |
+++ value | 识别字段结果 | |
+++ position | 识别字段在原图中的坐标位置 | |
+++ description | 识别字段key中文描述 | |
vat_special_invoice | 增值税专用发票 | |
motor_vehicle_sale_invoice | 机动车销售统一发票 | |
vat_transport_invoice | 货物运输业增值税专用发票 | |
vat_common_invoice | 增值税普通发票 | |
vat_electronic_invoice | 增值税电子普通发票 | |
vat_roll_invoice | 增值税普通发票(卷票) | |
vat_electronic_toll_invoice | 增值税电子普通发票(通行费) | |
used_car_purchase_invoice | 二手车销售统一发票 | |
general_machine_invoice | 通用机打发票 | |
quota_invoice | 通用定额发票 | |
passenger_transport_invoice | 旅客运输普票 | |
highway_passenger_invoice | 公路客运发票 | |
shipping_invoice | 船运客票 | |
taxi_ticket | 出租车发票 | |
parking_invoice | 停车费发票 | |
vehicle_toll | 过路过桥费发票、汽车通行费 | |
medical_receipt | 医疗费收据 | |
education_receipt | 教育费收据 | |
air_transport | 行程单 | |
train_ticket | 火车票 | |
vat_invoice_sales_list | 增值税销货清单 | |
shop_receipt | 商户小票 | |
other | 其它类型 | |
vat_invoice_correct_code | 校验码 | |
vat_invoice_daima | 发票代码 | |
vat_invoice_haoma | 发票号码 | |
vat_invoice_haoma_large_size | 增值税发票No号码 | |
vat_invoice_issue_date | 开票日期 | |
vat_invoice_rate_payer_id | 纳税人识别号 | |
vat_invoice_total | 合计 | |
vat_invoice_tax_rate | 增值税税率 | |
vat_invoice_seller_name | 销售方名称 | |
vat_invoice_seller_bank_account | 销售方开户行及帐号 | |
vat_invoice_seller_id | 销售方纳税人识别号 | |
vat_invoice_seller_addr_tell | 销售方地址、电话 | |
vat_invoice_payer_name | 购买方名称 | |
vat_invoice_payer_bank_account | 购买方开户行及帐号 | |
vat_invoice_payer_addr_tell | 购买方地址、电话 | |
vat_invoice_total_cover_tax | 价税合计大写 | |
vat_invoice_total_cover_tax_digits | 价税合计小写 | |
vat_invoice_tax_total | 税额合计 | |
vat_invoice_goods_list | 货物或服务名称 | |
vat_invoice_price_list | 金额明细 | |
vat_invoice_tax_rate_list | 税率明细 | |
vat_invoice_tax_list | 税额明细 | |
vat_invoice_zhuan_yong_flag | 专票/普票 | |
vat_invoice_dai_kai_flag | 代开(非代开条目为空) | |
vat_invoice_plate_specific | 规格型号明细 | |
vat_invoice_electrans_unit | 单位明细 | |
vat_invoice_electrans_quantity | 数量明细 | |
vat_invoice_electrans_unit_price | 单价明细 | |
vat_invoice_daima_right_side | 右侧打印发票代码 | |
vat_invoice_haoma_right_side | 右侧打印发票号码 | |
vat_invoice_page_number | 抵扣联/发票联 | |
vat_invoice_type | 发票类型 | |
vat_invoice_total_note | 备注 | |
vat_invoice_cipher_field | 密码区 | |
vat_invoice_drawer | 开票人 | |
vat_invoice_review | 复核 | |
vat_invoice_payee | 收款人 | |
exist_stample | 盖章存在性判断 | |
vat_invoice_headline_page_number | 标题发票联 | |
vat_invoice_corrent_code_print | 打印校验码 | |
vat_invoice_total_print | 打印合计 | |
vat_invoice_note_correct_code | 备注校验码 | |
vat_invoice_machine_no | 机器编号 | |
vat_invoice_daima_print | 打印发票代码 | |
vat_invoice_elec_payment_id | 电子支付标识 | |
vat_invoice_issue_date_print | 右侧打印开票日期 | |
vat_invoice_qr_code | qr码 | |
vehicle_invoice_buyer | 购买方名称 | |
vehicle_invoice_buyer_id | 购买方名称的身份证号码或组织机构代码 | |
vehicle_invoice_car_model | 厂牌型号 | |
vehicle_invoice_car_made_place | 产地 | |
vehicle_invoice_cert_id | 合格证号 | |
vehicle_invoice_engine_id | 发动机号码 | |
vehicle_invoice_car_vin | 车辆识别代号/车架号 | |
vehicle_invoice_total_price | 价税合计 | |
vehicle_invoice_total_price_digits | 价税合计小写 | |
vehicle_invoice_price_without_tax | 不含税价 | |
vehicle_invoice_tax_rate | 增值税税率 | |
vehicle_invoice_tax_amount | 税额 | |
vehicle_invoice_telephone | 电话 | |
vehicle_invoice_issue_date | 开票日期 | |
vehicle_invoice_daima | 发票代码 | |
vehicle_invoice_haoma | 发票号码 | |
vehicle_invoice_dealer | 销货单位 | |
vehicle_invoice_jida_daima | 机打代码 | |
vehicle_invoice_jida_haoma | 机打号码 | |
vehicle_invoice_machine_id | 机器编码 | |
vehicle_invoice_tax_authorith_id | 主管税务代码 | |
vehicle_invoice_tax_authorith | 主管税务机关 | |
vehicle_invoice_seller_bank_name | 开户银行 | |
vehicle_invoice_seller_bank_account | 账号 | |
vehicle_invoice_seller_tax_id | 纳税人识别号 | |
vehicle_invoice_commodity_inspection_id | 商检单号 | |
vehicle_invoice_import_certificate_id | 进口证明书号 | |
vehicle_invoice_seller_address | 地址 | |
vehicle_invoice_tax_payment_certificate_number | 完税凭证号 | |
vehicle_invoice_issued_by | 开票人 | |
vehicle_invoice_tax_code | 税控码 | |
vehicle_invoice_limit_number | 限乘人数 | |
vehicle_invoice_vehicle_type | 车辆类型 | |
vehicle_invoice_tonnage | 吨位 | |
vehicle_invoice_page_number | 发票联 | |
vehicle_invoice_qr_code | 二维码 | |
vehicle_invoice_buyer_tax_id | 购方纳税人识别号 | |
vehicle_invoice_daima | 购车发票代码 | |
vehicle_invoice_haoma | 购车发票号码 | |
vehicle_invoice_buyer | 购货单位(人) | |
vehicle_invoice_buyer_id | 购买身份证号码/组织机构代码 | |
vehicle_invoice_buyer_addr | 购买方地址 | |
vehicle_invoice_buyer_phone | 购买方电话号码 | |
vehicle_invoice_seller | 卖方单位(人) | |
vehicle_invoice_seller_id | 卖方身份证号码/组织机构代码 | |
vehicle_invoice_seller_addr | 卖方地址 | |
vehicle_invoice_seller_phone | 卖方电话号码 | |
vehicle_invoice_plate_num | 车牌照号 | |
vehicle_invoice_register_num | 登记证号 | |
vehicle_invoice_vehicle_type | 车辆类型 | |
vehicle_invoice_vin | 车架号/车辆识别代码 | |
vehicle_invoice_car_model | 厂牌型号 | |
vehicle_invoice_dmv | 转入地车辆管理所名称 | |
vehicle_invoice_price_total_price | 价税合计 | |
vehicle_invoice_total_price_digits | 价税合计小写 | |
vehicle_invoice_auction_house | 经营、拍卖单位 | |
vehicle_invoice_auction_house_addr | 经营、拍卖单位地址 | |
vehicle_invoice_auction_house_tax_id | 经营、拍卖单位纳税人识别号 | |
vehicle_invoice_auction_house_bank_account | 经营、拍卖单位开户银行、账号 | |
vehicle_invoice_auction_house_phone | 经营、拍卖单位电话 | |
vehicle_invoice_market | 二手车市场 | |
vehicle_invoice_market_addr | 二手车市场地址 | |
vehicle_invoice_market_tax_id | 二手车市场纳税人识别号 | |
vehicle_invoice_market_bank_acount | 二手车市场开户银行、账号 | |
vehicle_invoice_market_phone | 二手车市场电话 | |
vehicle_invoice_note | 备注 | |
vehicle_invoice_machine_id | 机器码 | |
vehicle_invoice_shuikongma | 税控码 | |
vehicle_invoice_issue_date | 购车发票开票日期 | |
exist_stample | 盖章存在性判断 | |
invoice_head | 发票票头 | |
invoice_number | 发票号码 | |
invoice_code | 发票代码 | |
machine_number | 机器号码 | |
machine_code | 机器编码 | |
total_money | 合计金额(小写) | |
total_money_big | 合计金额(大写) | |
date_of_invoice | 开票日期 | |
check_number | 校验码 | |
buy_name | 购方名称 | |
buy_tax_number | 购方纳税人识别号 | |
sold_name | 销方名称 | |
sold_tax_number | 销方纳税人识别号 | |
goods_name_list | 项目名称明细 | |
goods_unit_price_list | 项目单价明细 | |
goods_number_list | 项目数量明细 | |
goods_money_list | 项目金额明细 | |
cashier_name | 收款员 | |
toll_code | 车辆通行费代码 | |
toll_number | 车辆通行费号码 | |
date | 收费时间 | |
time | 收费时间 | |
money | 收费金额 | |
quota_invoice_code | 发票代码 | |
quota_invoice_number | 发票号码 | |
money_small | 金额(小写) | |
money_big | 金额(大写) | |
location | 发票所在地 | |
invoice_code | 发票代码 | |
invoice_no | 发票号码 | |
date | 日期 | |
taxi_no | 车号 | |
boarding_time | 上车时间 | |
landing_time | 下车时间 | |
mileage | 里程 | |
sum | 总价金额 | |
oil | 燃油附加费 | |
location | 发票所在地 | |
passenger_name | 旅客姓名 | |
id_no | 身份证件号码 | |
serial_number | 印刷序号 | |
total | 合计金额 | |
fare | 票价 | |
civil_aviation_fund | 民航发展基金 | |
fuel_surcharge | 燃油附加费 | |
other_taxes | 其他税费 | |
issued_date | 填开日期 | |
issued_by | 填开单位 | |
e_ticket_no | 电子客票号码 | |
from | 出发站 | |
to | 到达站 | |
flight_number | 航班号 | |
seat_class | 座位等级 | |
date | 航班日期 | |
time | 航班时间 | |
fare_basis | 客票级别 | |
allow | 行李 | |
insurance | 保险费 | |
restriction | 签注 | |
passenger_name | 乘客名称 | |
passenger_id | 乘客身份证 | |
train_number | 车次号 | |
departure_station | 出发地 | |
departure_date | 乘车时间 | |
class | 座位类别 | |
ticket_number | 火车票红色编码 | |
arrival_station | 目的地 | |
seat_number | 座位号 | |
price | 价格 | |
check | 检票口 | |
ticket_id | 火车票ID | |
invoice_code | 发票代码 | |
invoice_number | 发票号码 | |
money | 金额 | |
date | 日期 | |
time | 时间 | |
invoice_code | 发票代码 | |
invoice_number | 发票号码 | |
money | 金额 | |
date | 日期 | |
time | 时间 | |
passenger_name | 乘客姓名 | |
passenger_id | 乘客身份证号码 | |
invoice_number | 发票号码 | |
money | 金额 | |
transaction_number | 交易流水号 | |
workflow_number | 业务流水号 | |
invoice_bar_code | 票据条码 | |
invoice_number | 票据编号 | |
medical_institution_type | 医疗机构类型 | |
name | 姓名 | |
sex | 性别 | |
medical_insurance_type | 医保类型 | |
social_security_number | 社会保障卡号 | |
amount_big | 大写合计 | |
amount_small | 小写合计 | |
purchaser_name | 购买方名称 | |
seller_name | 销售方名称 | |
invoice_code | 发票代码 | |
invoice_number | 发票号码 | |
total_page | 合计页码 | |
page | 当前页码 | |
total | 金额合计 | |
tax_total | 税额合计 | |
has_stamp | 销售方盖章存在性判断 | |
issued_date | 填开日期 |
请求体Body(完整的传入参数):
IMG=[图像的Base64编码]&token=
响应示例:
{
"invoiceCode": "044002300211",
"invoiceNo": "20313577",
"invoiceType": "10",
"realinvoiceType": "10",
"invoiceDate": "20240102",
"machineNo": "661840465301",
"buyerName": "惠州市都市康缘大药房有限公司大亚湾丽港山庄分店",
"salerName": "广东帝豪药业有限公司",
"khmc_ly": "1",
"khmc_redis": "",
"xfmc_redis": "广东帝豪药业有限公司",
"buyerTaxNo": "91441300MA52BR554R",
"buyerAddressPhone": "",
"buyerAccount": "",
"checkCode": "59249777454028895930",
"checkCount": 1,
"drawer": "",
"payee": "",
"reviewer": "",
"resultCode": "0000",
"resultTip": "查验成功发票一致",
"salerTaxNo": "914401067459551271",
"salerAddressPhone": "广州市黄埔区国际生物岛螺旋大道68号合景科盛广场A栋地上第7层01、02单元 020-89811503",
"salerBankAccount": "招商银行广州海珠支行120914388810902",
"cancellationMark": "0",
"invoiceAmount": "438.58",
"taxAmount": "57.01",
"totalAmount": "495.59",
"fplxdm": "",
"hcbz": "0",
"qdbz": "0",
"remark": "共3个订单:SKP2023c1075270,SKP2023c1075275,SKP2023c1075276",
"remark_b64": "5YWxM+S4quiuouWNle+8mlNLUDIwMjNjMTA3NTI3MCxTS1AyMDIzYzEwNzUyNzUsU0tQMjAyM2MxMDc1Mjc2",
"detailList": [
{
"goodsName": "中成药痛风舒片",
"specificationModel": "0.33g15片2板",
"unit": "盒",
"num": "4.00000000",
"unitPrice": "3.36250000",
"detailAmount": "13.45",
"taxRate": "13.0",
"taxAmount": "1.75",
"flbm": "1070304040000000000",
"detailNo": "1"
},
{
"goodsName": "中成药痛风舒片",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-0.27",
"taxRate": "13.0",
"taxAmount": "-0.03",
"flbm": "1070304040000000000",
"detailNo": "2"
},
{
"goodsName": "化学药品制剂转移因子口服溶液",
"specificationModel": "10ml6支", "unit": "盒", "num": "6.00000000", "unitPrice": "7.16833333", "detailAmount": "43.01", "taxRate": "13.0", "taxAmount": "5.59", "flbm": "1070302130000000000", "detailNo": "3" }, { "goodsName": "化学药品制剂转移因子口服溶液", "specificationModel": "", "unit": "", "num": "", "unitPrice": "", "detailAmount": "-0.85", "taxRate": "13.0", "taxAmount": "-0.11", "flbm": "1070302130000000000", "detailNo": "4" }, { "goodsName": "中成药复方枣仁胶囊", "specificationModel": "0.4g6粒",
"unit": "盒",
"num": "1.00000000",
"unitPrice": "30.87000000",
"detailAmount": "30.87",
"taxRate": "13.0",
"taxAmount": "4.01",
"flbm": "1070304080000000000",
"detailNo": "5"
},
{
"goodsName": "中成药复方枣仁胶囊",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-0.61",
"taxRate": "13.0",
"taxAmount": "-0.08",
"flbm": "1070304080000000000",
"detailNo": "6"
},
{
"goodsName": "中成药连花清瘟胶囊",
"specificationModel": "0.35g12粒2板",
"unit": "盒",
"num": "9.00000000",
"unitPrice": "9.42444444",
"detailAmount": "84.82",
"taxRate": "13.0",
"taxAmount": "11.03",
"flbm": "1070304080000000000",
"detailNo": "7"
},
{
"goodsName": "中成药连花清瘟胶囊",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-1.69",
"taxRate": "13.0",
"taxAmount": "-0.22",
"flbm": "1070304080000000000",
"detailNo": "8"
},
{
"goodsName": "化学药品制剂双氯芬酸钠缓释片",
"specificationModel": "75mg10片", "unit": "盒", "num": "3.00000000", "unitPrice": "24.33666667", "detailAmount": "73.01", "taxRate": "13.0", "taxAmount": "9.49", "flbm": "1070302050000000000", "detailNo": "9" }, { "goodsName": "化学药品制剂双氯芬酸钠缓释片", "specificationModel": "", "unit": "", "num": "", "unitPrice": "", "detailAmount": "-1.44", "taxRate": "13.0", "taxAmount": "-0.19", "flbm": "1070302050000000000", "detailNo": "10" }, { "goodsName": "中成药参苓白术丸", "specificationModel": "6g10袋",
"unit": "盒",
"num": "5.00000000",
"unitPrice": "8.39000000",
"detailAmount": "41.95",
"taxRate": "13.0",
"taxAmount": "5.45",
"flbm": "1070304010000000000",
"detailNo": "11"
},
{
"goodsName": "中成药参苓白术丸",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-0.83",
"taxRate": "13.0",
"taxAmount": "-0.11",
"flbm": "1070304010000000000",
"detailNo": "12"
},
{
"goodsName": "化学药品制剂替米沙坦片",
"specificationModel": "20mg14片2板",
"unit": "盒",
"num": "4.00000000",
"unitPrice": "7.78750000",
"detailAmount": "31.15",
"taxRate": "13.0",
"taxAmount": "4.05",
"flbm": "1070302050000000000",
"detailNo": "13"
},
{
"goodsName": "化学药品制剂替米沙坦片",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-0.61",
"taxRate": "13.0",
"taxAmount": "-0.08",
"flbm": "1070302050000000000",
"detailNo": "14"
},
{
"goodsName": "化学药品制剂维生素C泡腾片",
"specificationModel": "1.0g15片(橙味)", "unit": "盒", "num": "2.00000000", "unitPrice": "13.03500000", "detailAmount": "26.07", "taxRate": "13.0", "taxAmount": "3.39", "flbm": "1070302050000000000", "detailNo": "15" }, { "goodsName": "化学药品制剂维生素C泡腾片", "specificationModel": "", "unit": "", "num": "", "unitPrice": "", "detailAmount": "-0.51", "taxRate": "13.0", "taxAmount": "-0.07", "flbm": "1070302050000000000", "detailNo": "16" }, { "goodsName": "化学药品制剂复方葡萄糖酸钙口服溶液", "specificationModel": "10ml12支",
"unit": "盒",
"num": "5.00000000",
"unitPrice": "20.62000000",
"detailAmount": "103.1",
"taxRate": "13.0",
"taxAmount": "13.4",
"flbm": "1070302130000000000",
"detailNo": "17"
},
{
"goodsName": "化学药品制剂复方葡萄糖酸钙口服溶液",
"specificationModel": "",
"unit": "",
"num": "",
"unitPrice": "",
"detailAmount": "-2.04",
"taxRate": "13.0",
"taxAmount": "-0.26",
"flbm": "1070302130000000000",
"detailNo": "18"
}
],
"balance": "1124872"
}
1
{
2
"Result": "1",
3
"Message": "识别成功",
4
"Data": "",
5
"YHYE": 10259804
6
}
说明:返回的Data需要base解密
4、解析PDF或OFD获取关键要素
/NEWKP/JXFPAPI/ReadInvoice
字段说明:
字段 | 是否必填项 | 字符类型 | 字符长度 | 描述 |
img | 是 | 图像的Base64编码 | ||
lx | 是 | PDF或OFD | ||
token | 是 | token |
返回参数:
字段 | 字符类型 | 描述 |
FPDM | 发票代码 | |
FPHM | 发票号码 | |
KPRQ | 开票日期 | |
XYM | 校验码 | |
FPJE | 发票金额 | |
HJJE | 合计金额 |
请求体Body(完整的传入参数)
IMG=[图像的Base64编码]&LX=[PDF或OFD]&token=
响应示例:
{
"Result": "1",
"Message": "成功。",
"FPDM": "发票代码",
"FPHM": "发票代码",
"KPRQ": "发票代码",
"XYM": "校验码",
"FPJE": "发票金额",
"HJJE": "合计金额"
}