有赞的API接口:
请求地址:https://open.youzan.com/api/oauthentry/youzan.multistore.goods.sku/3.0.0/update
参数:
名称 (类型)
price (Price)
offline_id (Number)
num_iid (Number)
请求示例(C++)
以下内容为程序代码:
1 Auth auth = new Token("xxx"); // Auth auth = new Sign("app_id", "app_secret");
2
3 YZClient yzClient = new DefaultYZClient(auth);
4 Dictionary<string, object> dict = new System.Collections.Generic.Dictionary<string, object>();
5 dict.Add("num_iid", 1335438058);
6 dict.Add("offline_id", 1098006);
7 dict.Add("price", 99);
8
9 var result = yzClient.Invoke("youzan.multistore.goods.sku.update", "3.0.0", "GET", dict, null);
10 Console.WriteLine(result);
请求示例(php)
以下内容为程序代码:
1 <?php
2 require_once __DIR__ . '/lib/YZTokenClient.php';
3
4 $token = 'fill your token';//请填入商家授权后获取的access_token
5 $client = new YZTokenClient($token);
6
7 $method = 'youzan.multistore.goods.sku.update'; //要调用的api名称
8 $api_version = '3.0.0'; //要调用的api版本号
9
10 $my_params = [
11 'num_iid' => '1335438058',
12 'offline_id' => '1098006',
13 'price' => '99',
14 ];
15
16 $my_files = [
17 ];
18
19 echo '<pre>';
20 var_dump(
21 $client->post($method, $api_version, $my_params, $my_files)
22 );
23 echo '</pre>';
他们的调试工具网址:https://www.youzanyun.com/docs/debugger
不懂怎么写代码。
我想参照http://www.foxtable.com/mobilehelp/scr/0246.htm来写,但是一直没搞对,帮助文档里面只有一个APPCODE,但是有赞的话有AppID和AppSecret,希望狐爸能给写个代码举一反三。谢谢谢谢~