質問編集履歴
2
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,4 +18,67 @@
|
|
18
18
|
http://api.qoo10.jp/GMKT.INC.Front.OpenApiService/APIList/guideindex.aspx
|
19
19
|
|
20
20
|
|
21
|
-
宜しくお願い致します。
|
21
|
+
宜しくお願い致します。
|
22
|
+
|
23
|
+
|
24
|
+
追記
|
25
|
+
教えていただいたURLを参考に作成し試してみましたが同様の結果でした。
|
26
|
+
```ここに言語を入力
|
27
|
+
StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
|
28
|
+
{
|
29
|
+
Cache-Control: private
|
30
|
+
Date: Sat, 08 Aug 2020 09:04:33 GMT
|
31
|
+
Server: Microsoft-IIS/8.5
|
32
|
+
X-Powered-By: ASP.NET
|
33
|
+
Content-Length: 35
|
34
|
+
Content-Type: text/plain; charset=utf-8
|
35
|
+
}}
|
36
|
+
```
|
37
|
+
```ここに言語を入力
|
38
|
+
public static bool SetNewGoods(RequestNewGoods clsRequest)
|
39
|
+
{
|
40
|
+
try
|
41
|
+
{
|
42
|
+
Dictionary<string, string> dictParam;
|
43
|
+
|
44
|
+
dictParam = new Dictionary<string, string>();
|
45
|
+
dictParam.Add("key", clsRequest.key);
|
46
|
+
dictParam.Add("SecondSubCat", clsRequest.SecondSubCat.ToString());
|
47
|
+
if (0 != clsRequest.BrandNo)
|
48
|
+
{
|
49
|
+
dictParam.Add("BrandNo", clsRequest.BrandNo.ToString());
|
50
|
+
}
|
51
|
+
dictParam.Add("ItemTitle", clsRequest.ItemTitle);
|
52
|
+
dictParam.Add("SellerCode", clsRequest.SellerCode);
|
53
|
+
dictParam.Add("AudultYN", clsRequest.AudultYN);
|
54
|
+
dictParam.Add("StandardImage", clsRequest.StandardImage);
|
55
|
+
dictParam.Add("ItemDescription", clsRequest.ItemDescription);
|
56
|
+
dictParam.Add("RetailPrice", 0.ToString());
|
57
|
+
dictParam.Add("ItemPrice", clsRequest.ItemPrice.ToString());
|
58
|
+
dictParam.Add("ItemQty", clsRequest.ItemQty.ToString());
|
59
|
+
dictParam.Add("ExpireDate", clsRequest.ExpireDate);
|
60
|
+
dictParam.Add("ShippingNo", clsRequest.ShippingNo.ToString());
|
61
|
+
dictParam.Add("AvailableDateType", clsRequest.AvailableDateType.ToString());
|
62
|
+
dictParam.Add("AvailableDateValue", clsRequest.AvailableDateValue);
|
63
|
+
|
64
|
+
|
65
|
+
HttpClient clsHttpClient;
|
66
|
+
HttpResponseMessage clsResponceMsg;
|
67
|
+
FormUrlEncodedContent clsContent;
|
68
|
+
string strUrl;
|
69
|
+
|
70
|
+
clsContent = new FormUrlEncodedContent(dictParam);
|
71
|
+
strUrl = "http://api.qoo10.jp/GMKT.INC.Front.OpenApiService/GoodsBasicService.api/SetNewGoods";
|
72
|
+
clsHttpClient = new HttpClient();
|
73
|
+
clsResponceMsg = clsHttpClient.PostAsync(strUrl, clsContent).Result;
|
74
|
+
|
75
|
+
|
76
|
+
return true;
|
77
|
+
}
|
78
|
+
catch (Exception ex)
|
79
|
+
{
|
80
|
+
return false;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
```
|
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,8 +9,9 @@
|
|
9
9
|
上記の方法でURLにパラメータを付加してする方法はできていました。
|
10
10
|
ですが商品登録APIの際に商品説明文を送信するのですがそれをURLに直接付加するのは長すぎるのかなと思い他の方法を探しています。
|
11
11
|
ネット上にはJSONの方法はよく参考例としてあるのですがピンポイントで当てはまるようなものが無く。。。
|
12
|
-
半日ほどネット上の参考例をもとに試行錯誤していたのですが Server Error(500)しか出ず成功しません。
|
12
|
+
APIのヘルプページにはPOST、GET、SOAPといった方法が使用できるとあり、「C# POST」で検索して半日ほどネット上の参考例をもとに試行錯誤していたのですが Server Error(500)しか出ず成功しません。
|
13
13
|
|
14
|
+
どの方式でも構いません。
|
14
15
|
どなたかC#でのAPI参考例を教えていただけないでしょうか?
|
15
16
|
|
16
17
|
<商品登録API ヘルプ>
|