为了进行电商平台 的API开发,首先我们需要做下面几件事情。
1)开发者注册一个账号
2)然后为每个 shopee 应用注册一个应用程序键(App Key) 。
3)下载 shopee API的SDK并掌握基本的API基础知识和调用
4)利用SDK接口和对象,传入AppKey或者必要的时候获取并传入SessionKey来进行程序开发。
5)利用shopee 平台的文档中心和API测试工具,对接口进行测试。从而了解返回信息,方便程序获取。
以上是一般shopee API应用开发的关键流程,其中通过shopee 文档中心和API测试工具,进行概念了解和接口信息查询很重要。因为这些数据就是我们需要在逐步显示出来的。shopee 的API很多,不过都分为了好几个领域,慢慢就会了解深入了。
注册链接(获取Key和secret):https://o0b.cn/iinoah
响应实例
{ "item": { "num_iid": 5637247041, "title": "Fashionable plus size women's dress 2020 new spring and summer dress was thin and thin and fat sister dress two-piece suit", "detail_url": "https://shopee.com.my/Fashionable plus size women's dress 2020 new spring and summer dress was thin and thin and fat sister dress two-piece suit-i.264070136.5637247041?", "pic_url": "https://cf.shopee.com.my/file/f8bc1116ea922e5ed87a492390b1cc1a", "price": 31.68, "orginal_price": 31.68, "cid": 100017, "desc": "Brand: Other/Other\nStyle: Sweet and Fresh/College\nPopular elements: buttons, gauze, stitching\nStyle: skirt suit\nsleeve length: short sleeve\nFabric/Material: Other/Polyester (Polyester Fiber)\nIngredient content: 71% (inclusive)-80% (inclusive)\nWhether to add cashmere: no cashmere\nTime to market: Spring 2020\nDelivery time:\nShipped on the same day before subscripting at 18:00 every day,\nIt is estimated that it will take 4-10 days for normal goods to arrive at your hands\n\nMasa penghantaran\nDihantar pada hari yang sama sebelum pukul 18:00 setiap hari\nDihantar keesokan harinya selepas jam 18:00.\nDianggarkan memerlukan masa 4-10 hari untuk barang biasa sampai tangan anda\n\nPakaian wanita bersaiz plus bergaya.Pakaian musim bunga dan musim panas dalam 2020 yang baru\nkurus dan gemuk itu berpakaian yg dua keping<img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-1.64194661eb25e&p=1032056033&k=60478&t=1679378019\" style=\"display:none\" />", "item_imgs": null, "props": [ { "name": "Plus Size", "value": "Yes" }, { "name": "Dress/Skirt Length", "value": "Midi" } ], "props_list": { "45590:45636": "颜色分类:T-shirt+skirt", "45590:45943": "颜色分类:T-shirt", "45590:46031": "颜色分类:skirt", "46102:46108": "尺码:M 建议【42.5-50KG】", "46102:46144": "尺码:L 建议 【50-57.5kg】", "46102:46191": "尺码:XL 【建议57.5-65kg】", "46102:46222": "尺码:2XL 【建议65-72.5kg】", "46102:46270": "尺码:3XL 【建议72.5-82.5kg】", "46102:46301": "尺码:4XL【建议82.5-90kg】" }, "prop_imgs": { "prop_img": [ { "properties": "45590:45636", "url": "https://cf.shopee.com.my/file/81bea46afa4113012b7330cc3c846428" }, { "properties": "45590:45943", "url": "https://cf.shopee.com.my/file/c0d49dfae84b81468269a17714742adb" }, { "properties": "45590:46031", "url": "https://cf.shopee.com.my/file/f4dd56edbe0ccc13ca2cba0d6ba5167a" } ] }, "props_imgs": { "prop_img": [ { "properties": "45590:45636", "url": "https://cf.shopee.com.my/file/81bea46afa4113012b7330cc3c846428" }, { "properties": "45590:45943", "url": "https://cf.shopee.com.my/file/c0d49dfae84b81468269a17714742adb" }, { "properties": "45590:46031", "url": "https://cf.shopee.com.my/file/f4dd56edbe0ccc13ca2cba0d6ba5167a" } ] }, "props_name": "45590:45636:颜色分类:T-shirt+skirt;45590:45636:颜色分类:T-shirt+skirt;45590:45636:颜色分类:T-shirt+skirt;45590:45636:颜色分类:T-shirt+skirt;45590:45636:颜色分类:T-shirt+skirt;45590:45636:颜色分类:T-shirt+skirt;45590:45943:颜色分类:T-shirt;45590:45943:颜色分类:T-shirt;45590:45943:颜色分类:T-shirt;45590:45943:颜色分类:T-shirt;45590:45943:颜色分类:T-shirt;45590:45943:颜色分类:T-shirt;45590:46031:颜色分类:skirt;45590:46031:颜色分类:skirt;45590:46031:颜色分类:skirt;45590:46031:颜色分类:skirt;45590:46031:颜色分类:skirt;45590:46031:颜色分类:skirt;46102:46108:尺码:M 建议【42.5-50KG】;46102:46144:尺码:L 建议 【50-57.5kg】;46102:46191:尺码:XL 【建议57.5-65kg】;46102:46222:尺码:2XL 【建议65-72.5kg】;46102:46270:尺码:3XL 【建议72.5-82.5kg】;46102:46301:尺码:4XL【建议82.5-90kg】;46102:46108:尺码:M 建议【42.5-50KG】;46102:46144:尺码:L 建议 【50-57.5kg】;46102:46191:尺码:XL 【建议57.5-65kg】;46102:46222:尺码:2XL 【建议65-72.5kg】;46102:46270:尺码:3XL 【建议72.5-82.5kg】;46102:46301:尺码:4XL【建议82.5-90kg】;46102:46108:尺码:M 建议【42.5-50KG】;46102:46144:尺码:L 建议 【50-57.5kg】;46102:46191:尺码:XL 【建议57.5-65kg】;46102:46222:尺码:2XL 【建议65-72.5kg】;46102:46270:尺码:3XL 【建议72.5-82.5kg】;46102:46301:尺码:4XL【建议82.5-90kg】", "desc_img": [], "location": null, "post_fee": "", "skus": { "sku": [ { "price": 63.36, "total_price": 0, "orginal_price": 63.36, "properties": "45590:45636;46102:46108", "properties_name": "45590:45636:颜色分类:T-shirt+skirt;46102:46108:尺码:M 建议【42.5-50KG】", "quantity": 982, "sku_id": null }, { "price": 63.36, "total_price": 0, "orginal_price": 63.36, "properties": "45590:45636;46102:46144", "properties_name": "45590:45636:颜色分类:T-shirt+skirt;46102:46144:尺码:L 建议 【50-57.5kg】", "quantity": 983, "sku_id": null }, { "price": 63.36, "total_price": 0, "orginal_price": 63.36, "properties": "45590:45636;46102:46191", "properties_name": "45590:45636:颜色分类:T-shirt+skirt;46102:46191:尺码:XL 【建议57.5-65kg】", "quantity": 992, "sku_id": null }, { "price": 63.36, "total_price": 0, "orginal_price": 63.36, "properties": "45590:45636;46102:46222", "properties_name": "45590:45636:颜色分类:T-shirt+skirt;46102:46222:尺码:2XL 【建议65-72.5kg】", "quantity": 989, "sku_id": null }, { "price": 63.36, "total_price": 0, "orginal_price": 63.36, "properties": "45590:45636;46102:46270", "properties_name": "45590:45636:颜色分类:T-shirt+skirt;46102:46270:尺码:3XL 【建议72.5-82.5kg】", "quantity": 992, "sku_id": null }, { "price": 63.36, "total_price": 0, "orginal_price": 63.36, "properties": "45590:45636;46102:46301", "properties_name": "45590:45636:颜色分类:T-shirt+skirt;46102:46301:尺码:4XL【建议82.5-90kg】", "quantity": 985, "sku_id": null }, { "price": 38.08, "total_price": 0, "orginal_price": 38.08, "properties": "45590:45943;46102:46108", "properties_name": "45590:45943:颜色分类:T-shirt;46102:46108:尺码:M 建议【42.5-50KG】", "quantity": 998, "sku_id": null }, { "price": 38.08, "total_price": 0, "orginal_price": 38.08, "properties": "45590:45943;46102:46144", "properties_name": "45590:45943:颜色分类:T-shirt;46102:46144:尺码:L 建议 【50-57.5kg】", "quantity": 999, "sku_id": null }, { "price": 38.08, "total_price": 0, "orginal_price": 38.08, "properties": "45590:45943;46102:46191", "properties_name": "45590:45943:颜色分类:T-shirt;46102:46191:尺码:XL 【建议57.5-65kg】", "quantity": 1000, "sku_id": null }, { "price": 38.08, "total_price": 0, "orginal_price": 38.08, "properties": "45590:45943;46102:46222", "properties_name": "45590:45943:颜色分类:T-shirt;46102:46222:尺码:2XL 【建议65-72.5kg】", "quantity": 999, "sku_id": null }, { "price": 38.08, "total_price": 0, "orginal_price": 38.08, "properties": "45590:45943;46102:46270", "properties_name": "45590:45943:颜色分类:T-shirt;46102:46270:尺码:3XL 【建议72.5-82.5kg】", "quantity": 999, "sku_id": null }, { "price": 38.08, "total_price": 0, "orginal_price": 38.08, "properties": "45590:45943;46102:46301", "properties_name": "45590:45943:颜色分类:T-shirt;46102:46301:尺码:4XL【建议82.5-90kg】", "quantity": 998, "sku_id": null }, { "price": 31.68, "total_price": 0, "orginal_price": 31.68, "properties": "45590:46031;46102:46108", "properties_name": "45590:46031:颜色分类:skirt;46102:46108:尺码:M 建议【42.5-50KG】", "quantity": 1000, "sku_id": null }, { "price": 31.68, "total_price": 0, "orginal_price": 31.68, "properties": "45590:46031;46102:46144", "properties_name": "45590:46031:颜色分类:skirt;46102:46144:尺码:L 建议 【50-57.5kg】", "quantity": 1000, "sku_id": null }, { "price": 31.68, "total_price": 0, "orginal_price": 31.68, "properties": "45590:46031;46102:46191", "properties_name": "45590:46031:颜色分类:skirt;46102:46191:尺码:XL 【建议57.5-65kg】", "quantity": 997, "sku_id": null }, { "price": 31.68, "total_price": 0, "orginal_price": 31.68, "properties": "45590:46031;46102:46222", "properties_name": "45590:46031:颜色分类:skirt;46102:46222:尺码:2XL 【建议65-72.5kg】", "quantity": 998, "sku_id": null }, { "price": 31.68, "total_price": 0, "orginal_price": 31.68, "properties": "45590:46031;46102:46270", "properties_name": "45590:46031:颜色分类:skirt;46102:46270:尺码:3XL 【建议72.5-82.5kg】", "quantity": 999, "sku_id": null }, { "price": 31.68, "total_price": 0, "orginal_price": 31.68, "properties": "45590:46031;46102:46301", "properties_name": "45590:46031:颜色分类:skirt;46102:46301:尺码:4XL【建议82.5-90kg】", "quantity": 997, "sku_id": null } ] }, "num": 17907, "seller_id": null, "shop_id": "", "nick": null, "sales": 0, "total_sold": "-1", "seller_info": { "nick": null, "item_score": null, "score_p": null, "delivery_score": null, "shop_type": "", "user_num_id": null, "sid": "", "title": "", "zhuy": "https://my.xiapibuy.com/qzq1274334183.my", "cert": null, "open_time": "", "credit_score": null, "shop_name": "Big size women's fashion " }, "data_from": "Ha", "props_img": { "45590:45636": "https://cf.shopee.com.my/file/81bea46afa4113012b7330cc3c846428", "45590:45943": "https://cf.shopee.com.my/file/c0d49dfae84b81468269a17714742adb", "45590:46031": "https://cf.shopee.com.my/file/f4dd56edbe0ccc13ca2cba0d6ba5167a" }, "format_check": "ok", "shop_item": [], "relate_items": [] }, "error": "", "secache": "da67365cb819d7c288d8451ffd8c3692", "secache_time": 1679378019, "secache_date": "2023-03-21 13:53:39", "translate_status": "", "translate_time": 0, "language": { "default_lang": "cn", "current_lang": "cn" }, "reason": "", "error_code": "0000",