item_sku-获取sku详细信息
前往测试接口 公共参数
请求地址: https://api-gw.onebound.cn/taobao/item_sku
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
key | String | 是 | 调用key(必须以GET方式拼接在URL中) |
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=572050066584&sku_id=3880971359554&is_promotion=0
参数说明:sku_id:SKU ID
num_iid:商品ID
is_promotion:是否获取取促销价
响应参数
Version: Date:
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
num_iid | Bigint | 0 | 572050066584 | 宝贝ID |
name | String | 0 | 尺码:S;颜色分类:白色衬衫 | 规格名称 |
img | String | 0 | //gd2.alicdn.com/imgextra/i2/3542320334/TB2gPaOyYSYBuNjSspiXXXNzpXa_!!3542320334.jpg | 规格图片 |
price | Float | 0 | 83.7 | 优惠价 |
orginal_price | Float | 0 | 135.00 | 原价 |
express_fee | Float | 0 | 6.00 | 快递费用 |
title | String | 0 | 雪纺白色衬衫女长袖面试职业正装2018秋新款OL防走光工作服打底衣 | 宝贝标题 |
detail_link | String | 0 | http://item.taobao.com/item.htm?id=572050066584 | 宝贝链接 |
pic_url | String | 0 | //gd3.alicdn.com/imgextra/i2/3542320334/TB2zGWny4SYBuNjSsphXXbGvVXa_!!3542320334.jpg | 宝贝图片 |
quantity | Int | 0 | 257 | 库存 |
properties | String | 0 | 20509:28314;1627207:3714507 | 属性id组合 |
sku_id | String | 0 | 3880971359554 | 规格ID |
API返回结果
---------------------------------------
{
"item": {
"num_iid": "572050066584",
"name": "尺码:S;颜色分类:白色衬衫",
"img": "//gd4.alicdn.com/imgextra/i2/3542320334/TB2gPaOyYSYBuNjSspiXXXNzpXa_!!3542320334.jpg",
"price": 135,
"orginal_price": 135,
"express_fee": null,
"title": "雪纺白色衬衫女长袖面试职业正装2018秋新款OL防走光工作服打底衣",
"detail_link": "https://item.taobao.com/item.htm?id=572050066584",
"pic_url": "https://gw.alicdn.com/imgextra/TB2zGWny4SYBuNjSsphXXbGvVXa_!!3542320334.jpg",
"quantity": 200,
"properties": "20509:28314;1627207:3714507",
"sku_id": "3880971359554"
},
"secache": "1ada3a5e5067def024375a479537a3f4",
"secache_time": 1661130202,
"secache_date": "2022-08-22 09:03:22",
"error": "",
"reason": "",
"error_code": "0000",
"cache": 0,
"api_info": "today:12 max:10100 all[30=12+2+16];expires:2030-12-31",
"execution_time": "2.027",
"server_time": "Beijing/2022-08-22 09:03:22",
"client_ip": "106.6.39.114",
"call_args": {
"num_iid": "572050066584"
},
"api_type": "taobao",
"translate_language": "zh-CN",
"translate_engine": "google_new",
"server_memory": "0.92MB",
"request_id": "gw-4.6302d5d82fb14",
"last_id": "1166365926"
}
请求示例
<?php
// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://open.onebound.cn/help/demo/sdk/demo-sign.php
$method = "GET";
$url = "https://api-gw.onebound.cn/taobao/item_sku/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=572050066584&sku_id=3880971359554&is_promotion=0";
$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));
?>
```
```