Amazon APIに関する多くのドキュメントを読んでいますが、私が受け取っているエラーではまだ分かりません。APIを使用してAmazonのアイテム数を更新する際にエラーが発生しました
私は私のinventoyを更新するために、これを使用しています:
私は別の文書、新しいサービスのURLを記載し、それぞれを読んでいる、と私はそれについて本当に混乱しています。..
config.ServiceURL = "https://mws.amazonservices.co.uk/FulfillmentInventory/2011-10-01";
config.ServiceURL = "https://secure.amazon.co.uk/exec/panama/seller-admin/catalog-upload/modify-only";
私のコードを開始しますプロセスと要求を送信は、次のとおりです。
String accessKeyId = "#";
String secretAccessKey = "#";
String merchantId = "#";
String marketplaceId = "#";
MemoryStream stream = new MemoryStream();
stream = GenerateInventoryDocument(txtxSku.Text, merchantId, txtQuantity.Text);
const string applicationName = "C#";
const string applicationVersion = "4";
MarketplaceWebServiceConfig config = new MarketplaceWebServiceConfig();
MarketplaceWebService.MarketplaceWebService service = new MarketplaceWebServiceClient(accessKeyId, secretAccessKey, applicationName, applicationVersion, config);
MarketplaceWebService.Model.SubmitFeedResponse response = new MarketplaceWebService.Model.SubmitFeedResponse();
MarketplaceWebService.Model.SubmitFeedRequest request = new MarketplaceWebService.Model.SubmitFeedRequest();
request.Merchant = merchantId;
request.MarketplaceIdList = new MarketplaceWebService.Model.IdList();
request.MarketplaceIdList.Id = new List<string>(new string[] { marketplaceId });
request.FeedContent = stream;
request.ContentMD5 = MarketplaceWebServiceClient.CalculateContentMD5(request.FeedContent);
request.FeedContent.Position = 0;
request.FeedType = "_POST_INVENTORY_AVAILABILITY_DATA_";
SubmitFeedSample.InvokeSubmitFeed(service, request);
GenerateInventoryDocument()
機能は次のとおりです。
MemoryStream myDocument = new MemoryStream();
string myString;
//Add the document header.
myString = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
this.AddStringToStream(ref myString, myDocument);
myString = "<AmazonEnvelope xsi:noNamespaceSchemaLocation=\"amzn-envelope.xsd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">";
this.AddStringToStream(ref myString, myDocument);
myString = "<Header>";
this.AddStringToStream(ref myString, myDocument);
myString = "<DocumentVersion>1.01</DocumentVersion>";
this.AddStringToStream(ref myString, myDocument);
myString = "<MerchantIdentifier>" + merchantID + "</MerchantIdentifier>";
this.AddStringToStream(ref myString, myDocument);
myString = "</Header>";
this.AddStringToStream(ref myString, myDocument);
myString = "<MessageType>Inventory</MessageType>";
this.AddStringToStream(ref myString, myDocument);
myString = "<Message>";
this.AddStringToStream(ref myString, myDocument);
myString = "<MessageID>1</MessageID>";
this.AddStringToStream(ref myString, myDocument);
myString = "<OperationType>Update</OperationType>";
this.AddStringToStream(ref myString, myDocument);
myString = "<Inventory>";
this.AddStringToStream(ref myString, myDocument);
myString = "<SKU>" + sku + "</SKU>";
this.AddStringToStream(ref myString, myDocument);
myString = "<FulfillmentLatency>1</FulfillmentLatency>";
this.AddStringToStream(ref myString, myDocument);
myString = "<Quantity>" + quantity + "</Quantity>";
this.AddStringToStream(ref myString, myDocument);
myString = "</Inventory>";
this.AddStringToStream(ref myString, myDocument);
myString = "</Message>";
this.AddStringToStream(ref myString, myDocument);
myString = "</AmazonEnvelope>";
this.AddStringToStream(ref myString, myDocument);
return myDocument;
私はこのURLを使用する場合:
<ErrorResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2011-10-01/">
<Error>
<Type>Sender</Type>
<Code>NoSuchVersion</Code>
<Message>The requested version (2010-01-01) is not valid.</Message>
<Detail/>
</Error>
<RequestID>f35d1eb0-b8e7-40c0-8394-027619fb0762</RequestID>
</ErrorResponse>
そして私は、私は別のドキュメントに読み込むこのサービスURLを使用します:
config.ServiceURL = "https://secure.amazon.co.uk/exec/panama/seller-admin/catalog-upload/modify-only";
config.ServiceURL = "https://mws.amazonservices.co.uk/FulfillmentInventory/2011-10-01";
を私は次のようなエラー応答を取得
次のエラー応答が表示されます。
このコードに間違いがある場合は、私が文書を完全に守っているので、私にこれを費やしたのは3日目です。多分私は自分の心を失っています:D
これらは小さな問題であり、私はそれらを理解することはできません。
あなたのFBAインベントリを操作しようとしていますか?あなたは、あなたの通常の在庫と連携するように設計されたフィードAPIを使用しています。 FBAインベントリを使用しようとする場合、FBAインバウンドAPI https://developer.amazonservicesが必要です。com/gp/mws/api.html?ie = UTF8&section = inbound&group = fba&version = latest通常のインベントリで作業する場合は、適切なURLと使用方法を示すMarketplaceWebServiceSamples.csを見てください。 –
こんにちは、返信ありがとう:) .. 私はFBAと通常の在庫の違いを理解していないことを説明できますか? – confusedMind
Amazon(FBA)はAmazonに発送する在庫品であり、Amazonが販売している場合は顧客に出荷されます。フィードAPIを使用してAmazonに新しい在庫をリストする機能(通常の在庫)を使用したいと思うことが多分あります。 C#Feeds APIに付属のMarketplaceWebServiceSamples.csをご覧になり、インベントリの送信/編集方法の学習に役立ちます。 –