获取数电纸票发票打印xml内容API
API说明:获取数电纸票发票打印xml内容接口
调用方式:HTTP协议
API编码:ECXML.FPDYXMLXZ
调用方法:POST(XML文件流)
请求报文规范
<REQUEST_FPDYXML class="REQUEST_FPDYXML">
<NSRSBH>纳税人识别号</NSRSBH>
<FPHM>发票号码</FPHM>
<DYLX>打印类型</DYLX>
<HZQRDBH>红字确认单编号</HZQRDBH>
</REQUEST_FPDYXML>
字段说明
数据项 | 名称 | 类型 | 长度 | 必须 | 说明 |
---|---|---|---|---|---|
NSRSBH | 纳税人识别号 | varchar | 20 | 是 | |
FPHM | 发票号码 | varchar | 20 | 是 | |
DYLX | 打印类型 | varchar | 1 | 是 | 打印类型: 发票打印为0 清单打印为1 |
HZQRDBH | 红字确认单编号 | varchar | 32 | 是 | 红字确认单编号 |
返回报文规范
<RESPONSE_FPDYXMLXZ class="RESPONSE_FPDYXMLXZ">
<XMLKEY>要打印发票的Base64</XMLKEY>
</RESPONSE_FPDYXMLXZ>
字段说明
数据项 | 名称 | 类型 | 长度 | 必须 | 说明 |
---|---|---|---|---|---|
XMLKEY | 要打印发票的Base64 | varchar | 是 | 打印服务所需要的XMLKey |
示例报文
请求报文示例
<?xml version="1.0" encoding="utf-8"?>
<interface
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.FPDYXMLXZ</interfaceCode>
<requestCode>P1000001</requestCode>
<requestTime>2016-11-28 10:19:16</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></returnCode>
<returnMessage></returnMessage>
</returnStateInfo>
<Data>
<dataDescription>
<zipCode>0</zipCode>
<encryptCode>1</encryptCode>
<codeType>3DES</codeType>
</dataDescription>
<content>
<REQUEST_FPDYXML class="REQUEST_FPDYXML">
<NSRSBH>913101010000000090</NSRSBH>
<FPHM>12345678901234567890</FPHM>
<DYLX>0</DYLX>
<HZQRDBH></HZQRDBH>
</REQUEST_FPDYXML>
</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>ZZS_PT_DZFP</appId>
<version>1</version>
<interfaceCode>ECXML.FPDYXMLXZ</interfaceCode>
<requestCode>121</requestCode>
<requestTime>2018-11-21 10:19:16</requestTime>
<responseCode />
<dataExchangeId>P1000001ECXML.FPKJ.BC.E_INV20161128eXl4EymmJ</dataExchangeId>
<userName>P1000001</userName>
<passWord/>
<taxpayerId>913101010000000090</taxpayerId>
<authorizationCode>NH873FG4KW</authorizationCode>
</globalInfo>
<returnStateInfo>
<returnCode>0000</returnCode>
<returnMessage>5p+l6K+i5Y2V5byg5byA56Wo6ZmQ6aKd5L+h5oGv5oiQ5Yqf77yB</returnMessage>
</returnStateInfo>
<Data>
<dataDescription>
<zipCode>0</zipCode>
<encryptCode>1</encryptCode>
<codeType>3DES</codeType>
</dataDescription>
<content>
<RESPONSE_FPDYXMLXZ class="RESPONSE_FPDYXMLXZ">
<XMLKEY>要打印发票的Base64</XMLKEY>
</RESPONSE_FPDYXMLXZ>
</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>ZZS_PT_DZFP</appId>
<version>2.0</version>
<interfaceCode>ECXML.FPDYXMLXZ</interfaceCode>
<requestCode>P1000001</requestCode>
<requestTime>2019-04-18 10:30:42</requestTime>
<responseCode>121</responseCode>
<dataExchangeId>P100000120160801000000001</dataExchangeId>
<userName>P1000001</userName>
<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>