系统API接口文档

系统API接口文档


获取商品详情接口

简要描述:

  • 商品信息查询接口

请求URL:

  • http://平台域名/api.php/buyer/getGood

请求方式:

  • POST

参数:

参数名 必选 类型 说明 示例值
customerid int 用户编号 1234
goodsid int 商品id 1
sign string 接口签名( 32位小写md5),计算方法:Md5(customerid +id +key) ccdf0b5a69133d952202b617b4cb4da5

返回格式:

  • json

返回参数:

参数名 示例 说明
code 1000 请求结果,返回码
info 结果描述语 请求成功
data - 商品详情
id 1 商品id
number 1 商品编号
name 测试商品 商品名称
type 1 商品类型 1 卡密商品 2 代充商品
price 10.000 商品面值
money 10.000 商品价格
min 1 单次最小可下单数量
max 10 单次最大可下单数量
note - 商品注意事项
desc - 商品介绍
count - 商品库存卡密
img - 商品封面图片地址
templates - 人工类商品充值模板名称
tpl - 充值模板详细内容
name - 充值模板内容名称1
type - 充值模板内容1类型,text为文本输入框,password为密码输入框,radio为单选类型,select为下拉类型
value - 当type为text时,value为输入框提示内容,当type为password时,不返回value值,当type为radio或select类型时,value为选项内容,内容已英文状态下逗号","分割,例:1,2,3,4
tpl recharge_url_info 充值网址
tpl url_pwd_info 网址密码
tpl goods_status 商品状态

返回示例:

   {

    "code": 1000,

    "info": "请求成功",

    "data":[{

        "id": 132761531,

        "number": 21409022458040588,

        "name": "商品名称1",

        "type":1,

        "price": 1,

        "money": 1,

        "min":1,

        "max":10,

        "note":"注意事项",

        "desc":"商品介绍",

        "count":10,

        "img":"商品图片地址",

        "templates":"充值模板名称",

        "tpl":[{

            "name": "模版名称1",

            "type": "text",

            "value": "文本输入框提示",

            }, {

            "name": "模版名称2",

            "type": "radio",

            "value": "选定值",

        }],

        "recharge_url_info":"充值网址",

        "url_pwd_info":"网址密码",

        "goods_status":"商品状态",
    }]

}

错误码:

错误码 错误解释
1010 无数据
其他 参考全局错误码

备注:

  • code为1000代表成功,其他为失败
  • 更多返回错误代码请看首页的全局错误代码描述

页面列表

ITEM_HTML