我正在开发一个应用程序,通过 C#从 Asp.net 获取亚马逊的订单。我可以使用“订单”API的“ ListOrders ”方法获取亚马逊订单。
亚马逊MWS Scratchpad 可用 HERE
我正在尝试更新亚马逊的订单信息。我想使用任何API方法或XML请求调用更新订单的“卖方备忘录”字段。 (请参见下图)
我尝试了“Feed”API的“SubmitFeed”方法。但它不起作用。
请帮助我克服这个问题。
由于
答案 0 :(得分:0)
它已被要求作为一项功能,但截至2015年底尚未提供。https://sellercentral.amazon.com/forums/thread.jspa?threadID=248610
答案 1 :(得分:0)
我找到了解决方案。我发布答案供其他人参考。
首先为: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);
}
}