获取产品详情(Android)


接口说明

获取指定商品的详细信息。

注意事项

  1. 需要提供正确的商品ID(pid)
  2. 商品ID必须属于当前应用(appkey)

请求路径

Method URI Path 鉴权方式
GET /v1/product/info 签名认证

请求参数

公共参数

参数名 类型 取值范围 是否必须 说明
appkey string - 应用唯一标识
timestamp integer - 请求时间戳(秒)
sign string - 签名,详见签名算法

业务参数

参数名 类型 是否必须 说明
pid string 商品ID

请求示例代码

curl --location --request GET 'https://api.zaihangyun.com/v1/product/info' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'User-Agent: Apifox/1.0.0' \
--data '{
    "appkey": "D5fceA1sVtmaMY1F",
    "timestamp": 1650381362,
    "sign": "5HC0kxCm2jsR3DpzhRJEFY3IfFvTcCN-8-qvvLCrKB8",
    "pid": 7534399
}'

返回响应

{
    "code": 200,
    "msg": "success",
    "data": {
        "pid": 7534399,
        "name": "年会员",
        "sub_name": "一年会员",
        "type": 1,
        "function_value": "365",
        "cross_price": 11100,
        "sale_price": 9900,
        "desc": null,
        "sale_status": 1,
        "ext_data": null
    }
}

错误码说明

查看全局错误码

错误码 说明
400101 pid参数缺失
400102 pid参数必须为字符串
400103 pid参数长度超出限制