以下是關于蝦皮(Shopee)商品詳情API接口及JSON數(shù)據(jù)示例的參考說明:
1. API接口基本信息
- 平臺:Shopee Open Platform(需注冊為合作伙伴)
- 認證方式:API Key 或 OAuth 2.0
- 文檔參考:o0b.cn/anzexi
- 常見端點:
2. JSON數(shù)據(jù)示例(商品詳情)
json復制代碼{ "item": { "item_id": 123456789, "name": "無線藍牙耳機降噪運動跑步耳機", "price": 299.9, "currency": "CNY", "stock": 50, "description": "高清音質(zhì),IPX5防水,超長續(xù)航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": "數(shù)碼旗艦店", "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 | 庫存數(shù)量(-1表示無限制) |
attributes | Array | 商品規(guī)格(顏色、尺寸等) |
promotions | Array | 促銷活動信息 |
shipping_info | Object | 物流信息(是否包郵、運費等) |
ratings | Object | 評價統(tǒng)計(評分、數(shù)量) |
4. 調(diào)用注意事項
- 權限要求:需申請對應API權限(如
items:read
) - 頻率限制:通常QPS限制為60次/分鐘
- 站點區(qū)分:不同國家站點需使用對應的
shopid
和partner_id
- 數(shù)據(jù)延遲:部分字段(如庫存)可能存在緩存延遲
5. 典型錯誤響應
json復制代碼{ "error": "Item not found", "code": 404, "request_id": "123e4567-e89b-12d3-a456-426614174000"}