一、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文档参数说明
请求地址:https://console.open.onebound.cn/console/index.php?i=hardy
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
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版本 |
2、请求参数
请求参数:page=
参数说明:page:页码
token:SaaS授权
3、响应参数
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
cart_id | Bigint | 0 | 1055921809617 | 购物车商品ID |
num_iid | Bigint | 0 | 544135010416 | 商品ID |
title | String | 0 | Philips/飞利浦 DLK35002 车载手机支架 多功能吸盘式汽车手机座 | 商品标题 |
pic_url | String | 0 | //img.alicdn.com/bao/uploaded/i2/2934435917/TB2Ite9tlsmBKNjSZFFXXcT9VXa_!!2934435917-0-item_pic.jpg | 宝贝图片 |
detail_url | String | 0 | //detail.tmall.com/item.htm?id=544135010416 | 宝贝链接 |
promotion_price | Int | 0 | 69 | 优惠价 |
price | Int | 0 | 99 | 价格 |
num | Int | 0 | 1 | 数量 |
sku | Mix | 0 | {"颜色分类": "黑色"} | 商品规格列表 |
is_tmall | Boolean | 0 | true | 是否天猫 |
seller_info | Mix | 0 | {"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;
}