数电发票红冲API
API说明:乐企数电红冲接口
调用方式:HTTP协议
API编码:ECXML.LQQEHPKJ
调用方法:POST(XML文件流)
请求报文规范
<REQUEST_QDQEHC class="REQUEST_QDQEHC">
<FPQQLSH>发票请求唯一流水号</FPQQLSH>
<LZFPHM>蓝字发票号码</LZFPHM>
<LZFPDM>蓝字发票代码</LZFPDM>
<HZTZD>红票通知单编号</HZTZD>
<HZQRDUUID>红字确认单uuid</HZQRDUUID>
</REQUEST_QDQEHC>
字段说明
数据项 | 名称 | 类型 | 长度 | 必须 | 说明 |
---|---|---|---|---|---|
FPQQLSH | 发票请求唯一流水号 | varchar | 50 | 是 | 每张发票的发票请求唯一流水号无重复,由企业定义。前8位是企业的DSPTBM值。长度限制20~50位,可由数字,字母和下划线组成,不能有特殊字符(如中文,单斜杠,双斜杠等) |
LZFPHM | 蓝字发票号码 | varchar | 20 | 是 | |
LZFPDM | 蓝字发票代码 | varchar | 20 | 否 | 乐企用户红冲税控发票时填写 |
HZTZD | 红字信息表编号 | varchar | 2 | 否 | 双轨时,乐企红冲税控发票无需填写 |
HZQRDUUID | 红字确认单uuid | varchar | 32 | 否 | 双轨时,乐企红冲税控发票无需填写 |
示例报文
请求报文示例
<?xml version="1.0" encoding="utf-8"?>
<interface
xmlns=""
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.chinatax.gov.cn/tirip/dataspec/interfaces.xsd"
version="DZFP1.0">
<globalInfo>
<terminalCode>0</terminalCode>
<appId>ZZS_PT_DZFP</appId>
<version>1.0</version>
<interfaceCode>ECXML.LQQEHPKJ</interfaceCode>
<requestCode>P1000001</requestCode>
<requestTime>2019-04-18 09:40:30</requestTime>
<responseCode>121</responseCode>
<dataExchangeId>P1000001ECXML.FPKJ.BC.E_INV20161128eXl4EymmJ
</dataExchangeId>
<userName>P1000001</userName>
<passWord></passWord>
<taxpayerId>913101010000000090</taxpayerId>
<authorizationCode>NH873FG4KW</authorizationCode>
</globalInfo>
<returnStateInfo>
<returnCode />
<returnMessage />
</returnStateInfo>
<Data>
<dataDescription>
<zipCode>0</zipCode>
<encryptCode>1</encryptCode>
<codeType>3DES</codeType>
</dataDescription>
<content>
<REQUEST_QDQEHC class="REQUEST_QDQEHC">
<FPQQLSH>P1000001test_000000001</FPQQLSH>
<LZFPHM>12345678901234667890</LZFPHM>
<HZTZD>31011522111003111330</HZTZD>
<HZQRDUUID>4c8074b35e914d56a5e4915197ea5e98</HZQRDUUID>
</REQUEST_QDQEHC>
</content>
</Data>
</interface>
返回报文示例(成功)
<?xml version="1.0" encoding="UTF-8"?>
<interface
xmlns:schemaLocation="http://www.chinatax.gov.cn/tirip/dataspec/interfaces.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="WLFP1.0">
<globalInfo>
<terminalCode>0</terminalCode>
<appId>DZFP</appId>
<version>1.0</version>
<interfaceCode>ECXML.LQQEHPKJ</interfaceCode>
<requestCode>P1000001</requestCode>
<requestTime>2019-04-18 09:40:30</requestTime>
<responseCode>121</responseCode>
<dataExchangeId>P1000001ECXML.FPKJ.BC.E_INV20170407eXl4EymmJ</dataExchangeId>
<userName>P1000001</userName>
<passWord></passWord>
<taxpayerId>913101010000000090</taxpayerId>
<authorizationCode>NH873FG4KW</authorizationCode>
</globalInfo>
<returnStateInfo>
<returnCode>0000</returnCode>
<returnMessage>5o6l5pS25byA56Wo5pWw5o2u5oiQ5Yqf77yB</returnMessage>
</returnStateInfo>
<Data>
<dataDescription>
<zipCode>0</zipCode>
<encryptCode>1</encryptCode>
<codeType>3DES</codeType>
</dataDescription>
<content/>
</Data>
</interface>
返回报文示例(失败)
<?xml version="1.0" encoding="UTF-8"?>
<interface
xmlns:schemaLocation="http://www.chinatax.gov.cn/tirip/dataspec/interfaces.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="WLFP1.0">
<globalInfo>
<terminalCode>0</terminalCode>
<appId>DZFP</appId>
<version>1.0</version>
<interfaceCode>ECXML.LQQEHPKJ</interfaceCode>
<requestCode>P1000001</requestCode>
<requestTime>17-04-07 16:40:30</requestTime>
<responseCode>121</responseCode>
<dataExchangeId>P1000001ECXML.FPKJ.BC.E_INV20170407eXl4EymmJ</dataExchangeId>
<userName>P1000001</userName>
<passWord></passWord>
<taxpayerId>913101010000000090</taxpayerId>
<authorizationCode>NH873FG4KW</authorizationCode>
</globalInfo>
<returnStateInfo>
<returnCode>9999(或者是其它错误码)</returnCode>
<returnMessage>Base64(错误信息)</returnMessage>
</returnStateInfo>
<Data>
<dataDescription>
<zipCode>0</zipCode>
<encryptCode>1</encryptCode>
<codeType>3DES</codeType>
</dataDescription>
<content/>
</Data>
</interface>