万邦中国供应商china获得china商品详情 API 返回值说明

item_get-获得china商品详情 [查看演示] API测试工具

onebound.china.item_get

公共参数

请求地址: https://api-gw.onebound.cn/china/item_get

名称 类型 必须 描述
keyString调用key(必须以GET方式拼接在URL中)
secretString调用密钥
api_nameStringAPI接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
cacheString[yes,no]默认yes,将调用缓存的数据,速度比较快
result_typeString[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
langString[cn,en,ru]翻译语言,默认cn简体中文
versionStringAPI版本
请求参数

请求参数:num_iid=4251932346

参数说明:num_iid:china商品ID

响应参数
名称 类型 是否隐私 示例值 描述
num_iidString4251932346宝贝ID
titleString雪地靴女2018秋冬新款保暖加厚女靴棉鞋防滑中筒女式皮靴子商品标题
desc_shortString靴筒内里材质:人造长毛绒靴上市年份季节:2018年秋季帮面材质:PU鞋面内里材质:人造长毛绒靴款品名:雪地靴筒高:短筒鞋头款式:圆头后跟高:中跟商品简介
priceFloat49.90价格
total_priceFloat0
suggestive_priceFloat0
orginal_priceFloat7.70原价
nickString欧阳先生卖家昵称
numInt2000
unitString单位
min_numInt3
detail_urlStringhttp://www.china.cn/pixue/4251932346.html宝贝链接
pic_urlStringhttps://img2.fr-trading.com/2/5_1005_1216165_800_800.jpg.webp宝贝图片
brandString品牌
brandIdInt品牌id
rootCatIdInt顶级分类ID
cidInt
favcountInt0
fanscountInt0
crumbsMixArray
created_timeString
modified_timeString
delist_timeString
descString
desc_imgMix[" https://himg.china.cn/img/mobile/common/loading/circle-loading.svg"]商品描述图片列表
item_imgsMix[{"url": " https://img2.fr-trading.com/2/5_1005_1216165_800_800.jpg.webp"}]商品图片列表
item_weightString
item_sizeString
locationString浙江 温岭市发货地
post_feeFloat邮费
express_feeFloatEMS费用
ems_feeFloat物流费用
shipping_toString发货至
has_discountBooleanfalse
videoMix[]商品视频
is_virtualString
sample_idString
is_promotionBooleanfalse
props_nameString商品属性名
prop_imgsMix{"prop_img": [ ]}商品属性图片列表
property_aliasString属性别名
propsMix[{"name": "品牌", "value": "other"}]商品详情
total_sold
skusMix{"sku": []}商品规格信息列表
seller_idInt2844096782卖家ID
salesInt1销售额
shop_idInt店铺ID
props_listMix商品属性
seller_infoMix{"title": "台州聚格商贸有限公司","shop_name": "台州聚格商贸有限公司", "sid": "","zhuy": "https://chuchujie.cn.china.cn","level": "","shop_type": "", "user_num_id": "", "cid": null, "delivery_score": null, "item_score": null, "score_p": null, "nick": "台州聚格商贸有限公司"}卖家信息
tmallBooleanfalse是否天猫
errorString错误信息
warningStringprice_json error;skus miss;警告信息
url_logMix
priceRangeMix["3","49.90"]价格区间
shop_itemMix
relate_itemsMix
请求示例
	
-- 请求示例 url 默认请求参数已经URL编码处理
curl -i "https://api-gw.onebound.cn/china/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=4251932346"
<?php

// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://api.onebound.cn/taobao/demo/sdk2020/demo-sign.php
$method = "GET";
$url = "https://api-gw.onebound.cn/china/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=4251932346";
$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));
?>
<?php
//定义缓存目录和引入文件
define("DIR_RUNTIME","runtime/");
define("DIR_ERROR","runtime/");
define("SECACHE_SIZE","0");
//SDK下载地址 http://api-gw.onebound.cn/taobao/demo/sdk2020/onebound-api-sdk.zip
include ("ObApiClient.php");

$obapi = new otao\ObApiClient();
$obapi->api_url = "http://api-gw.onebound.cn/";
$obapi->api_urls = array("http://api-gw.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" =>"china",
	                "api_name" =>"item_get",
	                "api_params"=>array (
  'num_iid' => '4251932346',
)
                )
            );
 var_dump($api_data);
?>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
import java.nio.charset.Charset;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.PrintWriter;
import java.net.URLConnection;

public class Example {
	private static String readAll(Reader rd) throws IOException {
		StringBuilder sb = new StringBuilder();
		int cp;
		while ((cp = rd.read()) != -1) {
			sb.append((char) cp);
		}
		return  sb.toString();
	}
	public static JSONObject postRequestFromUrl(String url, String body) throws IOException, JSONException {
		URL realUrl = new URL(url);
		URLConnection conn = realUrl.openConnection();
		conn.setDoOutput(true);
		conn.setDoInput(true);
		PrintWriter out = new PrintWriter(conn.getOutputStream());
		out.print(body);
		out.flush();
		InputStream instream = conn.getInputStream();
		try {
			BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8")));
			String jsonText = readAll(rd);
			JSONObject json = new JSONObject(jsonText);
			return json;
		} finally {
			instream.close();
		}
	}
	public static JSONObject getRequestFromUrl(String url) throws IOException, JSONException {
		URL realUrl = new URL(url);
		URLConnection conn = realUrl.openConnection();
		InputStream instream = conn.getInputStream();
		try {
			BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8")));
			String jsonText = readAll(rd);
			JSONObject json = new JSONObject(jsonText);
			return json;
		} finally {
			instream.close();
		}
	}
	public static void main(String[] args) throws IOException, JSONException {
		// 请求示例 url 默认请求参数已经URL编码处理
		String url = "https://api-gw.onebound.cn/china/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=4251932346";
		JSONObject json = getRequestFromUrl(url);
		System.out.println(json.toString());
	}

}
//using System.Net.Security;
//using System.Security.Cryptography.X509Certificates;
private const String method = "GET";
static void Main(string[] args)
{
	String bodys = "";
	// 请求示例 url 默认请求参数已经做URL编码
	String url = "https://api-gw.onebound.cn/china/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=4251932346";
	HttpWebRequest httpRequest = null;
	HttpWebResponse httpResponse = null; 
	if (url.Contains("https://"))
	{
		ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
		httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
	}
	else
	{
		httpRequest = (HttpWebRequest)WebRequest.Create(url);
	}
	httpRequest.Method = method;
	if (0 < bodys.Length)
	{
		byte[] data = Encoding.UTF8.GetBytes(bodys);
		using (Stream stream = httpRequest.GetRequestStream())
		{
		stream.Write(data, 0, data.Length);
		}
	}
	try
	{
		httpResponse = (HttpWebResponse)httpRequest.GetResponse();
	}
	catch (WebException ex)
	{
		httpResponse = (HttpWebResponse)ex.Response;
	}
	Console.WriteLine(httpResponse.StatusCode);
	Console.WriteLine(httpResponse.Method);
	Console.WriteLine(httpResponse.Headers);
	Stream st = httpResponse.GetResponseStream();
	StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
	Console.WriteLine(reader.ReadToEnd());
	Console.WriteLine("\n");
}
public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
{
	return true;
}
# 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://api-gw.onebound.cn/china/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=4251932346"
headers = {
    "Accept-Encoding": "gzip",
    "Connection": "close"
}
if __name__ == "__main__":
    r = requests.get(url, headers=headers)
    json_obj = r.json()
    print(json_obj)
响应示例
{
	"item": {
		"num_iid": "4251932346",
		"title": "雪地靴女2018秋冬新款保暖加厚女靴棉鞋防滑中筒女式皮靴子",
		"desc_short": "靴筒内里材质:人造长毛绒靴上市年份季节:2018年秋季帮面材质:PU鞋面内里材质:人造长毛绒靴款品名:雪地靴筒高:短筒鞋头款式:圆头后跟高:中跟",
		"price": "49.90",
		"total_price": 0,
		"suggestive_price": 0,
		"orginal_price": "",
		"nick": "欧阳先生",
		"num": "2000",
		"unit": "双",
		"min_num": "3",
		"detail_url": "http://www.china.cn/pixue/4251932346.html",
		"pic_url": "https://img2.fr-trading.com/2/5_1005_1216165_800_800.jpg.webp",
		"brand": null,
		"brandId": "",
		"rootCatId": "",
		"cid": "",
		"favcount": "",
		"fanscount": "",
		"crumbs": [],
		"created_time": "",
		"modified_time": "",
		"delist_time": "",
		"desc": "<h2>靴筒内里材质:人造长毛绒靴上市年份季节:2018年秋季帮面材质:PU鞋面内里材质:人造长毛绒靴款品名:雪地靴筒高:短筒鞋头款式:圆头后跟高:中跟</h2><div class=\"intro fl-clr\"><p><img class=\"lazy-load-other\"  src=\"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg\" data-original=\"https://img2.fr-trading.com/0/5_754_1194903_750_574.jpg.webp\"><img class=\"lazy-load-other\"  src=\"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg\" data-original=\"https://img2.fr-trading.com/0/5_285_1196783_732_800.jpg.webp\"><br/><img class=\"lazy-load-other\"  src=\"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg\" data-original=\"https://img2.fr-trading.com/0/5_915_1215981_800_800.jpg.webp\"><br/><img class=\"lazy-load-other\"  src=\"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg\" data-original=\"https://img2.fr-trading.com/0/5_945_1196787_800_800.jpg.webp\"><br/><img class=\"lazy-load-other\"  src=\"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg\" data-original=\"https://img2.fr-trading.com/0/5_792_1194687_800_800.jpg.webp\"><br/><img class=\"lazy-load-other\"  src=\"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg\" data-original=\"https://img2.fr-trading.com/0/5_126_1194371_800_800.jpg.webp\"><br/><img class=\"lazy-load-other\"  src=\"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg\" data-original=\"https://img2.fr-trading.com/0/5_1005_1216165_800_800.jpg.webp\"><br/><img class=\"lazy-load-other\"  src=\"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg\" data-original=\"https://img2.fr-trading.com/0/5_1010_1215735_800_800.jpg.webp\"><br/><img class=\"lazy-load-other\"  src=\"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg\" data-original=\"https://img2.fr-trading.com/0/5_147_1195611_800_800.jpg.webp\"><br/><img class=\"lazy-load-other\"  src=\"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg\" data-original=\"https://img2.fr-trading.com/0/5_334_1196587_800_800.jpg.webp\"><br/><img class=\"lazy-load-other\"  src=\"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg\" data-original=\"https://img2.fr-trading.com/0/5_42_1196891_728_800.jpg.webp\"><br/></p></div>",
		"desc_img": [
			"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg",
			"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg",
			"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg",
			"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg",
			"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg",
			"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg",
			"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg",
			"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg",
			"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg",
			"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg",
			"https://himg.china.cn/img/mobile/common/loading/circle-loading.svg"
		],
		"item_imgs": [
			{
				"url": " https://img2.fr-trading.com/2/5_1005_1216165_800_800.jpg.webp"
			},
			{
				"url": " https://img2.fr-trading.com/2/5_792_1194687_800_800.jpg.webp"
			},
			{
				"url": " https://img2.fr-trading.com/2/5_126_1194371_800_800.jpg.webp"
			}
		],
		"item_weight": "",
		"item_size": "",
		"location": "浙江 温岭市",
		"post_fee": "",
		"express_fee": "",
		"ems_fee": "",
		"shipping_to": "",
		"has_discount": "",
		"video": [],
		"is_virtual": "",
		"sample_id": "",
		"is_promotion": "false",
		"props_name": "",
		"prop_imgs": {
			"prop_img": []
		},
		"property_alias": "",
		"props": [
			{
				"name": "适用年龄段",
				"value": "成年"
			},
			{
				"name": "产品类别",
				"value": "时装靴"
			},
			{
				"name": "货源类别",
				"value": "现货"
			},
			{
				"name": "是否库存",
				"value": "是"
			},
			{
				"name": "鞋面材质",
				"value": "人造PU"
			},
			{
				"name": "适用性别",
				"value": "女"
			},
			{
				"name": "风格",
				"value": "淑女"
			},
			{
				"name": "流行靴款",
				"value": "雪地靴"
			},
			{
				"name": "流行元素",
				"value": "金属"
			},
			{
				"name": "筒高",
				"value": "中筒"
			},
			{
				"name": "最快出货时间",
				"value": "2天"
			},
			{
				"name": "颜色",
				"value": "黑色"
			},
			{
				"name": "尺码",
				"value": "35、36、37、38、39"
			},
			{
				"name": "货号",
				"value": "789"
			},
			{
				"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": "sgs"
			},
			{
				"name": "内里材质",
				"value": "棉质"
			},
			{
				"name": "靴筒内里材质",
				"value": "PU"
			},
			{
				"name": "靴筒材质",
				"value": "PU"
			},
			{
				"name": "上市年份季节(上市时间)",
				"value": "2018年秋季"
			},
			{
				"name": "最晚发货时间",
				"value": "3天"
			},
			{
				"name": "是否跨境货源",
				"value": "是"
			},
			{
				"name": "主要销售地区",
				"value": "中东"
			},
			{
				"name": "有可授权的自有品牌",
				"value": "是"
			},
			{
				"name": "",
				"value": ""
			}
		],
		"total_sold": "0",
		"skus": {
			"sku": []
		},
		"seller_id": "",
		"sales": 1,
		"shop_id": "",
		"props_list": [],
		"seller_info": {
			"title": "台州聚格商贸有限公司",
			"shop_name": "台州聚格商贸有限公司",
			"sid": "",
			"zhuy": "https://chuchujie.cn.china.cn",
			"level": "",
			"shop_type": "",
			"user_num_id": "",
			"nick": "台州聚格商贸有限公司",
			"cid": null,
			"delivery_score": "",
			"item_score": "",
			"score_p": ""
		},
		"tmall": "false",
		"error": "",
		"warning": "",
		"url_log": [],
		"stuff_status": "",
		"data_from": "",
		"method": "",
		"promo_type": null,
		"props_img": [],
		"rate_grade": "",
		"priceRange": [
			[
				"3",
				"49.90"
			],
			[
				"10",
				"48.00"
			],
			[
				"30",
				"46.00"
			]
		],
		"shop_item": [],
		"relate_items": []
	},
	"secache": "e37c427ca17e47d7389fd1001f11328b",
	"secache_time": 1607503169,
	"secache_date": "2020-12-09 16:39:29",
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"error": "",
	"reason": "",
	"error_code": "0000",
	"cache": 0,
	"api_info": "today:4 max:20000",
	"execution_time": 0.623,
	"server_time": "Beijing/2020-12-09 16:39:29",
	"client_ip": "182.103.240.215",
	"call_args": {
		"num_iid": "4251932346"
	},
	"api_type": "china",
	"translate_language": "zh-CN",
	"translate_engine": "google_cn",
	"server_memory": "2.9MB",
	"request_id": "4.5fd08d415d7bf"
}
异常示例
{
  "error": "item-not-found",
  "reason": "商品没找到",
  "error_code": "2000",
  "success": 0,
  "cache": 0,
  "api_info": "today:0 max:10000",
  "execution_time": 0.081,
  "server_time": "Beijing/2020-06-10 23:44:00",
  "call_args": [],
  "api_type": "1688",
  "request_id": "15ee0ffc041242"
}
相关资料
错误码解释
状态代码(error_code) 状态信息 详细描述 是否收费
0000success接口调用成功并返回相关数据
2000Search success but no result接口访问成功,但是搜索没有结果
4000Server internal error服务器内部错误
4001Network error网络错误
4002Target server error目标服务器错误
4003Param error用户输入参数错误
4004Account not found用户帐号不存在
4005Invalid authentication credentials授权失败
4006API stopped您的当前API已停用
4007Account stopped您的账户已停用
4008API rate limit exceeded并发已达上限
4009API maintenanceAPI维护中
4010API not found with these valuesAPI不存在
4012Please add api first请先添加api
4013Number of calls exceeded调用次数超限
4014Missing url param参数缺失
4015Wrong pageToken参数pageToken有误
4016Insufficient balance余额不足
4017timeout error请求超时
5000unknown error未知错误
API 工具
如何获得此API
立即开通 有疑问联系客服QQ:QQ:583964941583964941(微信同号)