Reputation: 80
I am trying to update shipment details(carrier,shipment tracking number etc) of orders by submitting order fulfillment feed.Feed is submitting successfully.But order data is not updating.I have downloaded sample c# code from amazon to submit feed
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);
my xml content
<?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>
After submitting feed I am getting FeedSubmissionId,RequestId,FeedProcessingStatus:submitted.
Upvotes: 3
Views: 2973
Reputation: 607
If the order fulfillment feed isn't working for you, you could also try using the confirmShipment API call in the SP-API Orders API. See my other answer here for more explanation.
Upvotes: 0
Reputation: 6882
After submitting a feed, you need to wait for it to process and check its result.
how to check the processing state and results of MWS feeds
Edit: I found a flaw in your XML: CSharpSampleCode
is not a valid MerchantIdentifier
Upvotes: 6