欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

唯品会API接口:item_get - 获得vip商品详情

程序员文章站 2022-07-14 18:48:41
...

万邦唯品会获得vip商品详情 API 返回值说明
唯品会API接口:item_get - 获得vip商品详情

-- 请求示例 url 默认请求参数已经URL编码处理
curl -i "https://api.onebound.cn/vip/api_call.php?key=<您自己的apiKey>&secret=<您自己的apiSecret>&api_name=item_get&num_iid=1710613157-6918711233889249157"
<?php
$method = "GET";
// 请求示例 url 默认请求参数已经URL编码处理
$url = "https://api.onebound.cn/vip/api_call.php?key=<您自己的apiKey>&secret=<您自己的apiSecret>&api_name=item_get&num_iid=1710613157-6918711233889249157";
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $url);
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));
?>
<?php
//定义缓存目录和引入文件
define("DIR_RUNTIME","runtime/");
define("DIR_ERROR","runtime/");
define("SECACHE_SIZE","0");
//SDK下载地址 http://api.onebound.cn/taobao/demo/sdk2020/onebound-api-sdk.zip
include ("ObApiClient.php");

$obapi = new otao\ObApiClient();
$obapi->api_url = "http://api.onebound.cn/";
$obapi->api_urls = array("http://api.onebound.cn/","http://api-1.onebound.cn/");//备用API服务器
$obapi->api_urls_on = true;//当网络错误时,是否启用备用API服务器
$obapi->api_key = "<您自己的apiKey>";
$obapi->api_secret = "<您自己的apiSecret>";
$obapi->api_version ="";
$obapi->secache_path ="runtime/";
$obapi->secache_time ="86400";
$obapi->cache = true;

$api_data = $obapi->exec(
                array(
	                "api_type" =>"vip",
	                "api_name" =>"item_get",
	                "api_params"=>array (
  'num_iid' => '1710613157-6918711233889249157',
)
                )
            );
 var_dump($api_data);
?>

点击注册测试地址(获取Key和secret)
唯品会API接口:item_get - 获得vip商品详情

Request address:
//api.onebound.cn/vip/api_call.php?
num_iid=1710613157-6918711233889249157&api_name=item_get&lang=zh-CN&key=&secret=
---------------------------------------
Result Object:
---------------------------------------
{
	"item": {
		"num_iid": "1710613157-6918711233889249157",
		"title": "森马 | 【清凉运动】森马夏季新款复古运动风男式休闲中裤短裤男",
		"desc_short": "",
		"price": "49",
		"total_price": 0,
		"suggestive_price": 0,
		"orginal_price": "",
		"nick": "唯品会",
		"num": 77,
		"min_num": 0,
		"detail_url": "https://detail.vip.com/detail-1710613157-6918711233889249157.html",
		"pic_url": "//a.vpimg4.com/upload/merchandise/pdcvis/104218/2020/0715/1/fed667be-e87b-418d-8fb4-9ae0da3d7e99.jpg",
		"brand": "唯品会好货精选",
		"brandId": "1710613157",
		"rootCatId": "",
		"cid": 390576,
		"crumbs": [],
		"created_time": "",
		"modified_time": "",
		"delist_time": "",
		"desc": "<img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/1540464613-651972905622466560-651972905622466562-601.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/2056028139-651972905622466560-651972905622466562-602.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/2103507544-651972905622466560-651972905622466562-603.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/805209464-651972905622466560-651972905622466562-604.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/965265007-651972905622466560-651972905622466562-605.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/1456204603-651972905622466560-651972905622466562-606.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/245784564-651972905622466560-651972905622466562-607.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/478942397-651972905622466560-651972905622466562-608.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/563202406-651972905622466560-651972905622466562-609.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/576808585-651972905622466560-651972905622466562-610.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/492548576-651972905622466560-651972905622466562-611.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/475079584-651972905622466560-651972905622466562-612.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/643984351-651972905622466560-651972905622466562-613.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/723627373-651972905622466560-651972905622466562-614.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/353669547-651972905622466560-651972905622466562-615.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/241322868-651972905622466560-651972905622466562-616.jpg' ><img src='//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/270393169-651972905622466560-651972905622466562-617.jpg' >",
		"desc_img": [
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/1540464613-651972905622466560-651972905622466562-601.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/2056028139-651972905622466560-651972905622466562-602.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/2103507544-651972905622466560-651972905622466562-603.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/805209464-651972905622466560-651972905622466562-604.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/965265007-651972905622466560-651972905622466562-605.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/1456204603-651972905622466560-651972905622466562-606.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/245784564-651972905622466560-651972905622466562-607.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/478942397-651972905622466560-651972905622466562-608.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/563202406-651972905622466560-651972905622466562-609.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/576808585-651972905622466560-651972905622466562-610.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/492548576-651972905622466560-651972905622466562-611.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/475079584-651972905622466560-651972905622466562-612.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/643984351-651972905622466560-651972905622466562-613.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/723627373-651972905622466560-651972905622466562-614.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/353669547-651972905622466560-651972905622466562-615.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/241322868-651972905622466560-651972905622466562-616.jpg",
			"//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/270393169-651972905622466560-651972905622466562-617.jpg"
		],
		"item_imgs": [
			{
				"url": "//a.vpimg4.com/upload/merchandise/pdcvis/104218/2020/0715/1/fed667be-e87b-418d-8fb4-9ae0da3d7e99.jpg"
			},
			{
				"url": "//a.vpimg4.com/upload/merchandise/pdcvis/104218/2020/0610/171/dbe0c41b-4a98-49f3-a5ec-8a4da2866892.jpg"
			},
			{
				"url": "//a.vpimg4.com/upload/merchandise/pdcvis/104218/2020/0519/147/b64c59ed-838d-48df-bd78-89f55e375a5a.jpg"
			},
			{
				"url": "//a.vpimg4.com/upload/merchandise/pdcvis/104218/2020/0519/137/29223c17-dc85-412f-80c8-e0332f2f68d5.jpg"
			},
			{
				"url": "//a.vpimg4.com/upload/merchandise/pdcvis/104218/2020/0519/185/8cd6c2f7-bc39-49a5-bf98-cebb1e764dd4.jpg"
			},
			{
				"url": "//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/25466546-651972905622466560-651972905622466562-2.jpg"
			},
			{
				"url": "//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/1077608551-651972905622466560-651972905622466562-3.jpg"
			},
			{
				"url": "//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/1680510077-651972905622466560-651972905622466562-4.jpg"
			},
			{
				"url": "//a.vpimg4.com/upload/merchandise/pdcvop/00104218/10004116/1463673259-651972905622466560-651972905622466562-15.jpg"
			},
			{
				"url": "//a.vpimg4.com/upload/merchandise/pdcvis/104218/2020/0610/102/36a2bb01-d66a-4ea9-a7b0-07b4231be7ec.jpg"
			}
		],
		"item_weight": "",
		"item_size": "",
		"location": "",
		"post_fee": "",
		"express_fee": "",
		"ems_fee": "",
		"shipping_to": "",
		"has_discount": "",
		"video": [],
		"is_virtual": "",
		"sample_id": "",
		"is_promotion": "",
		"props_name": "Array51666:87372:尺码:XXL;51666:2811:尺码:XS;51666:83:尺码:S;51666:77:尺码:M;51666:76:尺码:L;51666:2804:尺码:XL;51666:2708980:尺码:XXXL;48722:816289944:颜色:黑色9000",
		"prop_imgs": {
			"prop_img": []
		},
		"property_alias": "Array51666:87372:尺码:XXL;51666:2811:尺码:XS;51666:83:尺码:S;51666:77:尺码:M;51666:76:尺码:L;51666:2804:尺码:XL;51666:2708980:尺码:XXXL;48722:816289944:颜色:黑色9000",
		"props": [
			{
				"name": "风格",
				"value": "休闲"
			},
			{
				"name": "流行元素",
				"value": "车缝线,口袋,抽绳装饰"
			},
			{
				"name": "适用场合",
				"value": "运动,休闲,沙滩"
			},
			{
				"name": "版型",
				"value": "直筒"
			},
			{
				"name": "厚薄",
				"value": "常规"
			},
			{
				"name": "弹性",
				"value": "微弹"
			},
			{
				"name": "适用季节",
				"value": "夏"
			},
			{
				"name": "裤长",
				"value": "五分裤"
			},
			{
				"name": "腰型",
				"value": "中腰"
			},
			{
				"name": "适用人群",
				"value": "青少年,青年"
			},
			{
				"name": "面料",
				"value": "棉混纺"
			},
			{
				"name": "图案",
				"value": "条纹,撞色,字母"
			},
			{
				"name": "款式",
				"value": "直筒裤"
			},
			{
				"name": "上市时间",
				"value": "2020"
			},
			{
				"name": "裤门襟",
				"value": "系绳"
			},
			{
				"name": "适用性别",
				"value": "男"
			},
			{
				"name": "产地",
				"value": "中国"
			},
			{
				"name": "材质",
				"value": "面料:52.1%聚酯纤维   47.9%棉"
			},
			{
				"name": "洗涤说明",
				"value": "手洗最高洗涤温度40℃,不可漂白,在阴凉处悬挂晾干,熨斗底板最高温度110℃,不可干洗"
			},
			{
				"name": "商品配件",
				"value": "问:\n尺码会不会偏大或偏小?\n答:\n亲,我们的都是常规标准码的哦,您可以放心购买的哈~每个人的体型不一样,您可以结合客服的建议、商品尺码表和您平时穿尺码综合考虑哦~如果您追求修身的效果建议您拍小1码,感谢您对森马的支持!森马祝您生活愉快"
			}
		],
		"total_sold": "",
		"skus": {
			"sku": [
				{
					"price": "49",
					"orginal_price": null,
					"properties": "48722:816289944;51666:87372",
					"properties_name": "48722:816289944:颜色:黑色9000;51666:87372:尺码:XXL",
					"quantity": 11,
					"sku_id": "651972905622470656"
				},
				{
					"price": "49",
					"orginal_price": null,
					"properties": "48722:816289944;51666:2811",
					"properties_name": "48722:816289944:颜色:黑色9000;51666:2811:尺码:XS",
					"quantity": 11,
					"sku_id": "651972905622466561"
				},
				{
					"price": "49",
					"orginal_price": null,
					"properties": "48722:816289944;51666:2708980",
					"properties_name": "48722:816289944:颜色:黑色9000;51666:2708980:尺码:XXXL",
					"quantity": 11,
					"sku_id": "651972905622470657"
				},
				{
					"price": "49",
					"orginal_price": null,
					"properties": "48722:816289944;51666:2804",
					"properties_name": "48722:816289944:颜色:黑色9000;51666:2804:尺码:XL",
					"quantity": 11,
					"sku_id": "651972905622466567"
				},
				{
					"price": "49",
					"orginal_price": null,
					"properties": "48722:816289944;51666:83",
					"properties_name": "48722:816289944:颜色:黑色9000;51666:83:尺码:S",
					"quantity": 11,
					"sku_id": "651972905622466564"
				},
				{
					"price": "49",
					"orginal_price": null,
					"properties": "48722:816289944;51666:77",
					"properties_name": "48722:816289944:颜色:黑色9000;51666:77:尺码:M",
					"quantity": 11,
					"sku_id": "651972905622466565"
				},
				{
					"price": "49",
					"orginal_price": null,
					"properties": "48722:816289944;51666:76",
					"properties_name": "48722:816289944:颜色:黑色9000;51666:76:尺码:L",
					"quantity": 11,
					"sku_id": "651972905622466566"
				}
			]
		},
		"seller_id": "",
		"sales": 0,
		"shop_id": "",
		"props_list": {
			"51666:87372": "尺码:XXL",
			"51666:2811": "尺码:XS",
			"51666:83": "尺码:S",
			"51666:77": "尺码:M",
			"51666:76": "尺码:L",
			"51666:2804": "尺码:XL",
			"51666:2708980": "尺码:XXXL",
			"48722:816289944": "颜色:黑色9000"
		},
		"seller_info": {
			"nick": "唯品会",
			"title": "唯品会",
			"shop_name": "唯品会",
			"zhuy": "https://www.vip.com/",
			"rate": "",
			"score": "",
			"score_p": "",
			"delivery_score": "",
			"item_score": "",
			"city": "",
			"level": "",
			"user_num_id": "",
			"sid": "",
			"company_name": "",
			"menu": ""
		},
		"tmall": "false",
		"error": "",
		"warning": "",
		"url_log": [],
		"props_img": [],
		"shop_item": [],
		"relate_items": []
	},
	"secache": "ce598a0a94090cd039c992849588a446",
	"secache_time": 1596447458,
	"secache_date": "2020-08-03 17:37:38",
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"error": "",
	"reason": "",
	"error_code": "0000",
	"cache": 0,
	"api_info": "today: max:",
	"execution_time": 1.163,
	"server_time": "Beijing/2020-08-03 17:37:38",
	"call_args": {
		"num_iid": "1710613157-6918711233889249157"
	},
	"api_type": "vip",
	"translate_language": "zh-CN",
	"translate_engine": "baidu",
	"server_memory": "2.61MB",
	"request_id": "15f27dae110cf8"
}