電商API分享:京東獲得JD商品詳情

JenniferAB發表於2023-02-24

item_get- 獲得JD商品詳情

公共引數

名稱 型別 必須 描述
key String 呼叫key(獲取方式+v15870092527)
secret String 呼叫金鑰
api_name String API介面名稱(包括在請求地址中)[item_search,item_get,item_search_shop等]
cache String [yes,no]預設yes,將呼叫快取的資料,速度比較快
result_type String [json,jsonu,xml,serialize,var_export]返回資料格式,預設為json,jsonu輸出的內容中文可以直接閱讀
lang String [cn,en,ru]翻譯語言,預設cn簡體中文
version String API版本

請求引數

請求引數:num_iid=10335871600

引數說明:num_iid:JD商品ID

響應引數

名稱 型別 是否隱私 示例值 描述
items items[]

獲得JD商品詳情
num_iid Bigint
29186819959 商品ID
title String
MOCO2018夏季新品時尚V領條紋連衣裙 摩安珂 藍白條色 S 商品標題
desc_short String

商品簡介
price Float
719.0 價格
total_price Float
0
suggestive_price Float
0
orginal_price Float
1199.00 原價
nick String
MO&Co.官方旗艦店 掌櫃暱稱
num Int
999
min_num Int
0
detail_url String
商品連結
pic_url String
//img14.360buyimg.com/n0/jfs/t22033/147/1051007175/85125/c44dd0df/5b1f2855Ncbe35858.jpg 商品圖片
brand String

品牌名稱
brandId Int

品牌ID
rootCatId Int
1343 頂級分類ID
cid Int
9719
crumbs Mix
[]
created_time String


modified_time String


delist_time String


desc String


desc_img Mix
[]
item_imgs Mix
[{ "url": "//img14.360buyimg.com/n0/jfs/t22033/147/1051007175/85125/c44dd0df/5b1f2855Ncbe35858.jpg"}] 商品圖片
item_weight String


item_size String


location String

發貨地
post_fee Float
6.00 物流費用
express_fee Float
6.00 快遞費用
ems_fee Float
6.00 EMS費用
shipping_to String

發貨至
has_discount Boolean
false
video Mix
[] 商品影片
is_virtual String


sample_id String

商品風格標識ID
is_promotion Boolean


props_name String
0:0:尺碼:S;0:1:尺碼:XS;0:2:尺碼:M;0:3:尺碼:L;0:4:尺碼:XL 商品屬性名
prop_imgs Mix
{"prop_img": []} 商品屬性圖片列表
property_alias String
0:0:S;0:1:XS;0:2:M;0:3:L;0:4:XL 商品屬性別名
props Mix
[{ "name": "尺碼","value": "S XS M L XL" }] 商品詳情
total_sold Int


skus Mix
{"sku": [{"price": "719.00", "orginal_price": "1199.00", "properties": "0:0", "properties_name": "0:0:尺碼:S", "quantity": 99, "sku_id": 29186819959, "sku_url": ""}] 商品規格資訊
seller_id Int

賣家ID
sales Int

銷量
shop_id Int

店鋪ID
props_list Mix
{"0:0": "尺碼:S"} 商品屬性
seller_info Mix
{"level": null, "shop_type": null, "user_num_id": 57467, "cid": null, "delivery_score": null, "item_score": null, "score_p": null, "zhuy": "//moco.jd.com", "search_id": "", "nick": "MO&Co.官方旗艦店", "shop_name": "MO&Co.官方旗艦店", "title": "MO&Co.官方旗艦店" } 賣家資訊
tmall Boolean
false 是否天貓
error String

錯誤資訊
warning String

警告資訊
url_log Mix
[]
props_img Mix
[] 屬性圖片
shop_item Mix
[]
relate_items Mix
[]

請求示例

<?php// 請求示例 url 預設請求引數已經URL編碼處理
// 本示例程式碼未加密secret引數明文傳輸,若要加密請參考:https://伺服器地址/taobao/demo/sdk2020/demo-sign.php$method = "GET";$url = "您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=10335871600";$curl = curl_init();curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);curl_setopt($curl, CURLOPT_URL, $url);curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,FALSE);curl_setopt($curl, CURLOPT_FAILONERROR, false);curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);curl_setopt($curl, CURLOPT_HEADER, true);curl_setopt($curl, CURLOPT_ENCODING, "gzip");var_dump(curl_exec($curl));?>


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70026969/viewspace-2936908/,如需轉載,請註明出處,否則將追究法律責任。

相關文章