票单云
票单云|发票单据管理平台:得心应手 如影随形
- 推荐访问票单云开放API站: http://open.piaodanyun.com/
Base URLs:
Authentication
数电票接口V1-基础版/获取访问令牌
POST 获取访问令牌
POST /obtainToken
Body 请求参数
{
"phone_email": "135xxxxxxxx",
"pass": "xxxxxx"
}
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
body | body | object | 否 | none | |
» phone | body | string | 是 | 用户名 | 使用手机号作为用户名 |
» pass | body | string | 是 | 用户密码 | none |
» tenant_id | body | integer | 是 | 企业租户ID | none |
» token_type | body | string | 是 | 令牌类型 | 数电票接口 填写 TaxApi |
返回示例
失败
{
"code": 40000,
"msg": "用户名或密码错误",
"data": null
}
{
"code": 20000,
"msg": "参数不能为空",
"data": null
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 失败 | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» code | integer | true | none | none | |
» msg | string | true | none | none | |
» data | null | true | none | none |
数电票接口V1-基础版/数电票接口
GET 获取人脸二维码
GET /qdjk/fullExteriorInvoke/getFaceImg
用于获取授权认证人脸识别二维码
Body 请求参数
{}
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
nsrsbh | query | string | 是 | 纳税人识别号 | |
type | query | string | 否 | 值为1或不传时使用电子税务局app扫二维码,值为2时使用个人所得所扫二维码 | |
username | query | string | 是 | 局端账号 | |
Authorization | header | string | 否 | none | |
body | body | object | 否 | none |
返回示例
成功
{
"code": 200,
"msg": "成功",
"data": {
"rzid": "5246703dc22842b5a3d7826f375e6c7d",
"nsrsbh": "9151123123122031211",
"ewm": "qrcode_id=gYyixYMScMK4GQc2LfzqvKVnk33kJHs7p5wnpig3QdYFAdAvmDp7i7Yobk7zzkNM&areaPrefix=5100&int erfaceCode=0004",
"slzt": null,
"emwly": "swj"
},
"total": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» code | integer | true | none | none | |
» msg | string | true | none | none | |
» data | object | true | none | none | |
»» rzid | string | true | none | 认证ID | none |
»» nsrsbh | string | true | none | 税号 | none |
»» ewm | string | true | none | 二维码 | 需用工具将字符串转化为二维码图片,在用税务app扫码认证 |
»» slzt | null | true | none | none | |
»» emwly | string | true | none | 二维码类型,取决于你的传参,默认为 swj 为电子税务局 | |
» total | integer | true | none | none |
POST 蓝字发票开具
POST /qdjk/fullExteriorInvoke/blueTicket
用于开具蓝字发票
Body 请求参数
username: "{{username}}"
fpqqlsh: 111_111
fplxdm: "82"
tdyslxDm: string
kplx: "0"
qdbz: string
xhdwsbh: "{{nsrsbh}}"
xhdwmc: 北京民诺科技有限公司
xhdwdzdh: 北京市***
xhdwyhzh: 111***
ghdwsbh: string
ghdwmc: 上海市****科技有限公司
ghdwdzdh: string
ghdwyhzh: string
zsfs: string
"fyxm[0][fphxz]": "0"
"fyxm[0][spmc]": "*软件*票单云财税管理系统"
"fyxm[0][ggxh]": V1
"fyxm[0][dw]": 年
"fyxm[0][spsl]": "1"
"fyxm[0][dj]": "1"
"fyxm[0][je]": "1"
"fyxm[0][sl]": "0.01"
"fyxm[0][se]": "0.01"
"fyxm[0][hsbz]": "1"
"fyxm[0][spbm]": "1060301020100000000"
"fyxm[0][yhzcbs]": string
"fyxm[0][lslbs]": string
"fyxm[0][zzstsgl]": string
hjje: "0.99"
hjse: "0.01"
jshj: "1"
kce: 0
kpr: string
skr: string
fhr: string
gfkhdh: string
gfkhyx: string
slsm: string
bz: string
gfzrrbs: string
xfzrrbs: string
gfxxConfirm: string
spflxConfirm: string
sfzsgmfyhzh: string
sfzsxsfyhzh: string
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» username | body | string | 是 | 局端账号 | |
» fpqqlsh | body | string | 是 | 发票请求流水号,唯一值,格式为: “税号_自定义编号”,总计40个字符以内 | |
» fplxdm | body | string | 是 | 发票类型代码,82:增值税普通发票,81:增值税专用发票;51:铁路子电子客票,61:航空运输电子客票行程单 | |
» tdyslxDm | body | string | 否 | 特定要素类型代码,“”空字符串,非特殊票种。其他特殊票种,单独咨询技术人员 | |
» kplx | body | string | 是 | 开票类型:0正数发票,1负数发票 | |
» qdbz | body | string | 否 | 清单标志,开具纸质数电发票时,上命名系大于8行传1,代表是清单发票 | |
» xhdwsbh | body | string | 是 | 销方识别号 | |
» xhdwmc | body | string | 是 | 销方名称 | |
» xhdwdzdh | body | string | 是 | 销方地址电话 | |
» xhdwyhzh | body | string | 是 | 销方银行账户 | |
» ghdwsbh | body | string | 否 | 购方税号 | |
» ghdwmc | body | string | 是 | 购方名称 | |
» ghdwdzdh | body | string | 否 | 购方地址电话 | |
» ghdwyhzh | body | string | 否 | 购方银行账号 | |
» zsfs | body | string | 否 | 征收方式,0:普通征税1:减按计征2:差额征税全额开具3:差额征税差额开具默认为0 | |
» fyxm[0][fphxz] | body | string | 是 | 发票行性质,0:正常行1:折扣行2:被折扣行 | |
» fyxm[0][spmc] | body | string | 是 | 商品名称 | |
» fyxm[0][ggxh] | body | string | 否 | 规格型号 | |
» fyxm[0][dw] | body | string | 否 | 单位 | |
» fyxm[0][spsl] | body | number | 否 | 商品数量 | |
» fyxm[0][dj] | body | number | 否 | 单价 | |
» fyxm[0][je] | body | number | 是 | 金额 | |
» fyxm[0][sl] | body | string | 是 | 税率 | |
» fyxm[0][se] | body | number | 是 | 税额 | |
» fyxm[0][hsbz] | body | string | 是 | 含税标志:0不含税1含税 | |
» fyxm[0][spbm] | body | string | 是 | 商品编码 | |
» fyxm[0][yhzcbs] | body | string | 否 | 优惠政策标识:0未使用,1使用 | |
» fyxm[0][lslbs] | body | string | 否 | 零税率标识:0代表正常税率1出口免税和其他免税优惠政策(免税)2不征增值税(不征税)3普通零税率(0%) | |
» fyxm[0][zzstsgl] | body | string | 否 | 增值税特殊管理(咨询技术人员) | |
» hjje | body | string | 是 | 合计金额 | |
» hjse | body | string | 是 | 合计税额 | |
» jshj | body | string | 是 | 加税合计 | |
» kce | body | number | 否 | 扣除额 | |
» kpr | body | string | 否 | 开票人 | |
» skr | body | string | 否 | 收款人 | |
» fhr | body | string | 否 | 复核人 | |
» gfkhdh | body | string | 否 | 购方电话 | |
» gfkhyx | body | string | 否 | 购方邮箱 | |
» slsm | body | string | 否 | 税率说明(小规模纳税人开具3税率使用)前期已开具发票,发生销售折让、中止或者退回等情形需要开具红字发票,或者开票有误需要重新开具传2,因为实际经营业务需要,放弃享受减按1%征收率征收增值税政策传3 | |
» bz | body | string | 否 | 备注 255个字符以内 | |
» gfzrrbs | body | string | 否 | 购方自然人标识,N:企业Y:个人不传默认为N | |
» xfzrrbs | body | string | 否 | 销方自然人标识,可用值N,Y(不传值为N) | |
» gfxxConfirm | body | string | 否 | 确认购方信息是否存在,值为1是不确认。购方信息可能会报(当前未查询到购买方纳税人信息,请确认是否继续开具),默认是确认,意思是不管购方信息是否真实存在都进行开具 | |
» spflxConfirm | body | string | 否 | 是否开启自然人校验,1:开启,空:不开启/继续开票 | |
» sfzsgmfyhzh | body | string | 否 | 是否展示购方银行账号到备注里面y/Y展示,其他否 | |
» sfzsxsfyhzh | body | string | 否 | 是否展示销方银行账号到备注里面y/Y展示,其他否 |
返回示例
成功
{
"code": 200,
"msg": "成功",
"data": {
"Fphm": "22111111111111111180",
"Kprq": "2022-11-28 15:28:11",
"Gmfyx": null,
"GmfSsjswjgdm": null
},
"total": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» code | integer | true | none | none | |
» msg | string | true | none | none | |
» data | object | true | none | none | |
»» Fphm | string | true | none | none | |
»» Kprq | string | true | none | none | |
»» Gmfyx | null | true | none | none | |
»» GmfSsjswjgdm | null | true | none | none | |
» total | integer | true | none | none |
POST 获取版式文件
POST /qdjk/fullExteriorInvoke/getInvoicePdfOfd
用于获取pdf、odf、xml等版式的发票文件
Body 请求参数
username: "{{username}}"
downflag: "1"
nsrsbh: "{{nsrsbh}}"
fphm: "22512000000000007325"
kprq: "20230201120326"
addSeal: "1"
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» username | body | string | 否 | 局端账号 | |
» downflag | body | string | 是 | 获取版式类型1:PDF2:OFD3:XML4:下载地址 | |
» nsrsbh | body | string | 是 | 纳税人识别号纳税人识别号 | |
» fphm | body | string | 是 | 发票号码发票号码 | |
» kprq | body | string | 否 | 开票日期格式:yyyyMMddHHmmss | |
» addSeal | body | string | 否 | 是否添加签章默认不添加,1-添加,其余任意值-不添加 |
返回示例
成功
{
"code": 200,
"msg": "成功",
"message": "成功",
"data": {
"pdfUrl": "https://dppt.beijing.chinatax.gov.cn:8443/kpfw/fpjfzz/v1/exportDzfpwjEwm?Wjgs=PDF&Jym=5C91&Fphm=24112000000064654320&Kprq=20240619193407&Czsj=1718797610288",
"ofdUrl": "https://dppt.beijing.chinatax.gov.cn:8443/kpfw/fpjfzz/v1/exportDzfpwjEwm?Wjgs=OFD&Jym=5C91&Fphm=24112000000064654320&Kprq=20240619193407&Czsj=1718797610288",
"xmlUrl": "https://dppt.beijing.chinatax.gov.cn:8443/kpfw/fpjfzz/v1/exportDzfpwjEwm?Wjgs=XML&Jym=5C91&Fphm=24112000000064654320&Kprq=20240619193407&Czsj=1718797610288"
},
"total": 0
}
{
"code": 200,
"msg": "成功",
"data": "base64 加密字符串",
"total": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» code | integer | true | none | none | |
» msg | string | true | none | none | |
» data | string | true | none | none | |
» total | integer | true | none | none |
POST 登录电票平台
POST /qdjk/fullExteriorInvoke/loginDppt
用于接入电子税局
第一次调用获取短信验证码,第二次调用传入短信验证码后接入电子税局
Body 请求参数
nsrsbh: "{{nsrsbh}}"
sms: string
cert: string
ewmlx: string
ewmid: string
username: "{{username}}"
password: string
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» nsrsbh | body | string | 是 | 纳税人识别号 | |
» sms | body | string | 否 | 验证码(第一次调用不传验证码,会发送验证码,第二次调用传验证码登录,会返回uuid) | |
» cert | body | string | 否 | 值为1使用证书登录,证书登录不需要验证码,直接返回登录成功或失败原因值为2使用软证书登录,证书登录不需要验证码,直接返回登录成功或失败原因 | |
» ewmlx | body | string | 否 | 1人脸二维码登录,10税务app扫码登录 | |
» ewmid | body | string | 否 | 第一次调用只传二维码类型,会返回ewmid和二维码的base64,第二次调用二维码类型跟第一次调用值必须一样,ewmid使用第一次返回pinString否软证书口令,cert为2时如果有就传 | |
» username | body | string | 是 | none | |
» password | body | string | 是 | none |
返回示例
成功
{
"code": 200,
"msg": "成功",
"message": "成功",
"data": "88a5cfc741ff48eeb11d9d30b6b32a81",
"total": 0
}
{
"code": 999,
"msg": "可信错误:该用户未注册,请在自然人业务入口进行用户注册",
"message": "可信错误:该用户未注册,请在自然人业务入口进行用户注册",
"data": null,
"total": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» code | integer | true | none | none | |
» msg | string | true | none | none | |
» message | string | true | none | none | |
» data | string | true | none | none | |
» total | integer | true | none | none |
POST 发票详细查询
POST /qdjk/fullExteriorInvoke/invoiceQueryMx
用于查询发票的详细信息
Body 请求参数
username: "{{username}}"
nsrsbh: "{{nsrsbh}}"
fphm: 2XXXXXXXXXXXXXXXXXXX
fpqqlsh: "123678907523112"
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» username | body | string | 是 | 局端账号 | |
» nsrsbh | body | string | 是 | 纳税人识别号 纳税人识别号 | |
» fphm | body | string | 否 | 发票号码 全电票发票号码,跟发票请求流水号两者必填其一 | |
» fpqqlsh | body | string | 是 | 发票请求流水号 发票请求流水号,跟全电票发票号码两者必填其一 |
返回示例
成功
{
"code": 200,
"msg": "成功",
"message": "成功",
"data": {
"kdsbz": null,
"zlqqz": null,
"gmfjbr": "",
"kce": "0",
"swjgmc": null,
"fpcbh": null,
"swjgdm": null,
"fwfsd": null,
"skm": "",
"yfpdm": "",
"ghdwdm": "",
"id": "b2952853-b739-4ae9-89c2-db0a3d4b6678",
"skr": "",
"mxzb": null,
"dfgtgmbq": "",
"GFKHDH": "",
"ip": null,
"zfrdm": "",
"bbh": "",
"zfdqsj": null,
"dphgzbh": null,
"spbmjc": "",
"fullAddress": null,
"bmbbbh": "",
"ghdwyhzh": " ",
"jshj": "1",
"jbrzrrnsrsbh": "",
"zhsl": null,
"qmbz": "",
"spsm": "",
"hczt": null,
"slsm": "",
"tdyslxDm": "",
"czydm": "bjmn",
"yqbz": "",
"hssign": "",
"jzxmmc": null,
"ghdwdzdh": " ",
"fpqqlsh": "9111011457319202X9_01",
"kpjh": "",
"se": "0.01",
"tdzzsxmbh": null,
"zfrq": "",
"kprq": "20240619193407",
"bz": "",
"ssyf": "",
"ghdwmc": "个人",
"scbsbz": "",
"hdjsjg": null,
"jbrsfzjlx": "",
"kpddm": "",
"zkbz": "",
"sfyytljdj": null,
"sfsdts": "0",
"zfyy": "",
"ncpsgzjlx": null,
"zyspmc": "*软件*票单云财税管理系统",
"fphm": "24112000000064654320",
"wqhtbabh": null,
"ceburl": "",
"tscbz": "0",
"bchcbz": null,
"dqsj": "2024-06-19 19:34:07",
"hjje": "0.99",
"tqm": "",
"yfphm": "",
"zzfphm": "",
"scbz": "",
"qdbz": "",
"hjzkje": null,
"kpr": "",
"kpdwdm": "9111011457319202X9",
"fplxdm": "82",
"fpzt": "00",
"rzzt": null,
"qmcs": "",
"DZDH": "",
"tzdh": "",
"tdys": [],
"fdjhm": null,
"GFKHYX": "",
"zffs": "",
"hjzkse": null,
"zfr": "",
"sfwzzfp": "0",
"sccgsj": "",
"dxtsbz": "0",
"qmz": "",
"jbrsfzjhm": "",
"xhdwdm": "9111011457319202X9",
"fpdm": "",
"hcFphm": null,
"xhdwdzdh": "北京市昌平区东小口镇天通中苑二区21号楼2层1428 135819133199",
"zbmx": [
{
"id": "848d9a9a-398c-4e14-b3fb-968aa8bf61ba",
"mxid": "b2952853-b739-4ae9-89c2-db0a3d4b6678",
"fpdm": "",
"fphm": "24112000000064654320",
"fpmxxh": "1",
"xsdjbh": "",
"fphxz": "0",
"je": "0.990000000000000000",
"sl": "0.01",
"se": "0.01",
"spmc": "*软件*票单云财税管理系统",
"spsm": "",
"ggxh": "V1",
"dw": "年",
"spsl": 1,
"spdj": 0.990099009901,
"hsbz": "0",
"spbm": "1060301020100000000",
"djmxxh": null,
"bb": "",
"zxbm": "",
"yhzcbs": "0",
"lslbs": "",
"zzstsgl": "",
"kprq": "20240619193407",
"jqbh": "",
"xhdwdm": "9111011457319202X9",
"hsje": 1,
"hsdj": 1,
"kpdwdm": "9111011457319202X9",
"cepzmx": null,
"cqzsh": null
}
],
"jbrgjlx": "",
"fhr": "",
"fjys": null,
"sjcjhsje": null,
"hsslbs": "",
"xhdwmc": "北京民诺科技有限公司",
"jqbh": "",
"tspz": "",
"tzdbh": "",
"xhdwyhzh": "中国工商银行股份有限公司北京西三旗支行 0200240109200016984",
"zsfs": "0"
},
"total": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» code | integer | true | none | none | |
» msg | string | true | none | none | |
» data | object | true | none | none | |
»» kdsbz | null | true | none | none | |
»» ceburl | string | true | none | none | |
»» zlqqz | null | true | none | none | |
»» tscbz | string | true | none | none | |
»» dqsj | string | true | none | none | |
»» kce | integer | true | none | none | |
»» swjgmc | string | true | none | none | |
»» hjje | number | true | none | none | |
»» fpcbh | null | true | none | none | |
»» swjgdm | string | true | none | none | |
»» tqm | string | true | none | none | |
»» yfphm | string | true | none | none | |
»» fwfsd | null | true | none | none | |
»» skm | string | true | none | none | |
»» yfpdm | string | true | none | none | |
»» ghdwdm | string | true | none | none | |
»» zzfphm | string | true | none | none | |
»» id | string | true | none | none | |
»» skr | string | true | none | none | |
»» scbz | string | true | none | none | |
»» qdbz | string | true | none | none | |
»» GFKHDH | string | true | none | none | |
»» hjzkje | null | true | none | none | |
»» zfrdm | string | true | none | none | |
»» bbh | string | true | none | none | |
»» zfdqsj | null | true | none | none | |
»» kpr | string | true | none | none | |
»» kpdwdm | string | true | none | none | |
»» fplxdm | string | true | none | none | |
»» fpzt | string | true | none | none | |
»» spbmjc | string | true | none | none | |
»» fullAddress | null | true | none | none | |
»» bmbbbh | string | true | none | none | |
»» qmcs | string | true | none | none | |
»» DZDH | string | true | none | none | |
»» ghdwyhzh | string | true | none | none | |
»» jshj | integer | true | none | none | |
»» tzdh | string | true | none | none | |
»» GFKHYX | string | true | none | none | |
»» zhsl | null | true | none | none | |
»» zffs | string | true | none | none | |
»» qmbz | string | true | none | none | |
»» spsm | string | true | none | none | |
»» hjzkse | null | true | none | none | |
»» slsm | string | true | none | none | |
»» tdyslxDm | null | true | none | none | |
»» czydm | string | true | none | none | |
»» zfr | string | true | none | none | |
»» yqbz | string | true | none | none | |
»» hssign | string | true | none | none | |
»» jzxmmc | null | true | none | none | |
»» ghdwdzdh | string | true | none | none | |
»» sfwzzfp | string | true | none | none | |
»» fpqqlsh | string | true | none | none | |
»» kpjh | string | true | none | none | |
»» se | number | true | none | none | |
»» tdzzsxmbh | null | true | none | none | |
»» zfrq | string | true | none | none | |
»» sccgsj | string | true | none | none | |
»» kprq | string | true | none | none | |
»» bz | string | true | none | none | |
»» ssyf | string | true | none | none | |
»» dxtsbz | string | true | none | none | |
»» qmz | string | true | none | none | |
»» ghdwmc | string | true | none | none | |
»» xhdwdm | string | true | none | none | |
»» fpdm | string | true | none | none | |
»» scbsbz | string | true | none | none | |
»» xhdwdzdh | string | true | none | none | |
»» hdjsjg | null | true | none | none | |
»» zbmx | [object] | true | none | none | |
»»» id | string | false | none | none | |
»»» mxid | string | false | none | none | |
»»» fpdm | string | false | none | none | |
»»» fphm | string | false | none | none | |
»»» fpmxxh | string | false | none | none | |
»»» xsdjbh | string | false | none | none | |
»»» fphxz | string | false | none | none | |
»»» je | string | false | none | none | |
»»» sl | string | false | none | none | |
»»» se | string | false | none | none | |
»»» spmc | string | false | none | none | |
»»» spsm | string | false | none | none | |
»»» ggxh | string | false | none | none | |
»»» dw | string | false | none | none | |
»»» spsl | integer | false | none | none | |
»»» spdj | number | false | none | none | |
»»» hsbz | string | false | none | none | |
»»» spbm | string | false | none | none | |
»»» djmxxh | null | false | none | none | |
»»» bb | string | false | none | none | |
»»» zxbm | string | false | none | none | |
»»» yhzcbs | string | false | none | none | |
»»» lslbs | string | false | none | none | |
»»» zzstsgl | string | false | none | none | |
»»» kprq | string | false | none | none | |
»»» jqbh | string | false | none | none | |
»»» xhdwdm | null | false | none | none | |
»»» hsje | integer | false | none | none | |
»»» hsdj | integer | false | none | none | |
»»» kpdwdm | string | false | none | none | |
»»» cepzmx | null | false | none | none | |
»»» cqzsh | null | false | none | none | |
»» kpddm | string | true | none | none | |
»» zkbz | string | true | none | none | |
»» fhr | string | true | none | none | |
»» sfsdts | string | true | none | none | |
»» zfyy | string | true | none | none | |
»» sjcjhsje | null | true | none | none | |
»» hsslbs | string | true | none | none | |
»» xhdwmc | string | true | none | none | |
»» jqbh | string | true | none | none | |
»» zyspmc | string | true | none | none | |
»» fphm | string | true | none | none | |
»» jym | string | true | none | none | |
»» tzdbh | string | true | none | none | |
»» wqhtbabh | null | true | none | none | |
»» xhdwyhzh | string | true | none | none | |
»» zsfs | string | true | none | none |
POST 授信额度查询
POST /qdjk/allElectricInvoice/getCreditLine
用于查询企业剩余的可开票额度(金额)
Body 请求参数
nsrsbh: "{{nsrsbh}}"
username: "{{username}}"
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» nsrsbh | body | string | 是 | 纳税人识别号 | |
» username | body | string | 是 | 局端账号 |
返回示例
成功
{
"code": 200,
"msg": "成功",
"data": {
"sysxed": "剩余授信额度-保留 2 位小数",
"zsxed": "总授信额度-保留 2 为小数"
},
"total": 1
}
{
"code": 200,
"msg": "成功",
"message": "成功",
"data": {
"zsxed": "3000000.00",
"kjlpzs": "1",
"sysxed": "2995145.63",
"fpejse": "145.63",
"ysysxed": "4854.37",
"fphjje": "4854.37"
},
"total": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» code | integer | true | none | none | |
» msg | string | true | none | none | |
» data | object | true | none | none | |
»» sysxed | string | true | none | 剩余授信额度 | none |
»» zsxed | string | true | none | 总授信额度 | none |
»» kjlpzs | string | true | none | none | |
»» fpejse | string | true | none | none | |
»» ysysxed | string | true | none | none | |
»» fphjje | string | true | none | none | |
» total | integer | true | none | none | |
» message | string | true | none | none |
POST 获取是否需要人脸识别
POST /qdjk/fullApplets/queryFaceAuthState
用于开票时判断是否需要人脸识别授权认证
目前,税局要求开票人在开票时进行授权认证,48小时内至少认证一次
Body 请求参数
nsrsbh: 91510113MA6739XPX2
username: "{{username}}"
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» nsrsbh | body | string | 是 | 纳税人识别号 | |
» username | body | string | 是 | 局端账号 |
返回示例
成功
{
"code": 200,
"msg": "成功",
"data": "eyJZampiIjoiMDEiLCJTeGxiIjoiMyIsIlNmc2wiOiJZIiwiSXRzU2NhbkZsYWciOiJOIn0=",
"total": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» code | integer | true | none | none | |
» msg | string | true | none | none | |
» data | string | true | none | 需要用base64解码,如:{“yjjb”:“01”,“Sxlb”:“3”,“Sfsl”:“Y”,““ItsScanFlag”:“N”},其中,Sfsl(是否扫脸)值为N则不需要,值为Y则需要 | |
» total | integer | true | none | none |
数电票接口V1-企业版/开具红字发票
POST 申请红字前查蓝票信息
POST /qdjk/fullExteriorInvoke/retInviceMsg
申请红字前查蓝票信息
开红字发票前,需要首先查询该发票是否可红冲
Body 请求参数
username: 135********
nsrsbh: "{{nsrsbh}}"
fphm: string
sqyy:
- ""
xhdwsbh: string
kprq: string
tdyslxDm: string
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» username | body | string | 是 | 局端账号 | |
» nsrsbh | body | string | 是 | 纳税人识别号 | |
» fphm | body | string | 是 | 发票号码 | |
» sqyy | body | array | 否 | 申请类型,2:销方红冲;3:购方红冲 | |
» xhdwsbh | body | string | 否 | (购方申请时必填)原票销方税号 | |
» kprq | body | string | 否 | (购方申请时必填)原发票开票日期,格式为:yyyy-MM-dd HH:mm:ss | |
» tdyslxDm | body | string | 否 | (购方申请时必填)特定要素类型代码,原发票有就填写 |
返回示例
成功
{
"code": 200,
"msg": "成功",
"message": "成功",
"data": {
"fphm": "24112000000064654320",
"message": "成功,本张发票可以开负数!",
"xhdwsbh": "9111011457319202X9",
"xhdwmc": "北京民诺科技有限公司",
"ghdwsbh": null,
"ghdwmc": "个人",
"kprq": "2024-06-19 19:34:07",
"hjje": -0.99,
"hjse": -0.01,
"fplxdm": "82",
"tdyslxdm": null,
"zsfs": "0",
"jbr": null,
"XfsytDm": "00",
"ZzsytDm": "03",
"FprzztDm": "00",
"mxzb": [
{
"xh": 1,
"sl": 0.01,
"dw": "年",
"spmc": "*软件*票单云财税管理系统",
"se": -0.01,
"je": -0.99,
"spdj": "0.990099009901",
"ggxh": "V1",
"spsl": "-1",
"spbm": "1060301020100000000",
"zxbm": "",
"hsbz": "",
"yhzcbs": "0",
"bb": "",
"zzstsgl": null,
"sqdh": "",
"lslbs": ""
}
]
},
"total": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» code | integer | true | none | none | |
» msg | string | true | none | none | |
» message | string | true | none | none | |
» data | object | true | none | none | |
»» fphm | string | true | none | 发票号码 | |
»» message | string | true | none | none | |
»» xhdwsbh | string | true | none | 销方税号 | |
»» xhdwmc | string | true | none | 销方名称 | |
»» ghdwsbh | null | true | none | 购方税号 | |
»» ghdwmc | string | true | none | 购方名称 | |
»» kprq | string | true | none | 开票日期 | |
»» hjje | number | true | none | 合计金额 | |
»» hjse | number | true | none | 合计税额 | |
»» fplxdm | string | true | none | 发票类型代码 | |
»» tdyslxdm | string | true | none | 特定要素类型代码 | |
»» zsfs | string | true | none | 征收方式 | |
»» jbr | string | true | none | 经办人 | |
»» XfsytDm | string | true | none | 消费税用途状态 00 未勾选 | |
»» ZzsytDm | string | true | none | 增值税用户状态 03 未勾选 | |
»» FprzztDm | string | true | none | 发票入账状态 00 未入账 | |
»» mxzb | [object] | true | none | none | |
»»» xh | integer | false | none | none | |
»»» sl | number | false | none | none | |
»»» dw | string | false | none | none | |
»»» spmc | string | false | none | none | |
»»» se | number | false | none | none | |
»»» je | number | false | none | none | |
»»» spdj | string | false | none | none | |
»»» ggxh | string | false | none | none | |
»»» spsl | string | false | none | none | |
»»» spbm | string | false | none | none | |
»»» zxbm | string | false | none | none | |
»»» hsbz | string | false | none | none | |
»»» yhzcbs | string | false | none | none | |
»»» bb | string | false | none | none | |
»»» zzstsgl | null | false | none | none | |
»»» sqdh | string | false | none | none | |
»»» lslbs | string | false | none | none | |
» total | integer | true | none | none |
POST 红字发票开具
POST /qdjk/fullExteriorInvoke/hzfpkj
开红字发票
需要先申请红字信息表
Body 请求参数
username: 135*****
fpqqlsh: 1111_1111
xhdwsbh: "{{nsrsbh}}"
tzdbh: "11011424061000028528"
yfphm: "24112000000064654320"
tdyslxDm: string
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» username | body | string | 是 | 局端账号 | |
» fpqqlsh | body | string | 是 | 发票流水号,要求“税号_自定义编号” | |
» xhdwsbh | body | string | 是 | 销方税号 | |
» tzdbh | body | string | 是 | 红字信息表编号 | |
» yfphm | body | string | 是 | 原发票号码 | |
» tdyslxDm | body | string | 否 | 特殊票种 |
返回示例
成功
{
"code": 200,
"msg": "负数发票开具成功",
"message": "负数发票开具成功",
"data": {
"fphm": "24112000000064636722",
"kprq": "2024-06-19 19:55:40",
"xhdwsbh": "9111011457319202X9",
"ghdwsbh": "",
"xhdwmc": "北京民诺科技有限公司",
"ghdwmc": "个人",
"jshj": -1,
"xxbbh": "11011424061000028528"
},
"total": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» code | integer | true | none | none | |
» msg | string | true | none | none | |
» message | string | true | none | none | |
» data | object | true | none | none | |
»» fphm | string | true | none | 红字发票号码 | |
»» kprq | string | true | none | 开票日期 | |
»» xhdwsbh | string | true | none | 销方税号 | |
»» ghdwsbh | string | true | none | 购方税号 | |
»» xhdwmc | string | true | none | 销方名称 | |
»» ghdwmc | string | true | none | 购方名称 | |
»» jshj | integer | true | none | 价税合计 | |
»» xxbbh | string | true | none | 红字信息表编号 | |
» total | integer | true | none | none |
POST 申请红字信息表
POST /qdjk/fullExteriorInvoke/hzxxbsq
申请红字信息表
开负数发票前,需要先申请红字信息表
Body 请求参数
username: 135*******
xhdwsbh: "{{nsrsbh}}"
yfphm: 240****
chyydm: "01"
sqyy: "2"
sdfpbz: string
hzxxbcheck: string
请求参数
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» username | body | string | 是 | 局端账号 | |
» xhdwsbh | body | string | 是 | 销方税号 | |
» yfphm | body | string | 是 | 发票号码 | |
» chyydm | body | string | 是 | 申请红字信息表原因代码:01,开票有误;02,销货退回;03,服务中止;04,销售折让。目前局端部分冲红只支持:02,销货退回 ;03,服务中止。商品服务编码仅为服务时红冲原因不允许选择“02,销售退回”如原蓝字发票商品服务编码仅为货物或劳务时红冲原因不允许选择“03,服务中止” | |
» sqyy | body | string | 是 | (暂时只支持)2:销方全额红冲;3:购方全额红冲 | |
» sdfpbz | body | string | 否 | 数电发票标志 。只有数电纸票才需要该节点,蓝票是数电纸票,开具负数数电发票,该节点传 1 | |
» hzxxbcheck | body | string | 否 | 红字信息表校验标志。传 1 不校验,直接去 1局端申请,否则申请过红字信息表返回申请过的数据 |
返回示例
成功
{
"code": 200,
"msg": "成功",
"message": "成功",
"data": {
"sqsj": "2024-06-19 19:55:40",
"xxbztDm": "01",
"xxbbh": "11011424061000028528",
"uuid": "4e75f060b492476383338a63aa96537a",
"xxbzt": "无需确认"
},
"total": 0
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» code | integer | true | none | none | |
» msg | string | true | none | none | |
» message | string | true | none | none | |
» data | object | true | none | none | |
»» sqsj | string | true | none | 申请时间 | |
»» xxbztDm | string | true | none | 红字信息表状态代码 见附件三 | |
»» xxbbh | string | true | none | 红字信息表编号 | |
»» uuid | string | true | none | 红字信息表状态 | |
»» xxbzt | string | true | none | none | |
» total | integer | true | none | none |