苏宁商品详情接口API代码对接如下:
1.公共参数
名称 |
类型 |
必须 |
描述 |
key |
String |
√ |
get请求方式拼接在url中,点击获取 |
api_name |
String |
√ |
api接口名称 |
cache |
String |
默认否 |
|
result_type |
String |
否 |
json |
lang |
String |
默认cn 简体中文 |
|
version |
String |
否 |
api版本 |
2.请求参数
请求参数:
product_id=12389328845
shop_id=0000000000
3.响应参数
4.请求示例(CURL、PHP 、PHPsdk 、Java 、C# 、Python…)
# coding:utf-8 """ Compatible for python2.x and python3.x requirement: pip install requests """ from __future__ import print_function import requests # 请求示例 url 默认请求参数已经做URL编码 url = "https://qq2671517833/smallredbook/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>¬e_id=5eb1097ba091410953951d17" headers = { "Accept-Encoding": "gzip", "Connection": "close" } if __name__ == "__main__": r = requests.get(url, headers=headers) json_obj = r.json() print(json_obj)
5.响应示例
{
version: "1.1.0",
code: "200",
data: {
mastermap: "1,2,3,4,5",
data1: {
version: "1.0.0",
data: {
vendorCode: "0000000000",
mainPictureList: [
{
domain: "//imgservice.suning.cn",
versionNo: 9999,
pictureUrl: "/uimg1/b2c/image/F5fJRMVKC9-ViGkWlHysOw.jpg",
pictureLocation: 1,
illegalFlag: 1
},
{
domain: "//imgservice.suning.cn",
versionNo: 9999,
pictureUrl: "/uimg1/b2c/image/CU3eKv0JMHb5rk4fnv7gxA.jpg",
pictureLocation: 2,
illegalFlag: 1
},
{
domain: "//imgservice.suning.cn",
versionNo: 9999,
pictureUrl: "/uimg1/b2c/image/9FDteQaJUXmFWCA2YE-1Tg.jpg",
pictureLocation: 3,
illegalFlag: 1
},
{
domain: "//imgservice.suning.cn",
versionNo: 9999,
pictureUrl: "/uimg1/b2c/image/hB9722yDm99Mh6BzdP4dxw.jpg",
pictureLocation: 4,
illegalFlag: 1
},
{
domain: "//imgservice.suning.cn",
versionNo: 9999,
pictureUrl: "/uimg1/b2c/image/iYphuBXkyRbWkpyww7wk9A.jpg",
pictureLocation: 5,
illegalFlag: 1
}
],
videoCode: "0a2fmquXqaOgn6-L4K2doafhoaWlmaacoKSc",
o2oCarFlag: false,
newDetailFlag: "1",
brandLogoUrl: "https://uimgproxy.suning.cn/uimg1/sel/mer/000000000030000400.png",
time: "00:52",
oneCategoryId: "20089",
mainVideoList: [
{
detailsUrl: "https://m4.suning.com/pvod/e11a0/0CoxJ26kjNbrjZMfNE-j7D6_UDw/eyJkbCI6MTY2MzIzMTg1NywiZXMiOjYwNDgwMCwiaWQiOiIwYTJmbXF1WHFhT2duNi1MNEsyZG9hZmhvYVdsbWFhY29LU2MiLCJ2IjoiMS4wIn0/0a2fmquXqaOgn6-L4K2doafhoaWlmaacoKSc.mp4",
tagInfoList: [
{ }
],
videoOrder: "1",
videoTagDesc: "商品介绍",
highQuality: "N",
coverUrl: "https://v-img.suning.com/64/11/64119161f0a4308b6243160df5df5988/1662627056463.jpg",
time: "00:52",
orderCode: "31",
videoScale: "1"
}
],
twoCategoryId: "20002",
catalogSign: "A",
shopType: "0",
cmmdtyType: "Z001",
detailsUrl: "https://m4.suning.com/pvod/e11a0/0CoxJ26kjNbrjZMfNE-j7D6_UDw/eyJkbCI6MTY2MzIzMTg1NywiZXMiOjYwNDgwMCwiaWQiOiIwYTJmbXF1WHFhT2duNi1MNEsyZG9hZmhvYVdsbWFhY29LU2MiLCJ2IjoiMS4wIn0/0a2fmquXqaOgn6-L4K2doafhoaWlmaacoKSc.mp4",
hasCarrefourCS: false,
pdsTimeStamp: "1054",
itemType: "0",
hasCarrefour: false,
brandCode: "0030000400",
videoLabels: [
{ }
],
itemInfoVo: {
businessFieldList: [
{
key: "PRMT_TMPL_CODE",
value: "0126736"
}
],
weight: "0.34",
brandId: "000060021",
itemPrice: "0.00",
businessFlag: "",
itemName: "Apple iPhone 14 128G 午夜色 移动联通电信5G 双卡双待手机",
itemType: "10",
itemId: "0",
brandCode: "0021",
attachedTypeList: [
{
attachedValue: "000000000945153621",
attachedType: "1"
},
{
attachedValue: "000000000945153673",
attachedType: "1"
},
{
attachedValue: "000000000945153693",
attachedType: "1"
},
{
attachedValue: "000000000945153704",
attachedType: "1"
},
{
attachedValue: "000000000945153715",
attachedType: "1"
},
{
attachedValue: "000000000945154155",
attachedType: "1"
},
{
attachedValue: "000000000945156808",
attachedType: "1"
},
{
attachedValue: "000000000945156823",
attachedType: "1"
},
{
attachedValue: "000000000945156830",
attachedType: "1"
},
{
attachedValue: "000000000945156831",
attachedType: "1"
},
{
attachedValue: "000000000945156832",
attachedType: "1"
},
{
attachedValue: "000000000945156833",
attachedType: "1"
},
{
attachedValue: "000000000945156834",
attachedType: "1"
},
{
attachedValue: "000000000945156836",
attachedType: "1"
},
{
attachedValue: "000000000945156841",
attachedType: "1"
},
{
attachedValue: "000000000945156846",
attachedType: "1"
},
{
attachedValue: "000000000945156851",
attachedType: "1"
},
{
attachedValue: "000000000945156856",
attachedType: "1"
},
{
attachedValue: "000000000945156861",
attachedType: "1"
},
{
attachedValue: "000000000945156866",
attachedType: "1"
},
{
attachedValue: "000000000945156871",
attachedType: "1"
},
{
attachedValue: "000000000945156876",
attachedType: "1"
},
{
attachedValue: "000000000945156881",
attachedType: "1"
},
{
attachedValue: "000000000945156897",
attachedType: "1"
},
{
attachedValue: "000000000945156898",
attachedType: "1"
},
{
attachedValue: "000000000945156902",
attachedType: "1"
},
{
attachedValue: "000000000945156907",
attachedType: "1"
},
{
attachedValue: "000000000945156911",
attachedType: "1"
},
{
attachedValue: "000000000945156919",
attachedType: "1"
},
{
attachedValue: "000000000945156931",
attachedType: "1"
},
{
attachedValue: "000000000945156943",
attachedType: "1"
},
{
attachedValue: "000000000945156948",
attachedType: "1"
}
],
published: "1",
itemDisplayName: "Apple iPhone 14 128G 午夜色 移动联通电信5G 双卡双待手机",
deleteFlag: "0",
sizeAttribute: "2",
brandName: "Apple",
partNumber: "000000012389328845",
imageCount: "5",
categoryCode: "R1901001",
cmmdtyType: "Z001",
volume: "404.096",
errCode: "0",
isbnCode: "194253407966"
},
pptvFlag: "0",
imgVideoUrl: "http://product.m.suning.com/pds-web/picVideo/0a2fmquXqaOgn6-L4K2doafhoaWlmaacoKSc.html",
brandName: "Apple产品苏宁自营旗舰店",
brandUrl: "http://shop.m.suning.com/app/30000400.html?client=app",
partNumber: "000000012389328845",
groupInfoVO: {
catalogId: "10051",
categoryLevel: "3",
categoryUrl: "",
categoryName: "手机",
categoryId: "20006",
parentCategoryId: "20002"
},
brandStatus: "0",
passPartNumber: "000000012389328845",
coldChainFlag: "01",
shopName: "苏宁自营",
catalogId: "10051"
},
code: "1",
api: "getItemBigInfoNew"
},
hdFlag: "",
groupChatSwitch: "1",
luaAdDsms: "1",
zyTV: "0",
xcxGqFlag: "0",
saleSizeFlag: "N",
commObj: {
freightLabelsFlag: "1",
packageYhSwith: "1",
installJumpText: "查看安装流程、收费标准"
},
flag: "0",
dcjClickFlag: "1",
szytObj: { },
thirtydaybtcode: "SL00000008",
paySwitch: "1",
deliverableFlag: "N",
rewardGoldUrl: "https://passport.suning.com/ids/trustLogin?sysCode=epp&agentType=wap&targetUrl=https%3A%2F%2Frdfmresh.suning.com%2Ffmresh%2Freward%2FrewardIndex.htm",
carrefour: { },
propressNum: "200",
recomme