税务编码推荐API
API说明:根据传入的商品名称推荐商品编码
调用方式:HTTP协议
API编码:ECXML_SMARTCODE
调用方法:POST(XML文件流)
请求报文规范
<REQUEST_SMARTCODE class="REQUEST_SMARTCODE">
<XMMC>项目名称</XMMC>
</REQUEST_SMARTCODE>
字段说明
数据项 |
名称 |
类型 |
长度 |
必须 |
说明 |
XMMC |
项目名称 |
varchar |
90 |
是 |
|
返回报文规范
<RESPONSE_SMARTCODE class="RESPONSE_SMARTCODE">
<XMMC>项目名称</XMMC>
<SPBMCODES class="SPBMCODE;" size="1">
<SPBMCODE>
<NUM>推荐次序</NUM>
<SWBM>税务编码</SWBM>
<TJL>推荐率</TJL>
<SPJM>商品简码</SPJM>
<RATE>税率</RATE>
</SPBMCODE>
</SPBMCODES>
</RESPONSE_SMARTCODE>
字段说明
数据项 |
名称 |
类型 |
长度 |
必须 |
说明 |
XMMC |
项目名称 |
varchar |
90 |
是 |
|
NUM |
推荐次序 |
varchar |
5 |
是 |
|
SWBM |
推荐率 |
varchar |
20 |
是 |
|
TJL |
推荐率 |
varchar |
10 |
是 |
|
SPJM |
商品简码 |
varchar |
30 |
是 |
|
RATE |
税率 |
varchar |
8 |
否 |
|
示例报文
请求报文示例
<?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_SMARTCODE</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_SMARTCODE class="REQUEST_SMARTCODE">
<XMMC>鸡蛋</XMMC>
</REQUEST_SMARTCODE>
</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_SMARTCODE</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_SMARTCODE class="RESPONSE_SMARTCODE">
<XMMC>鸡蛋</XMMC>
<SPBMCODES class="SPBMCODE;" size="5">
<SPBMCODE>
<NUM>1</NUM>
<SWBM>1030201010000000000</SWBM>
<TJL>0.04</TJL>
<SPJM>焙烤食品</SPJM>
<RATE>13%</RATE>
</SPBMCODE>
<SPBMCODE>
<NUM>2</NUM>
<SWBM>1030203030000000000</SWBM>
<TJL>0.02</TJL>
<SPJM>方便食品</SPJM>
<RATE>13%</RATE>
</SPBMCODE>
<SPBMCODE>
<NUM>3</NUM>
<SWBM>1030203010000000000</SWBM>
<TJL>0.01</TJL>
<SPJM>方便食品</SPJM>
<RATE>13%、9%</RATE>
</SPBMCODE>
<SPBMCODE>
<NUM>4</NUM>
<SWBM>1030113020000000000</SWBM>
<TJL>0.01</TJL>
<SPJM>豆制品</SPJM>
<RATE>13%</RATE>
</SPBMCODE>
<SPBMCODE>
<NUM>5</NUM>
<SWBM>1030299000000000000</SWBM>
<TJL>0.01</TJL>
<SPJM>其他食品</SPJM>
<RATE>13%</RATE>
</SPBMCODE>
</SPBMCODES>
</RESPONSE_SMARTCODE>
</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_SMARTCODE</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>