以下是关于虾皮(Shopee)商品详情API接口及JSON数据示例的参考说明:
1. API接口基本信息
- 平台:Shopee Open Platform(需注册为合作伙伴)
- 认证方式:API Key 或 OAuth 2.0
- 文档参考:o0b.cn/anzexi
- 常见端点:
2. JSON数据示例(商品详情)
json复制代码{ "item": { "item_id": 123456789, "name": "无线蓝牙耳机降噪运动跑步耳机", "price": 299.9, "currency": "CNY", "stock": 50, "description": "高清音质,IPX5防水,超长续航30小时,支持蓝牙5.0", "images": [ "https://cf.shopee.cn/file/123456789/123456789_123456789.jpg", "https://cf.shopee.cn/file/123456789/123456789_123456790.jpg" ], "category_id": 12345, "category_name": "消费电子 > 耳机 > 蓝牙耳机", "seller_info": { "shop_id": 987654321, "shop_name": "数码旗舰店", "rating": 4.8, "follower_count": 15000 }, "attributes": [ { "name": "颜色", "value": ["黑色", "白色", "蓝色"] }, { "name": "保修期", "value": ["12个月"] } ], "shipping_info": { "free_shipping": true, "shipping_fee": 0, "days_to_ship": "3-5天" }, "promotions": [ { "type": "discount", "value": "20%", "start_time": "2023-10-01 00:00:00", "end_time": "2023-10-31 23:59:59" } ], "ratings": { "count": 450, "average": 4.7 } }, "request_id": "123e4567-e89b-12d3-a456-426614174000"}
3. 关键字段说明
字段名 | 类型 | 描述 |
---|---|---|
item_id | Integer | 商品唯一ID |
price | Float | 当前售价 |
currency | String | 货币代码(如CNY/USD) |
stock | Integer | 库存数量(-1表示无限制) |
attributes | Array | 商品规格(颜色、尺寸等) |
promotions | Array | 促销活动信息 |
shipping_info | Object | 物流信息(是否包邮、运费等) |
ratings | Object | 评价统计(评分、数量) |
4. 调用注意事项
- 权限要求:需申请对应API权限(如
items:read
) - 频率限制:通常QPS限制为60次/分钟
- 站点区分:不同国家站点需使用对应的
shopid
和partner_id
- 数据延迟:部分字段(如库存)可能存在缓存延迟
5. 典型错误响应
json复制代码{ "error": "Item not found", "code": 404, "request_id": "123e4567-e89b-12d3-a456-426614174000"}