接口说明

获取单个商品信息,同一IP的访问频率限制为:120次 / 60秒。如果需要实时同步商品信息,请使用平台提供的 商品信息订阅 功能进行实现。

接口地址

/api/product

传入参数

名称 类型 必须 描述
product_id int true 商品编号

返回数据

参数名 类型 说明
id int 商品编号
product_name string 商品名称
name string 规格名称
price decimal 售价
valid_purchasing_quantity string 合法的购买数量
type int 商品类型(1:充值,2:卡密,3:卡券)
stock_state int 库存状态(1:充足,2:断货)
supply_state int 状态(1:上架,2:维护,3:下架)
hold_state int 供货状态 (1.允许采购,2.限制采购)
ban_start_at string 禁售开始时间(详见下方说明)
ban_end_at string 禁售结束时间(详见下方说明)

禁售字段说明

1.空字符串表示无禁售策略;

2.禁售时段可能在同一天,也有可能在连续两天,所以不能简单利用开始时间和结束时间的大小做范围判断。比如从头一天的 23:00:00 到第二天凌晨 06:00:00,对应字段如下:ban_start_at=23:00:00,ban_end_at=06:00:00,此时如果按照时间大小做范围判断就会出错。

示例
{
    "code": "ok",
    "message": "",
    "data": {
        "id": 1886,
        "product_name":"爱奇艺视频会员",
        "name": "月卡",
        "price": "0.6",
        "valid_purchasing_quantity": "1-10000",
        "type": 1,
        "stock_state": 1,
        "supply_state": 1,
        "ban_start_at":"14:00:00"
        "ban_end_at":"16:59:59"
    }
}