红字发票信息表查询接口API
API说明:企业红冲电子专票时,可通过该接口查询红字通知单信息
调用方式:HTTP协议
API编码:ECXML.TAXCONTROLOPERATIONRESULT.QUERY
调用方法:POST(XML文件流)
请求报文规范
<REQUEST_TEXCONTROLOPERATION_RESULT class="REQUEST_TEXCONTROLOPERATION_RESULT">
<NSRSBH>开票方识别号</NSRSBH>
<FJH>分机号</FJH>
<HZTZLSH>红字通知单申请流水号</HZTZLSH>
</REQUEST_TEXCONTROLOPERATION_RESULT>
字段说明
数据项 | 名称 | 类型 | 长度 | 必须 | 说明 |
---|---|---|---|---|---|
NSRSBH | 纳税人识别号 | varchar | 20 | 是 | |
FJH | 分机号 | varchar | 是 | 金税盘:0是主机,非0是分机。 范围0-65535 UKey:传设备编号 |
|
HZTZLSH | 红字通知申请流水号 | varchar | 40 | 是 |
返回报文规范
<RESPONSE_TEXCONTROLOPERATION_RESULT class="RESPONSE_TEXCONTROLOPERATION_RESULT">
<NSRSBH>纳税人识别号</NSRSBH>
<FJH>分机号</FJH>
<HZTZLSH>红字通知单申请流水号</HZTZLSH>
<RESBILLNO>信息表编号</RESBILLNO>
<STATUSDM>信息表状态代码</STATUSDM>
<STATUSMC>信息表状态描述</STATUSMC>
</RESPONSE_TEXCONTROLOPERATION_RESULT>
字段说明
数据项 | 名称 | 类型 | 长度 | 必须 | 说明 |
---|---|---|---|---|---|
NSRSBH | 纳税人识别号 | varchar | 20 | 是 | |
FJH | 分机号 | varchar | 是 | ||
HZTZLSH | 红字通知申请流水号 | varchar | 40 | 是 | |
RESBILLNO | 信息表编号 | varchar | 是 | 用于发票红冲 | |
STATUSDM | 信息表状态代码 | varchar | 是 | TZD0000、TZD1000表示可以填开红票; TZD2000:购方【商品简称1、商品简称2……】与库存油品编码不一致,已退回; TZD2001:购方成品油库存数不足,已退回。 可用库存数【商品简称1:xx升;商品简称2:xx升;...】; TZD2002:销方【商品简称1、商品简称2……】与蓝票油品编码不一致,已退回; TZD2003:销方【商品简称1、商品简称2……】超出蓝票油品数量,已退回; TZD2004:同张发票不允许同时存在成品油和非成品油商品编码,已退回; TZD2005:成品油商品单位必须为吨或升,已退回 |
|
STATUSMC | 信息表状态描述 | varchar | 是 |
示例报文
请求报文示例
<?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.TAXCONTROLOPERATIONRESULT.QUERY</interfaceCode>
<requestCode>P1000001</requestCode>
<requestTime>17-04-07 16:40:30</requestTime>
<responseCode>121</responseCode>
<dataExchangeId>12183218361820170407eXl4EymmJ</dataExchangeId>
<userName>P1000001</userName>
<passWord></passWord>
<taxpayerId>913101010000000090</taxpayerId>
<authorizationCode>NH873FG4KW</authorizationCode>
</globalInfo>
<returnStateInfo>
<returnCode>0000</returnCode>
<returnMessage>5aSE55CG5oiQ5Yqf</returnMessage>
</returnStateInfo>
<Data>
<dataDescription>
<zipCode>0</zipCode>
<encryptCode>1</encryptCode>
<codeType>3DES</codeType>
</dataDescription>
<content>
<REQUEST_TEXCONTROLOPERATION_RESULT class="REQUEST_TEXCONTROLOPERATION_RESULT">
<NSRSBH>913101010000000090</NSRSBH>
<FJH>1</FJH>
<HZTZLSH>V5TQEACC20210621143524123456789012306</HZTZLSH>
</REQUEST_TEXCONTROLOPERATION_RESULT>
</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.TAXCONTROLOPERATIONRESULT.QUERY</interfaceCode>
<requestCode>P1000001</requestCode>
<requestTime>2019-04-18 09:40:30</requestTime>
<responseCode>121</responseCode>
<dataExchangeId>adaewredsaf20170407eXl4EymmJ</dataExchangeId>
<userName>P1000001</userName>
<passWord></passWord>
<taxpayerId>913101010000000090</taxpayerId>
<authorizationCode>NH873FG4KW</authorizationCode>
</globalInfo>
<returnStateInfo>
<returnCode>0000</returnCode>
<returnMessage>5aSE55CG5oiQ5Yqf</returnMessage>
</returnStateInfo>
<Data>
<dataDescription>
<zipCode>0</zipCode>
<encryptCode>1</encryptCode>
<codeType>3DES</codeType>
</dataDescription>
<content>
<RESPONSE_TEXCONTROLOPERATION_RESULT class="RESPONSE_TEXCONTROLOPERATION_RESULT">
<NSRSBH>913101010000000090</NSRSBH>
<FJH>1</FJH>
<HZTZLSH>V5TQEACC20210621143524123456789012306</HZTZLSH>
<RESBILLNO>3101122106126401</RESBILLNO>
<STATUSDM>TZD0000</STATUSDM>
<STATUSMC>审核通过</STATUSMC>
</RESPONSE_TEXCONTROLOPERATION_RESULT>
</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.TAXCONTROLOPERATIONRESULT.QUERY</interfaceCode>
<requestCode>P1000001</requestCode>
<requestTime>17-04-07 16:40:30</requestTime>
<responseCode>121</responseCode>
<dataExchangeId>21ewqdsafafx20170407eXl4EymmJ</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>