异构系统接口定义
第1章 概述
1.1 目的
本文档旨在编写一个面向开发者的完整的API调用规范,供需要对接星瀚档案的开发者使用。本文档不包括API具体的实现细节。
1.2 适用范围
本文档适用阅读人员包括:发票云的设计、开发人员,公司内部合作部门成员。本文档的接口也仅限于公司内部应用使用。
1.3 适用版本
星瀚电子会计档案(旗舰版)
第2章 基础接口
2.1获取授权接口
接口请求说明:http请求方式:POST(请使用https协议)
https://${baseUrl}/api/token
请求数据结构:
{
"clientId": "vc0c6hjlgnKCic",
"sign": "8b9c78fccedbb72eff1106c57505b8f6",
"timestamp": 1463468225650
}
返回数据结构:
{
"accessToken": "7ffe2cced2a0e3615a24705ee39f53d09a243911c0e932991570ffa1d86abbf4",
"expiresTime": 43200,
"errcode": "0000",
"description": "操作成功"
}
参数描述:
参数 | 类型 | 是否必须 | 描述 |
---|---|---|---|
client_id | String | 是 | 用于授权验证的唯一标识clientId, |
sign | String | 是 | 签名(由clientId+ clientSecret+timestamp的值MD5加密生成) |
Timestamp | long | 是 | 时间戳 |
返回参数:
参数 | 类型 | 描述 |
---|---|---|
accessToken | String | 字符串, 最长255,用于后续访问的令牌,随机字符串 |
expiresTime | long | |
长整型,令牌在多少秒内有效,单位为秒 | ||
errcode | String | 操作结果码 |
description | String | 操作描述 |
第3章 通用接口
3.1 归档数据清单接口
接口请求说明:http请求方式:POST(请使用https协议)
http://{baseUrl}/api/list
请求数据结构:json
{
"accessToken": "4de0c6a7-dbf0-4436-8121-b207f6c428be",
"organizationNo": "001", //组织唯一编号
"period": "2021-02" , //归档期属,格式yyyy-mm
"pageSize": 10 , //分页查询,每页数量
"currentPage": 1 //分页查询,当前页
"docType": "01", //业务类型,参考异构业务数据字典
"bookNo":"X23SS2", //账薄编号
"ids":"id1,id2,id3" //唯一id
}
入参 | 描述 | 类型 | 是否必须 |
---|---|---|---|
accessToken | 授权token | String | True(有token接口才为ture) |
pageSize | 分页查询,每页数量 | Int | true |
currentPage | 分页查询,当前页 | Int | true |
organizationNo | 组织唯一编号 | String | true |
period | 归档期属,格式yyyy-mm | String | true |
docType | 业务类型 | String | true 资料类型:默认“01”凭证“02”单据“03”总账“04”明细账“05”月报“06”季报“07”半年报“08”年报“09”固定资产“10”银行回单“11”银行存款余额调节表“12”银行存款日记账“13”现金日记账“14”银行对账单“15”税务资料“16”发票…… 业务类型集成平台可自定义,业务类型与集成内容的内容编码保持一致 |
bookNo | 账薄编号 | String | false可选;默认不传就归档到主账薄 |
ids | 唯一id,多个用英文逗号分隔 | String | false可选;默认不传就获取所有数据,传了就只获取ids对应的数据 |
返回结果:
错误信息:
{
"errcode": "10010", //不为0000即可
"description": "异常",
"data":[]
}
成功信息:
返回data字段里的发票字段可参考:
doctype:01
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"id": "1",
"title": "国际服饰(中国)有限公司",
"voucherOrgNumber": "1000",
"voucherOrgName": "国际服饰(中国)有限公司",
"accountDate": "2017-07-28",
"period": "2017-07",
"voucherNum": "KZ-10001485",
"attachNum": "2",
"voucherType": "记",
"currency": "CNY",
"rate": "1",
"totalDebitTra": "100.00",
"totalDebitLoc": "100.00",
"totalCreditTra": "100.00",
"totalCreditLoc": "100.00",
"approval": "张三",
"posting": "李四",
"review": "王五",
"creater": "钱六",
"operator": "赵七",
"cashier": "黄芪",
"auditing": "ad",
"accounter": "ad",
"item": [
{
"accountcode": "001",
"accountname": "税收税款",
"desc": "摘要信息",
"costcenter": "成本中心",
"dr": "100.02",
"cr": "100.02",
"accountdimensions":"123"
}
],
"file": [
{
"fileName": "文件名,保证唯一性",
"isMainFile": 0,
"srcName": "源文件名",
"download": "文件下载地址"
}
],
"uppervoucherList": [
{
"voucherId": "asdagfhgj",
}
],
"billList":[
{
"billId": "asdagfhgj",
}
],
"bankList":[
{
"bankId": "jjjjjjjjjjj",
}
],
"invoiceList":[
{
"invoiceCode": "012001800211",
"invoiceNo": "06754098",
"serialNo": "2d158f58605943b08f19ccbd0a4382cd0"
}
]
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
data说明
参数 | 描述 | 字段类型 | 字段长度 | 是否必填 |
---|---|---|---|---|
id | 凭证id | |||
title | 凭证抬头 | |||
voucherOrgNumber | 核算单位编码 | |||
voucherOrgName | 核算单位名字 | |||
accountDate | 过账日期 | |||
period | 凭证所属期属 | |||
voucherNum | 凭证号 | |||
attachNum | 附件张数,非必填 | |||
voucherType | 凭证类型 ,记,转付 | |||
currency | 币种 | |||
rate | 汇率 | |||
totalDebitTra | 借方交易币合计 | |||
totalDebitLoc | 借方本位币合计 | |||
totalCreditTra | 贷方交易币合计 | |||
totalCreditLoc | 贷方本位币合计 | |||
approval | 会计主管 ,非必填 | |||
posting | 记账人 | |||
review | 复核人 | |||
creater | 制单人,非必填 | |||
operator | 经办人,非必填 | |||
cashier | 出纳,非必填 | |||
auditing | 审核人 | |||
accounter | 过账人 | |||
scanBillNo | 影像编号 |
Item凭证分录字段说明
字段 | 说明 |
---|---|
accountcode | 会计科目代码 |
accountname | 会计科目名称 |
desc | 凭证摘要 |
costcenter | 成本中心 |
dr | 借方金额 |
cr | 贷方金额 |
file文件属性说明
字段 | 说明 |
---|---|
fileName | 文件名(用于存储) |
isMainFile | 是否是主文件,0主文件1关联附件 |
srcName | 源文件名(用于展示) |
download | 文件下载地址 |
uppervoucherList上游凭证列表属性说明
字段 | 说明 |
---|---|
voucherId | 凭证id(唯一) |
voucherNum | 凭证号 |
voucherType | 凭证类型 |
billList关联单据属性说明
字段 | 说明 |
---|---|
billId | 单据id(唯一) |
billNo | 单据编号 |
billName | 单据类型 |
bankList关联银行回单属性说明
字段 | 说明 |
---|---|
bankId | 回单id(唯一) |
tradeId | 交易流水id |
invoiceList关联发票属性说明**(见发票识别返回结果)**
字段 | 说明 |
---|---|
invoiceCode | 发票代码 |
invoiceNo | 发票号码 |
serialNo | 发票流水号 |
downloadUrl | 发票下载地址 |
doctype:02-*
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"id": "zxcas",
"billNo": "KD-001",
"period": "2020-01",
"scanBillNo": "KD-yx-oo1",
"billType": "费用报销单",
"voucherOrgNumber": "1000",
"voucherOrgName": "国际服饰(中国)有限公司",
"creater": "张三",
"amount": 100.01,
"settlementNo": "001a",
"date":"2022-06-15 20:05:25",
"desc":"事由",
"file": [
{
"fileName": "文件名,保证唯一性",
"isMainFile": 0,
"srcName": "源文件名",
"download": "文件下载地址"
}
],
"upperbillNoList": [
{
"billId": "asdagfhgj"
}
],
"voucherList": [
{
"voucherId": "asdagfhgj",
}
],
"invoiceList": [
{
"invoiceCode": "012001800211",
"invoiceNo": "06754098",
"serialNo": "2d158f58605943b08f19ccbd0a4382cd0"
}
]
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
doctype:03
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"id": "asdas",
"period": "2020-10",
"voucherOrgNumber": " 1000",
"voucherOrgName": "国际服饰(中国)有限公司",
"currency": "CNY",
"file": [
{
"fileName": "文件名,保证唯一性",
"isMainFile": 0,
"srcName": "源文件名",
"download": "文件下载地址"
}
],
"item": [
{
"subjCode": "科目名称",
"subjName": "科目代码",
"abstract": "摘要",
"debit": 123.0,
"credit": 123.0,
"tradeType": "借",
"amount": "123.00"
}
]
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
doctype:04
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"id": "asdas",
"period": "2020-10",
"voucherOrgNumber": " 1000",
"voucherOrgName": "国际服饰(中国)有限公司",
"currency": "CNY",
"subjCode": "科目名称",
"subjName": "科目代码",
"file": [
{
"fileName": "文件名,保证唯一性",
"isMainFile": 0,
"srcName": "源文件名",
"download": "文件下载地址"
}
]
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
doctype:05,06,07,08
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"id": "asdas",
"period": "2020-10",
"voucherOrgNumber": " 1000",
"voucherOrgName": "国际服饰(中国)有限公司",
"currency": "CNY",
"freport_type": "报告类型",
"file": [
{
"fileName": "文件名,保证唯一性",
"isMainFile": 0,
"srcName": "源文件名",
"download": "文件下载地址"
}
]
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
doctype:09
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"id": "",
"voucherOrgNumber": "",
"voucherOrgName": "",
"period": "",
"currency": "",
"assetscardCode": "",
"assetscardName": "",
"assetscardCategory": "",
"userDepartment": "",
"userTimeStart": "",
"cleanPeriod": "",
"depreciationMethod": "",
"assetscardSubjCode": "",
"assetscardSubjName": "",
"depreciationSubjCode": "",
"depreciationSubjName": "",
"taxSubjCode": "",
"taxSubjName": "",
"buyOppositeSubjCode": "",
"buyOppositeSubjName": "",
"cleanSubjCode": "",
"cleanSubjName": "",
"impairmentSubjCode": "",
"impairmentSubjName": "",
"impairmentOppositeSubjCode": "",
"impairmentOppositeSubjName": "",
"originalValue": "",
"taxAmount": "",
"residualRate": "",
"impairment": "",
"depreciationPeriod": "",
"depreciationCount": "",
"depreciationMonth": "",
"abstract": ""
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
doctype:10
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"id": "273492hr928hroiehr28herh1",
"tradeId": "DER2323111111",
"payeeName": "马腾",
"payeeAccount": "6225887860913444",
"payeeBank": "招商银行深圳南山科技园支行",
"paymentName": "马腾",
"paymentAccount": "62148300566012002",
"paymentBank": "中国工商银行常熟白茆支行",
"tradeDate": "2016-12-15",
"currency": "人民币",
"amount": 23030.80,
"postScript": "移动费",
"file": [
{
"fileName": "文件名,保证唯一性",
"isMainFile": 0,
"srcName": "源文件名",
"download": "文件下载地址"
}
] ,
"voucherList": [
{
"voucherId": "asdagfhgj",
"voucherNum": "20220600001",
"voucherType": "记"
}
]
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
doctype:11
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"id": "273492hr928hroiehr28herh1",
"voucherOrgNumber": "A0001",
"voucherOrgName": "CS投资(华南)有限公司",
"openingBank": "工商银行",
"currency": "币种",
"bankAccount": "6225887860913444",
"bankJournalBalance": "128773.00000",
"bankStatementBalance": "28773.00000",
"addBankReceive": "0.0000",
"addBusinessReceive": "148.0000",
"subBankPay": "0.0000",
"subBusinessPay": "111.0000",
"bankBalance": "23030.8220",
"businessBalance ": "1111.0000",
"printTime ": "2022-01-01",
"printer ": "刘旭峰",
"auditTime ": "2022-01-02",
"reviewer ": "刘旭峰",
"file": [
{
"fileName": "文件名,保证唯一性",
"isMainFile": 0,
"srcName": "源文件名",
"download": "文件下载地址"
}
],
"businessOutstandingAccountDetails": [
{
"businessDate ": "2022-02-01",
"abstract": "摘要",
"subBankPay": 0.0,
"addBankReceive": 0.0,
"outstandingReason": ""
}
],
"bankOutstandingAccountDetails": [
{
"businessDate": "2022-02-01",
"abstract": "摘要",
" addBusinessReceive ": 0.0,
" subBusinessPay ": 0.0,
" outstandingReason ": "东方大饭店",
" postingDate ": "2022-01-01"
}
]
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
doctype:12
{
"errcode":"0000",
"description":"操作成功",
"data":[
{
"id":"273492hr928hroiehr28herh1",
"voucherOrgNumber":"DER2323111111",
"voucherOrgName":"环宇宇宙有限公司",
"bankAccount":"6225887860913444",
"currency":"人民币",
"cashier":"马腾",
"accounting":"马腾",
"date":"2022-01-01",
"file":[
{
"fileName":"文件名,保证唯一性",
"isMainFile":0,
"srcName":"源文件名",
"download":"文件下载地址"
}
],
"item":[
{
"postingDate":"2021-01-01",
"businessDate":"2021-01-01",
"abstract":"摘要",
"debitAmount":0.00,
"creditAmount":1.00,
"tradeType":"借",
"balance":20191.00,
"otherAccount":"中兴商旅服务有限公司"
}
]
}
],
"totalElements":1,
"totalPage":1,
"pageSize":10,
"currentPage":1
}
doctype:13
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"id": "273492hr928hroiehr28herh1",
"voucherOrgNumber": "DER2323111111",
"voucherOrgName": "环宇宇宙有限公司",
"bankAccount": "6225887860913444",
"currency": "人民币",
"cashier": "马腾",
"accounting": "马腾",
"date": "2022-01-01",
"file": [
{
"fileName": "文件名,保证唯一性",
"isMainFile": 0,
"srcName": "源文件名",
"download": "文件下载地址"
}
],
"item": [
{
"postingDate": "2021-01-01",
"businessDate": "2021-01-01",
"abstract": "摘要",
"debitAmount": 0.0,
"creditAmount": 1.0,
"tradeType": "借",
"balance": 20191.0,
"otherAccount": "中兴商旅服务有限公司"
}
]
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
doctype:14
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"id": "273492hr928hroiehr28herh1",
" voucherOrgNumber ": "DER2323111111",
" voucherOrgName ": "马腾",
" queryDate ": "6225887860913444",
" tradeType ": "借",
" bankAccount ": "62148300566012002",
" accountName ": "工商银行",
" tradeDate ": "2022-01-01",
" debitAmount ": "2020.00",
" creditAmount ": "2020.00",
" debitNum ": 2.0,
" creditAmount ": 2.0,
"file": [
{
"fileName": "文件名,保证唯一性",
"isMainFile": 0,
"srcName": "源文件名",
"download": "文件下载地址"
}
],
"item": [
{
"orderNum ": "1",
"tradingDate": "2020-01-01",
" tradeType ": "借",
" amount ": 2.0,
" balance ": 2.0,
" oppositeAccount ": 2.0,
" oppositeName ": "DFR公司",
" voucherNum ": "098219218219182",
" abstract ": "转型业务",
" tradeid ": "01119191818171"
}
]
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
doctype:15
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"id": "税务id",
" voucherOrgNumber ": "核算单位代码",
" voucherOrgName ": "核算单位名称",
" taxCode": "税种代码",
" taxName": "税种名称",
" type": "申报表类型",
" accountDate": "业务日期",
" desc": "描述",
"file": [
{
"fileName": "文件名,保证唯一性",
"isMainFile": 0,
"srcName": "源文件名",
"download": "文件下载地址"
}
]
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
doctype:16
{
"errcode": "0000",
"description": "操作成功",
"data": [
{
"invoiceCode": "012001800211",
"invoiceNo": "06754098",
"serialNo": "2d158f58605943b08f19ccbd0a4382cd0",
"downloadUrl": "发票原件下载地址",
"billList":[
{
"billId": "asdagfhgj",
"billNo": "KD-20220600001",
"billName": "费用报销单"
}
],
"voucherList": [
{
"voucherId": "asdagfhgj",
"voucherNum": "20220600001",
"voucherType": "记"
}
]
}
],
"totalElements": 1,
"totalPage": 1,
"pageSize": 10,
"currentPage": 1
}
注:data字段里标注颜色部分的发票字段需参考以下发票识别返回结果体
1、增值税专票、普票、卷票返回数据结构:Json
{
"errcode": "0000",
"description": "查询成功",
"data": {"invoice":[
{
"serialNo":"", 发票流水号
"invoiceCode": "", 发票代码
"invoiceNo": "", 发票号码
"invoiceDate": "", 开票日期
"checkCode": "", 校验码
"salerName": "", 销方名称
"salerTaxNo": "", 销方纳税人识别号
"salerAddressPhone": "" 销方地址电话
"salerAccount": "", 销方开户行及账号
"buyerName": "", 购方名称
"buyerTaxNo": "", 购方纳税人识别号
"buyerAddressPhone": "", 购方地址电话
"buyerAccount": "", 购方银行账号
"amount": "", 金额合计(不含税)
"taxAmount": "", 税额合计
"totalAmount": "", 价税合计(小写)
"totalAmountCn": "", 价税合计大写
"remark": "", 备注
"machineNo": "", 机器编号
"cancelMark": "", 作废标识,N:未作废;Y:作废
"proxyMark": "", 代开标识:默认空,1为代开
"snapshotUrl": "", 快照地址
"downloadUrl": "", 原件下载地址
"invoiceType": "", 发票种类: 1.普通电子发票2.电子发票专票3.普通纸质发票4.专用纸质发票5.普通纸质卷票7.通用机打8.的士票9.火车票10.飞机票11.其他12.机动车13.二手车14.定额发票15.通行费16.客运票17.过路过桥发票19.完税证明20.轮船票23.通用机打电子发票
"drawer": "", 开票人
"reviewer": "", 复核人
"payee": "", 收款人
"checkCount": "", 查验次数
"items": [
{
"goodsName": "", 货物名称
"unitPrice": "", 单价(不含税)
"num": "", 数量
"taxRate": "", 税率
"unit": "", 单位
"detailAmount": "", 金额(不含税)
"specModel": "", 规格型号
"taxAmount": "", 税额
"goodsCode": "" 商品编码
}
]
}
]}
}
2、机动车发票返回结构:Json
{
"errcode": 0,
"description": "查询成功",
"data": {"invoice":[
{
"invoiceCode": "", 发票代码
"invoiceNo": "", 发票号码
"invoiceDate": "", 开票日期
"buyerTaxNo": "", 购方纳税人识别号
"buyerName": "", 购方名称
"buyerIdNo": "", 购方身份证号码/组织机构代码
"salerName": "", 销方单位名称
"salerPhoneNumber": "", 销方电话
"salerTaxNo": "", 销方纳税人识别号
"salerAccount": "", 销方账号
"salerAddress": "", 销方地址
"salerBankName": "", 销方开户银行
"vehicleType": "", 车辆类型
"bandModel": "", 厂牌型号
"produceArea": "", 产地
"qualifiedNo": "", 合格证号
"certificateNo": "", 进口证明书号
"commodityInspectionNo": "", 商检单号
"engineNo": "", 发动机号码
"vehicleIdentificationNo": "", 车辆识别代号/车架号码
"taxRate": "", 增值税税率或征收率
"taxAccount": "", 增值税税额
"totalAmount": "", 价税合计
"taxAuthorityCode": "", 主管税务机关名称
"taxAuthorityName": "", 主管税务机关代码
"amount": "", 不含税价金额
"tonnage": "", 吨位
"limitedCount": "", 限乘人数
"machineNo": "", 机器编号
"taxPaymentCertificateNo": "", 完税凭证号码
"cancelMark": "" 作废标志
}
]}
}
3、二手车发票返回结构:Json
{
"errorCode": 0,
"description": "查询成功",
"data": {"invoice":[
{
"serialNo": "", 发票流水号
"invoiceCode": "", 发票代码
"invoiceNo": "", 发票号码
"invoiceDate": "", 开票日期
"buyerPhoneNumber": "", 购方电话
"buyerName": "", 购方名称
"buyerIdNo": "", 购方身份证号码/组织机构代码
"buyerAddress": "", 购方地址
"salerName": "", 销方单位名称
"salerPhoneNumber": "", 销方电话
"salerIdNO": "", 销方纳税人识别号
"salerAddress": "", 销方地址
"licensePlateNumber": "", 车牌照号
"registrationNumber": "", 登记证号
"vehicleType": "", 车辆类型
"vehicleIdentificationNo": "", 车辆识别代号/车架号码
"bandModel": "", 厂牌型号
"vehicleManagementName": "", 转入地车辆管理所名称
"totalAmount": "", 车价合计
"totalAmountCn": "", 车价合计大写
"auctionName": "", 拍卖/经营名称
"auctionPhoneNumber": "", 拍卖/经营电话
"auctionAddress": "", 拍卖/经营地址
"auctionTaxpayerId": "", 拍卖/经营税号
"auctionBankAccout": "", 拍卖/经营开户银行帐号
"marketName": "", 二手市场单位
"marketPhoneNumber": "", 二手市场电话
"marketAddress": "", 二手市场地址
"marketTaxpayerId": "", 二手市场税号
"marketBankAccout": "", 二手市场开户银行帐号
"remark": "", 备注
"checkCount": "", 查验次数
"cancelMark": "", 是否作废Y作废,N不作废
"invoiceType": "", 发票类型
}
]}
}
4、通行费发票返回结构:Json
{
"errcode": "0000",
"description": "查询成功",
"data": {"invoice":[
{
"serialNo":"", 发票流水号
"invoiceCode": "", 发票代码
"invoiceNo": "", 发票号码
"invoiceDate": "", 开票日期
"invoiceMoney": "", 发票金额(不含税
"checkCode": "", 校验码
"salerName": "", 销方名称
"salerTaxNo": "", 销方纳税人识别号
"salerAddressPhone": "" 销方地址电话
"salerAccount": "", 销方开户行及账号
"buyerName": "", 购方名称
"buyerTaxNo": "", 购方纳税人识别号
"buyerAddressPhone": "", 购方地址电话
"buyerAccount": "", 购方银行账号
"amount": "", 金额合计(不含税)
"taxAmount": "", 税额合计
"totalAmount": "", 价税合计(小写)
"totalAmountCn": "", 价税合计大写
"remark": "", 备注
"machineNo": "", 机器编号
"cancelMark": "", 作废标识,N:未作废;Y:作废
"proxyMark": "", 代开标识:默认空,1为代开
"snapshotUrl": "", 快照地址
"downloadUrl": "", 原件下载地址
"invoiceType": "", 发票种类: 1.普通电子发票2.电子发票专票3.普通纸质发票4.专用纸质发票5.普通纸质卷票7.通用机打8.的士票9.火车票10.飞机票11.其他12.机动车13.二手车14.定额发票15.通行费16.客运票17.过路过桥发票19.完税证明20.轮船票23.通用机打电子发票
"drawer": "", 开票人
"reviewer": "", 复核人
"payee": "", 收款人
"checkCount": "", 查验次数
"items": [
{
"specModel": "", 类型
"taxRate": "", 税率
"detailAmount": "", 明细金额(不含税)
"licensePlateNumber": "", 车牌号码
"goodsName": "", 项目名称
"startDate": "", 通行起始日期
"endDate": "", 通行结束日期
"taxAmount": "" 金额
}
]
}
]}
}
5、识别的士票返回结构
{
"errcode": "0000",
"description": "查询成功",
"data": {"invoice":[{
"invoiceCode":"", 发票代码
"invoiceNo":"", 发票号码
"invoiceDate":"", 发票日期
"totalAmount":"", 含税金额
"mileage":"", 里程
"timeGeton":"", 上车时间
"timeGetoff":"", 下车时间
"place":"", 乘车地点
"invoiceType":"" 发票类型
}]}
}
6、识别火车票返回结构
{
"errcode": "0000",
"description": "查询成功",
"data": {"invoice":[{
"printingSequenceNo":"", 印刷序号
"invoiceDate":"", 发票日期
"totalAmount":"", 含税金额
"seat":"", 座位
"stationGeton":"", 上车地点
"stationGetoff":"", 下车地点
"trainTime":"", 开车时间
"trainNum":"", 车次
"passengerName":"", 乘客姓名
"invoiceType":"" 发票类型
}]}
}
7、识别飞机票返回结构
{
"errcode": "0000",
"description": "查询成功",
"data": "invoice":{[{
"invoiceDate":"", 发票日期
"fightNum":"", 航班号
"destination":"", 目的地
"placeOfDeparture":"", 出发地
"seatGrade":"", 座位等级
"electronicTicketNum":"", 电子客票行程单
"customerIdentityNum":"", 客户身份证
"customerName":"", 客户名
"totalAmount":"", 含税金额
"invoiceAmount":"", 不含税金额
"taxAmount":"", 税额
"fuelSurcharge":"", 燃油附加费
"insurancePremium":"", 保险费
"salesUnitCode":"", 销售单位代号
"fillingUnit":"", 填开单位
"airTime":"", 乘机时间时分秒
"invoiceType":"" 发票类型
}]}
}
8、识别通用机打票返回结构
{
"errcode": "0000",
"description": "查询成功",
"data": {"invoice":[{
"invoiceCode":"", 发票代码
"invoiceNo":"", 发票号码
"invoiceDate":"", 发票日期
"totalAmount":"", 含税金额
"checkCode":"", 校验码
"buyerTaxNo":"", 购方税号
"salerTaxNo":"", 销方税号
"buyerName":"", 购方名称
"salerName":"", 销方名称
"invoiceType":"" 发票类型
}]}
}
9、识别定额票返回结构
{
"errcode": "0000",
"description": "查询成功",
"data": {"invoice":[{
"invoiceCode":"", 发票代码
"invoiceNo":"", 发票号码
"totalAmount":"", 含税金额
"invoiceType":"" 发票类型
}]}
}
10、识别客运票返回结构
{
"errcode": "0000",
"description": "查询成功",
"data": {"invoice":[{
"invoiceCode":"", 发票代码
"invoiceNo":"", 发票号码
"invoiceDate":"", 发票日期
"totalAmount":"", 含税金额
"stationGeton":"", 上车地点
"stationGetoff":"", 下车地点
"passengerName":"", 乘客姓名
"invoiceType":"" 发票类型
}]}
}
11、识别过路过桥票返回结构
{
"errcode": "0000",
"description": "查询成功",
"data": {"invoice":[{
"invoiceCode":"", 发票代码
"invoiceNo":"", 发票号码
"invoiceDate":"", 发票日期
"totalAmount":"", 含税金额
"entrance":"", 入口
"exit":"", 出口
"invoiceType":"" 发票类型
}]}
}
12、识别其他票返回结构
{
"errcode": "0000",
"description": "查询成功",
"data":
{"invoice":[{
"invoiceCode":"", 发票代码
"invoiceNo":"", 发票号码
"invoiceDate":"", 发票日期
"totalAmount":"", 含税金额
"invoiceType":"" 发票类型
}]
}
}
失败返回结构体:
{
"errcode": "0001",
"description": "查询异常"
}
3.2档案文件下载接口(若3.1提供了文件下载地址,则不需要此接口)
接口请求说明:http请求方式:POST(请使用https协议)
http://{baseUrl}/api/file/download
请求数据结构:json
{
"accessToken": "4de0c6a7-dbf0-4436-8121-b207f6c428be",
"organizationNo": "001", //组织唯一编号
"fileName": "aaaa.pdf" //文件名
“isMainFile”: 0, //0主文件1附件 //是否是主文件
"period": "2021-02" , //归档期属
"docType": "01", //业务类型,和集成平台归档内容配置的编码保持一致
"bookNo":"X23SS2" //账薄编号
}
入参 | 描述 | 类型 | 是否必须 |
---|---|---|---|
accessToken | 授权token | String | true |
organizationNo | 组织唯一编号 | String | true |
fileName | 要下载文件名,与清单接口返回的结构化数据file里面的fileName保持一致 | String | true |
isMainFile | 是否是主文件 | Int | true |
period | 归档期属,格式yyyy-mm | String | true |
docType | 业务类型,参考异构业务数据字典 | String | true 资料类型:默认“01”凭证“02”单据…… 集成平台可自定义 |
bookNo | 账薄 | String | false可选;默认不传就归档到主账薄 |
修改于 1 个月前