系统API接口文档

系统API接口文档


获取商品列表接口

<p><strong>简要描述:</strong></p> <ul> <li>商品信息查询接口</li> </ul> <p><strong>请求URL:</strong></p> <ul> <li><code>http://平台域名/api.php/buyer/getGoods</code></li> </ul> <p><strong>请求方式:</strong></p> <ul> <li>POST</li> </ul> <p><strong>参数:</strong></p> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> <th>示例值</th> </tr> </thead> <tbody> <tr> <td>customerid</td> <td>是</td> <td>int</td> <td>用户编号</td> <td>10000</td> </tr> <tr> <td>type</td> <td>是</td> <td>int</td> <td>搜索类型:1、根据目录ID;2、根据商品名称;</td> <td>1</td> </tr> <tr> <td>word</td> <td>是</td> <td>string</td> <td>搜索关键字:1、传目录ID;2、传商品名称;</td> <td>1</td> </tr> <tr> <td>sign</td> <td>是</td> <td>string</td> <td>接口签名( 32位小写md5),计算方法:Md5(customerid +id +key)</td> <td>d6df0b5aadf33d886102b617b4ab4da5</td> </tr> </tbody> </table> <p><strong>返回格式:</strong></p> <ul> <li>json</li> </ul> <p><strong>返回参数:</strong></p> <table> <thead> <tr> <th>参数名</th> <th>必填</th> <th>示例</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>code</td> <td>是</td> <td>1000</td> <td>请求结果,返回码</td> </tr> <tr> <td>data</td> <td>是</td> <td>-</td> <td>商品列表</td> </tr> <tr> <td>info</td> <td>是</td> <td>返回信息描述</td> <td>请求成功</td> </tr> <tr> <td>id</td> <td>-</td> <td>1</td> <td>商品编号</td> </tr> <tr> <td>name</td> <td>-</td> <td>测试商品</td> <td>商品名称</td> </tr> <tr> <td>price</td> <td>-</td> <td>10.000</td> <td>商品面值</td> </tr> <tr> <td>money</td> <td>-</td> <td>10.000</td> <td>商品价格</td> </tr> <tr> <td>number</td> <td>-</td> <td>1000</td> <td>商品编号</td> </tr> <tr> <td>type</td> <td>-</td> <td>1</td> <td>商品类型 1 卡密 2 人工代充</td> </tr> </tbody> </table> <p><strong>返回示例:</strong></p> <pre><code>{ "code": 1000, "info": "获取成功", "data": { "id": 132761531, "name": "商品名称1", "price": 1, "money": 1, "number": 21409022458040588, "type": 1 }, { "id": 132761532, "name": "商品名称2", "price": 1, "money": 1, "number": 21409022458040588, "type": 1 } }</code></pre> <p><strong>错误码:</strong></p> <table> <thead> <tr> <th>错误码</th> <th>错误解释</th> </tr> </thead> <tbody> <tr> <td>1010</td> <td>无数据</td> </tr> <tr> <td>其他</td> <td>参考全局错误码</td> </tr> </tbody> </table> <p><strong>备注:</strong></p> <ul> <li>code为1000代表成功,其他为失败</li> <li>更多返回错误代码请看首页的全局错误代码描述</li> </ul>

页面列表

ITEM_HTML