为了进行电商平台 的API开发,首先我们需要做下面几件事情。
1)开发者注册一个账号
2)然后为每个jd应用注册一个应用程序键(App Key) 。
3)下载jdAPI的SDK并掌握基本的API基础知识和调用
4)利用SDK接口和对象,传入AppKey或者必要的时候获取并传入SessionKey来进行程序开发。
5)利用jd平台的文档中心和API测试工具,对接口进行测试。从而了解返回信息,方便程序获取。
以上是一般jd API应用开发的关键流程,其中通过jd文档中心和API测试工具,进行概念了解和接口信息查询很重要。因为这些数据就是我们需要在逐步显示出来的。jd 的API很多,不过都分为了好几个领域,慢慢就会了解深入了。
注册链接(获取Key和secret):https://o0b.cn/iinoah
{
"item": {
"num_iid": "100024372958",
"title": "桂格(QUAKER)5黑混合即食燕麦片860克罐装 5黑系列 早餐谷物 黑芝麻饱腹",
"desc_short": "",
"price": "34.30",
"total_price": "",
"suggestive_price": "",
"orginal_price": "79.90",
"nick": "桂格京东自营旗舰店",
"num": "99",
"min_num": 0,
"detail_url": "https://item.jd.com/100024372958.html#crumb-wrap",
"pic_url": "//img10.360buyimg.com/n0/jfs/t1/155966/25/35062/181677/63f49cabF16bf82e0/425ae5c4808b1d2b.jpg",
"brand": null,
"brandId": 7668,
"rootCatId": 1585,
"cid": 1601,
"created_time": "",
"modified_time": "",
"delist_time": "",
"desc": "<img src=\"//img30.360buyimg.com/sku/jfs/t1/222128/7/21525/145519/63512f4aEa0682c5b/9af715f1b5081503.jpg\"><img src=\"//img30.360buyimg.com/sku/jfs/t1/48884/1/21868/194614/63512f4aE6a43c4b4/5e4fa95ebf44e752.jpg\"><img src=\"//img30.360buyimg.com/sku/jfs/t1/113147/14/27537/91201/63512f4aEcfcf5bd8/bfd45020824177ef.jpg\"><img src=\"//img30.360buyimg.com/sku/jfs/t1/210741/40/27341/168850/63513018E48c97807/ff19b2d5eff3e771.jpg\"><img src=\"//img30.360buyimg.com/sku/jfs/t1/57489/14/18526/112332/63512f49E810a9aa1/69e1fb840c359217.jpg\"><img src=\"//img30.360buyimg.com/sku/jfs/t1/10963/4/19497/80918/63512f49E9946bd3e/40f82f0834093d28.jpg\"><img src=\"//img30.360buyimg.com/sku/jfs/t1/160397/33/31559/149355/63512f4aE0d2b8117/ba41fae53de0e8d8.jpg\"><img src=\"//img30.360buyimg.com/sku/jfs/t1/129450/35/31395/121801/63512f48E578d8861/3e8c4543bae91448.jpg\"><img src=\"//img30.360buyimg.com/sku/jfs/t1/110126/5/17421/105409/63512f49E935f718e/33f7e2b210eddc5e.jpg\"><img src=\"//img30.360buyimg.com/sku/jfs/t1/117685/21/31025/123541/63512f4aE03f8b224/556fb5cdd358bc6e.jpg\"><img src=\"//img30.360buyimg.com/sku/jfs/t1/84518/4/17059/56148/63512f48E62a4bf40/164ef64b82ba7e0b.jpg\"><img src=\"//img30.360buyimg.com/sku/jfs/t1/61977/37/22493/87892/63512f49Eb632ae85/bdb983dd049225ff.jpg\"><img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-3.642527b927900&p=3702633869&k=i_key&t=1680156605\" style=\"display:none\" />",
"desc_img": [
"//img30.360buyimg.com/sku/jfs/t1/222128/7/21525/145519/63512f4aEa0682c5b/9af715f1b5081503.jpg",
"//img30.360buyimg.com/sku/jfs/t1/48884/1/21868/194614/63512f4aE6a43c4b4/5e4fa95ebf44e752.jpg",
"//img30.360buyimg.com/sku/jfs/t1/113147/14/27537/91201/63512f4aEcfcf5bd8/bfd45020824177ef.jpg",
"//img30.360buyimg.com/sku/jfs/t1/210741/40/27341/168850/63513018E48c97807/ff19b2d5eff3e771.jpg",
"//img30.360buyimg.com/sku/jfs/t1/57489/14/18526/112332/63512f49E810a9aa1/69e1fb840c359217.jpg",
"//img30.360buyimg.com/sku/jfs/t1/10963/4/19497/80918/63512f49E9946bd3e/40f82f0834093d28.jpg",
"//img30.360buyimg.com/sku/jfs/t1/160397/33/31559/149355/63512f4aE0d2b8117/ba41fae53de0e8d8.jpg",
"//img30.360buyimg.com/sku/jfs/t1/129450/35/31395/121801/63512f48E578d8861/3e8c4543bae91448.jpg",
"//img30.360buyimg.com/sku/jfs/t1/110126/5/17421/105409/63512f49E935f718e/33f7e2b210eddc5e.jpg",
"//img30.360buyimg.com/sku/jfs/t1/117685/21/31025/123541/63512f4aE03f8b224/556fb5cdd358bc6e.jpg",
"//img30.360buyimg.com/sku/jfs/t1/84518/4/17059/56148/63512f48E62a4bf40/164ef64b82ba7e0b.jpg",
"//img30.360buyimg.com/sku/jfs/t1/61977/37/22493/87892/63512f49Eb632ae85/bdb983dd049225ff.jpg"
],
"item_imgs": [
{
"url": "//img10.360buyimg.com/n1/jfs/t1/155966/25/35062/181677/63f49cabF16bf82e0/425ae5c4808b1d2b.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/59905/31/21425/158684/62f60fdcE53280760/5f2f33a06128f3f3.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/68453/34/21363/222802/62f60fdcEb5749d90/3a150a72470b6c4f.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/162213/19/25448/202612/61a08770Ec0b3dc87/f3a003f1a2116c54.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/198087/22/18362/98089/61a0876fEb2c7cccd/96a0b8c4b25c9a89.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/198443/39/18660/85993/61a0876fE685d7ab4/c0ca198814c1e9d7.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/204623/2/16727/85707/61a08770Ef5fe70a2/c631313aad190fa4.jpg"
},
{
"url": "//img10.360buyimg.com/n1/jfs/t1/170641/8/24704/120108/61a08770E5af24883/2f53764c1ccc7e31.jpg"
}
],
"item_weight": null,
"item_volume": "",
"item_size": "",
"location": null,
"post_fee": "",
"express_fee": "",
"ems_fee": "",
"shipping_to": "",
"has_discount": "",
"video": "https://jvod.300hu.com/vod/product/3a06bbb0-a771-448f-b4db-d1e1780b5e8a/aac71cdc3fa8460881d0470b5bec285e.mp4",
"sample_id": "",
"is_promotion": "",
"props_name": "0:0:颜色:【店长推荐】即食燕麦片罐装1kg;0:1:颜色:【高纤粗粮】快煮麦片罐装1kg;0:2:颜色:【大米伴侣】燕麦饭罐装1.5kg;0:3:颜色:【以黑养黑】5黑麦片罐装860g;0:4:颜色:【以红养红】5红麦片罐装860g;0:5:颜色:【以白养白】5白麦片罐装860g;0:6:颜色:【多元代餐】黑白麦片罐装860g;0:7:颜色:【美味加钙】高钙麦片罐装860g;0:8:颜色:【咖啡浓香】咖啡麦果脆305g;0:9:颜色:【多莓奶香】雪乳麦果脆305g",
"prop_imgs": {
"prop_img": [
{
"properties": "0:0",
"url": "//img11.360buyimg.com/n9/s40x40_jfs/t1/146233/29/34526/105089/64086460F384cc132/57406244ceda2a42.jpg"
},
{
"properties": "0:1",
"url": "//img14.360buyimg.com/n9/s40x40_jfs/t1/115262/5/33571/110213/64086460F0339cb8e/28e95d309ec3039f.jpg"
},
{
"properties": "0:2",
"url": "//img13.360buyimg.com/n9/s40x40_jfs/t1/190782/29/33079/101581/64086461F38acb50f/9bd5b159cb9bd2c9.jpg"
},
{
"properties": "0:3",
"url": "//img13.360buyimg.com/n9/s40x40_jfs/t1/155966/25/35062/181677/63f49cabF16bf82e0/425ae5c4808b1d2b.jpg"
},
{
"properties": "0:4",
"url": "//img11.360buyimg.com/n9/s40x40_jfs/t1/187339/4/33082/196039/63f49c8eF61db57d0/7ea6cc600eda9773.jpg"
},
{
"properties": "0:5",
"url": "//img14.360buyimg.com/n9/s40x40_jfs/t1/192192/14/24215/105099/6408646eFeb3b8a64/8b02e7da4213e6d3.jpg"
},
{
"properties": "0:6",
"url": "//img13.360buyimg.com/n9/s40x40_jfs/t1/57080/8/24002/111117/6408646dF8dd85791/0761b2543feab9e2.jpg"
},
{
"properties": "0:7",
"url": "//img13.360buyimg.com/n9/s40x40_jfs/t1/218111/15/23875/109126/6408646dF1d0080e0/0019d2ec798bac95.jpg"
},
{
"properties": "0:8",
"url": "//img11.360buyimg.com/n9/s40x40_jfs/t1/136097/25/34125/135906/6408646dFca2d8e80/b001d4537cc65ce1.jpg"
},
{
"properties": "0:9",
"url": "//img13.360buyimg.com/n9/s40x40_jfs/t1/65792/25/25168/130913/6408646eF32b64f1b/ef91032fc36cea52.jpg"
}
]
},
"property_alias": "0:0:【店长推荐】即食燕麦片罐装1kg;0:1:【高纤粗粮】快煮麦片罐装1kg;0:2:【大米伴侣】燕麦饭罐装1.5kg;0:3:【以黑养黑】5黑麦片罐装860g;0:4:【以红养红】5红麦片罐装860g;0:5:【以白养白】5白麦片罐装860g;0:6:【多元代餐】黑白麦片罐装860g;0:7:【美味加钙】高钙麦片罐装860g;0:8:【咖啡浓香】咖啡麦果脆305g;0:9:【多莓奶香】雪乳麦果脆305g",
"props": [
{
"name": "商品名称",
"value": "桂格桂格5黑混合即食燕麦片(罐装)860克"
},
{
"name": "商品编号",
"value": "100024372958"
},
{
"name": "商品毛重",
"value": "1.1kg"
},
{
"name": "商品产地",
"value": "中国大陆"
},
{
"name": "是否添加蔗糖",
"value": "不添加蔗糖"
},
{
"name": "是否有机",
"value": "非有机"
},
{
"name": "包装形式",
"value": "罐装"
},
{
"name": "总净含量",
"value": "501g-1kg"
},
{
"name": "国产/进口",
"value": "国产"
}
],
"total_sold": "",
"skus": {
"sku": [
{
"price": "27.90",
"orginal_price": "27.90",
"properties": "0:0",
"properties_name": "0:0:颜色:【店长推荐】即食燕麦片罐装1kg",
"quantity": "99",
"sku_id": 1205781,
"sku_url": "http://item.jd.com/1205781.html"
},
{
"price": "24.90",
"orginal_price": "24.90",
"properties": "0:1",
"properties_name": "0:1:颜色:【高纤粗粮】快煮麦片罐装1kg",
"quantity": "99",
"sku_id": 1708139,
"sku_url": "http://item.jd.com/1708139.html"
},
{
"price": "43.80",
"orginal_price": "43.80",
"properties": "0:2",
"properties_name": "0:2:颜色:【大米伴侣】燕麦饭罐装1.5kg",
"quantity": "99",
"sku_id": 3107773,
"sku_url": "http://item.jd.com/3107773.html"
},
{
"price": "34.30",
"orginal_price": "34.30",
"properties": "0:3",
"properties_name": "0:3:颜色:【以黑养黑】5黑麦片罐装860g",
"quantity": "99",
"sku_id": 100024372958,
"sku_url": "http://item.jd.com/100024372958.html"
},
{
"price": "37.60",
"orginal_price": "37.60",
"properties": "0:4",
"properties_name": "0:4:颜色:【以红养红】5红麦片罐装860g",
"quantity": "99",
"sku_id": 100016559871,
"sku_url": "http://item.jd.com/100016559871.html"
},
{
"price": "36.40",
"orginal_price": "36.40",
"properties": "0:5",
"properties_name": "0:5:颜色:【以白养白】5白麦片罐装860g",
"quantity": "99",
"sku_id": 100027689689,
"sku_url": "http://item.jd.com/100027689689.html"
},
{
"price": "59.90",
"orginal_price": "59.90",
"properties": "0:6",
"properties_name": "0:6:颜色:【多元代餐】黑白麦片罐装860g",
"quantity": "99",
"sku_id": 100016013738,
"sku_url": "http://item.jd.com/100016013738.html"
},
{
"price": "49.90",
"orginal_price": "49.90",
"properties": "0:7",
"properties_name": "0:7:颜色:【美味加钙】高钙麦片罐装860g",
"quantity": "99",
"sku_id": 100012521673,
"sku_url": "http://item.jd.com/100012521673.html"
},
{
"price": "42.80",
"orginal_price": "42.80",
"properties": "0:8",
"properties_name": "0:8:颜色:【咖啡浓香】咖啡麦果脆305g",
"quantity": "99",
"sku_id": 100018752086,
"sku_url": "http://item.jd.com/100018752086.html"
},
{
"price": "41.90",
"orginal_price": "41.90",
"properties": "0:9",
"properties_name": "0:9:颜色:【多莓奶香】雪乳麦果脆305g",
"quantity": "99",
"sku_id": 100021960008,
"sku_url": "http://item.jd.com/100021960008.html"
}
]
},
"seller_id": "",
"sales": "",
"props_list": {
"0:0": "颜色:【店长推荐】即食燕麦片罐装1kg",
"0:1": "颜色:【高纤粗粮】快煮麦片罐装1kg",
"0:2": "颜色:【大米伴侣】燕麦饭罐装1.5kg",
"0:3": "颜色:【以黑养黑】5黑麦片罐装860g",
"0:4": "颜色:【以红养红】5红麦片罐装860g",
"0:5": "颜色:【以白养白】5白麦片罐装860g",
"0:6": "颜色:【多元代餐】黑白麦片罐装860g",
"0:7": "颜色:【美味加钙】高钙麦片罐装860g",
"0:8": "颜色:【咖啡浓香】咖啡麦果脆305g",
"0:9": "颜色:【多莓奶香】雪乳麦果脆305g"
},
"seller_info": {
"level": "",
"shop_type": "",
"user_num_id": "1000007543",
"cid": "",
"delivery_score": "",
"item_score": "",
"score_p": "",
"zhuy": "https://mall.jd.com/index-1000007543.html",
"search_id": "",
"nick": "桂格京东自营旗舰店",
"shop_name": "桂格京东自营旗舰店",
"title": "桂格京东自营旗舰店"
},
"tmall": false,
"error": "",
"warning": "",
"url_log": [],
"coupon_activity": "",
"stuff_status": "",
"shopinfo": [],
"shop_id": null,
"method": "",
"promo_type": "",
"props_img": {
"0:0": "//img11.360buyimg.com/n9/s40x40_jfs/t1/146233/29/34526/105089/64086460F384cc132/57406244ceda2a42.jpg",
"0:1": "//img14.360buyimg.com/n9/s40x40_jfs/t1/115262/5/33571/110213/64086460F0339cb8e/28e95d309ec3039f.jpg",
"0:2": "//img13.360buyimg.com/n9/s40x40_jfs/t1/190782/29/33079/101581/64086461F38acb50f/9bd5b159cb9bd2c9.jpg",
"0:3": "//img13.360buyimg.com/n9/s40x40_jfs/t1/155966/25/35062/181677/63f49cabF16bf82e0/425ae5c4808b1d2b.jpg",
"0:4": "//img11.360buyimg.com/n9/s40x40_jfs/t1/187339/4/33082/196039/63f49c8eF61db57d0/7ea6cc600eda9773.jpg",
"0:5": "//img14.360buyimg.com/n9/s40x40_jfs/t1/192192/14/24215/105099/6408646eFeb3b8a64/8b02e7da4213e6d3.jpg",
"0:6": "//img13.360buyimg.com/n9/s40x40_jfs/t1/57080/8/24002/111117/6408646dF8dd85791/0761b2543feab9e2.jpg",
"0:7": "//img13.360buyimg.com/n9/s40x40_jfs/t1/218111/15/23875/109126/6408646dF1d0080e0/0019d2ec798bac95.jpg",
"0:8": "//img11.360buyimg.com/n9/s40x40_jfs/t1/136097/25/34125/135906/6408646dFca2d8e80/b001d4537cc65ce1.jpg",
"0:9": "//img13.360buyimg.com/n9/s40x40_jfs/t1/65792/25/25168/130913/6408646eF32b64f1b/ef91032fc36cea52.jpg"
},
"data_from": "ti",
"shop_item": [],
"relate_items": []
},
"secache": "14e42ac6387e009b817ac05ee03446e6",
"secache_time": 1680156605,
"secache_date": "2023-03-30 14:10:05",
"translate_status": "",
"translate_time": 0,
"language": {
"default_lang": "cn",
"current_lang": "cn"
},
"error": "",
"reason": "",
"error_code": "0000",
标签:sku,buyimg,jpg,t1,商品,API,详情,jfs,com
From: https://blog.51cto.com/u_16182967/6918270