我正在开发一个应用程序,以使用C#在Asp.net中从 Amazon 获取订单。我可以使用“ Orders ”API的“ ListOrders ”方法获取亚马逊订单。
亚马逊MWS Scratchpad可在此处获得
我正在尝试更新亚马逊的订单信息。我想使用任何 API 方法或 XML 请求调用来更新订单的“卖家备忘录”字段。(请看下图)
我尝试了“Feeds”API 的“SubmitFeed”方法。但它不起作用。
请帮助我克服这个问题。
谢谢
我正在开发一个应用程序,以使用C#在Asp.net中从 Amazon 获取订单。我可以使用“ Orders ”API的“ ListOrders ”方法获取亚马逊订单。
亚马逊MWS Scratchpad可在此处获得
我正在尝试更新亚马逊的订单信息。我想使用任何 API 方法或 XML 请求调用来更新订单的“卖家备忘录”字段。(请看下图)
我尝试了“Feeds”API 的“SubmitFeed”方法。但它不起作用。
请帮助我克服这个问题。
谢谢
它已被要求作为一项功能,但截至 2015 年底尚不可用。 https://sellercentral.amazon.com/forums/thread.jspa?threadID=248610
我已经找到了解决方案。我正在发布答案以供其他人参考。
首先为:AmazonEnvelope 生成库存文件请参考链接:https ://sellercentral.amazon.com/forums/message.jspa?messageID=2380272
然后 InvokeFeed 如下所示:
public static void InvokeSubmitFeed(MarketplaceWebService.MarketplaceWebService service, SubmitFeedRequest request, List<string> OrderTrackingInfoIds)
{
try
{
SubmitFeedResponse response = service.SubmitFeed(request);
Console.WriteLine(" SubmitFeedResponse");
if (response.IsSetSubmitFeedResult())
{
Console.WriteLine(" SubmitFeedResult");
Util.log(" SubmitFeedResult");
SubmitFeedResult submitFeedResult = response.SubmitFeedResult;
if (submitFeedResult.IsSetFeedSubmissionInfo())
{
Console.WriteLine(" FeedSubmissionInfo");
Util.log(" FeedSubmissionInfo");
FeedSubmissionInfo feedSubmissionInfo = submitFeedResult.FeedSubmissionInfo;
if (feedSubmissionInfo.IsSetFeedSubmissionId())
{
Console.WriteLine(" FeedSubmissionId");
Console.WriteLine(" {0}", feedSubmissionInfo.FeedSubmissionId);
Console.WriteLine(" Total Updates :" + result.ToString());
Util.log("Total Updates :" + result.ToString());
Util.log(" FeedSubmissionId");
Util.log(" " + feedSubmissionInfo.FeedSubmissionId);
}
if (feedSubmissionInfo.IsSetFeedType())
{
Console.WriteLine(" FeedType");
Console.WriteLine(" {0}", feedSubmissionInfo.FeedType);
Util.log(" FeedType");
Util.log(" " + feedSubmissionInfo.FeedType);
}
if (feedSubmissionInfo.IsSetSubmittedDate())
{
Console.WriteLine(" SubmittedDate");
Console.WriteLine(" {0}", feedSubmissionInfo.SubmittedDate);
Util.log(" SubmittedDate");
Util.log(" " + feedSubmissionInfo.SubmittedDate);
}
if (feedSubmissionInfo.IsSetFeedProcessingStatus())
{
Console.WriteLine(" FeedProcessingStatus");
Console.WriteLine(" {0}", feedSubmissionInfo.FeedProcessingStatus);
Util.log(" FeedProcessingStatus");
Util.log(" " + feedSubmissionInfo.FeedProcessingStatus);
}
if (feedSubmissionInfo.IsSetStartedProcessingDate())
{
Console.WriteLine(" StartedProcessingDate");
Console.WriteLine(" {0}", feedSubmissionInfo.StartedProcessingDate);
Util.log(" StartedProcessingDate");
Util.log(" " + feedSubmissionInfo.StartedProcessingDate);
}
if (feedSubmissionInfo.IsSetCompletedProcessingDate())
{
Console.WriteLine(" CompletedProcessingDate");
Console.WriteLine(" {0}", feedSubmissionInfo.CompletedProcessingDate);
Util.log(" CompletedProcessingDate");
Util.log(" " + feedSubmissionInfo.CompletedProcessingDate);
}
}
}
if (response.IsSetResponseMetadata())
{
Console.WriteLine(" ResponseMetadata");
MarketplaceWebService.Model.ResponseMetadata responseMetadata = response.ResponseMetadata;
if (responseMetadata.IsSetRequestId())
{
Console.WriteLine(" RequestId");
Console.WriteLine(" {0}", responseMetadata.RequestId);
Util.log(" RequestId");
Util.log(" " + responseMetadata.RequestId);
}
}
Console.WriteLine(" ResponseHeaderMetadata");
Console.WriteLine(" RequestId");
Console.WriteLine(" " + response.ResponseHeaderMetadata.RequestId);
Console.WriteLine(" ResponseContext");
Console.WriteLine(" " + response.ResponseHeaderMetadata.ResponseContext);
Console.WriteLine(" Timestamp");
Console.WriteLine(" " + response.ResponseHeaderMetadata.Timestamp);
}
catch (MarketplaceWebServiceException ex)
{
Console.WriteLine("Caught Exception: " + ex.Message);
Console.WriteLine("Response Status Code: " + ex.StatusCode);
Console.WriteLine("Error Code: " + ex.ErrorCode);
Console.WriteLine("Error Type: " + ex.ErrorType);
Console.WriteLine("Request ID: " + ex.RequestId);
Console.WriteLine("XML: " + ex.XML);
Console.WriteLine("ResponseHeaderMetadata: " + ex.ResponseHeaderMetadata);
}
}