获取的商品列表和商品分类

 一、custom自定义API操作

buyer_order_list获取购买到的商品订单列表
buyer_order_detail获取购买到的商品订单详情
buyer_order_express获取购买到的商品订单物流
buyer_address_list收货地址列表
buyer_address_add添加收货地址
buyer_info买家信息
buyer_token买家token
seller_order_list获取卖出的商品订单列表
seller_cat_props商品分类属性

二、API文档参数说明

1、公共参数

请求地址:https://console.open.onebound.cn/console/index.php?i=hardy

名称类型必须描述
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版本

2、请求参数

请求参数:page=

参数说明:page:页码
token:SaaS授权

3、响应参数

名称类型必须示例值描述

cart_id

Bigint01055921809617购物车商品ID

num_iid

Bigint0544135010416商品ID

title

String0Philips/飞利浦 DLK35002 车载手机支架 多功能吸盘式汽车手机座商品标题

pic_url

String0//img.alicdn.com/bao/uploaded/i2/2934435917/TB2Ite9tlsmBKNjSZFFXXcT9VXa_!!2934435917-0-item_pic.jpg宝贝图片

detail_url

String0//detail.tmall.com/item.htm?id=544135010416宝贝链接

promotion_price

Int069优惠价

price

Int099价格

num

Int01数量

sku

Mix0{"颜色分类": "黑色"}商品规格列表

is_tmall

Boolean0true是否天猫

seller_info

Mix0{"shop_type": "B", "title": "飞利浦淘参谋专卖", "sid": 165655803, "user_num_id": "2934435917", "zhuy": "//store.taobao.com/shop/view_shop.htm?user_number_id=2934435917"}卖家信息

4、请求示例​

//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/taobao/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=520813250866&is_promotion=1";
	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;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值