我正在尝试通过提交订单履行Feed来更新订单的发货详情(承运人,货件追踪号等)。订单成功提交。但是订单数据没有更新。我从亚马逊下载了样品c#代码以提交订单< / p>
String accessKeyId = "xxxxxxxxxxxxxxxx";
String secretAccessKey = "xxxxxxxxxxxxxxxxxxxxxxxxxx";
MarketplaceWebServiceConfig config = new MarketplaceWebServiceConfig();
config.ServiceURL = "https://mws.amazonservices.com";
const string applicationName = "CSharpSampleCode";
const string applicationVersion = "1.0";
MarketplaceWebService.MarketplaceWebService service =
new MarketplaceWebServiceClient(
accessKeyId,
secretAccessKey,
applicationName,
applicationVersion,
config);
const string merchantId = "xxxxxxxxxxx";
const string marketplaceId = "ATVPDKIKX0DER";
SubmitFeedRequest request = new SubmitFeedRequest();
request.Merchant = merchantId;
request.MarketplaceIdList = new IdList();
request.MarketplaceIdList.Id = new List<string>(new string[] { marketplaceId });
request.FeedContent = File.Open(AppDomain.CurrentDomain.BaseDirectory + "/amazonorderfeed/f2.xml", FileMode.Open, FileAccess.Read);
request.ContentMD5 = MarketplaceWebServiceClient.CalculateContentMD5(request.FeedContent);
request.FeedContent.Position = 0;
request.FeedType = "_POST_FULFILLMENT_ORDER_REQUEST_DATA_";
SubmitFeedResponse response = service.SubmitFeed(request);
我的xml内容
<?xml version="1.0"? encoding="UTF-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>CSharpSampleCode</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<AmazonOrderID>111-1111111-1111111</AmazonOrderID>
<FulfillmentDate>2015-02-21T15:36:33-08:00</FulfillmentDate>
<FulfillmentData>
<CarrierCode>UPS</CarrierCode>
<ShippingMethod>Second Day</ShippingMethod>
<ShipperTrackingNumber>1234567890</ShipperTrackingNumber>
</FulfillmentData>
<Item>
<AmazonOrderItemCode>xxxxxxxxxxxxx</AmazonOrderItemCode>
<Quantity>1</Quantity>
</Item>
</OrderFulfillment>
</Message>
</AmazonEnvelope>
提交Feed后,我收到FeedSubmissionId,RequestId,FeedProcessingStatus:已提交。提前致谢
答案 0 :(得分:5)
提交Feed后,您需要等待处理并检查其结果。
how to check the processing state and results of MWS feeds
编辑:我在您的XML中发现了一个漏洞:CSharpSampleCode
不是有效的MerchantIdentifier