以下是關(guān)于蝦皮(Shopee)商品詳情API接口及JSON數(shù)據(jù)示例的參考說明:
1. API接口基本信息
- 平臺(tái):Shopee Open Platform(需注冊(cè)為合作伙伴)
- 認(rèn)證方式:API Key 或 OAuth 2.0
- 文檔參考:o0b.cn/anzexi
- 常見端點(diǎn):
2. JSON數(shù)據(jù)示例(商品詳情)
json復(fù)制代碼{ "item": { "item_id": 123456789, "name": "無線藍(lán)牙耳機(jī)降噪運(yùn)動(dòng)跑步耳機(jī)", "price": 299.9, "currency": "CNY", "stock": 50, "description": "高清音質(zhì),IPX5防水,超長(zhǎng)續(xù)航30小時(shí),支持藍(lán)牙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": "消費(fèi)電子 > 耳機(jī) > 藍(lán)牙耳機(jī)", "seller_info": { "shop_id": 987654321, "shop_name": "數(shù)碼旗艦店", "rating": 4.8, "follower_count": 15000 }, "attributes": [ { "name": "顏色", "value": ["黑色", "白色", "藍(lán)色"] }, { "name": "保修期", "value": ["12個(gè)月"] } ], "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. 關(guān)鍵字段說明
字段名 | 類型 | 描述 |
---|---|---|
item_id | Integer | 商品唯一ID |
price | Float | 當(dāng)前售價(jià) |
currency | String | 貨幣代碼(如CNY/USD) |
stock | Integer | 庫存數(shù)量(-1表示無限制) |
attributes | Array | 商品規(guī)格(顏色、尺寸等) |
promotions | Array | 促銷活動(dòng)信息 |
shipping_info | Object | 物流信息(是否包郵、運(yùn)費(fèi)等) |
ratings | Object | 評(píng)價(jià)統(tǒng)計(jì)(評(píng)分、數(shù)量) |
4. 調(diào)用注意事項(xiàng)
- 權(quán)限要求:需申請(qǐng)對(duì)應(yīng)API權(quán)限(如
items:read
) - 頻率限制:通常QPS限制為60次/分鐘
- 站點(diǎn)區(qū)分:不同國(guó)家站點(diǎn)需使用對(duì)應(yīng)的
shopid
和partner_id
- 數(shù)據(jù)延遲:部分字段(如庫存)可能存在緩存延遲
5. 典型錯(cuò)誤響應(yīng)
json復(fù)制代碼{ "error": "Item not found", "code": 404, "request_id": "123e4567-e89b-12d3-a456-426614174000"}