2014-11-04 82 views
0

我试图提交一个完整的产品的平面文件(制表符分隔)。如果我通过上传产品上传此文件&库存页面上传正确。但是,如果我尝试使用API​​我得到一个错误:Amazon Feed API - 文件的标题行缺失或无效

The file's header row is missing or invalid. The header row is for Amazon use only and must not be modified or deleted. To correct this error, download the template again from seller Help and use that new copy, or insert the correct header row directly above the column headings in your existing file.

的代码我使用它的示例代码,订阅API部分客户端库 - C#。

SubmitFeedRequest request = new SubmitFeedRequest(); 
request.Merchant = merchantId; 
request.MarketplaceIdList = new IdList(); 
request.MarketplaceIdList.Id = new List<string>(new string[] { marketplaceId }); 



request.FeedContent = File.Open(@"C:\Amazon_Upload_20141104_10.txt", FileMode.Open, FileAccess.Read); 


request.ContentMD5 = MarketplaceWebServiceClient.CalculateContentMD5(request.FeedContent); 
request.FeedContent.Position = 0; 

request.FeedType = "_POST_FLAT_FILE_LISTINGS_DATA_"; 

SubmitFeedSample.InvokeSubmitFeed(service, request); 

这个文件为什么会通过web界面工作,但不通过API?

回答

1

如果其他人发现这个由谷歌我的问题是不正确的饲料类型。

_POST_FLAT_FILE_LISTINGS_DATA_

当本来应该_POST_FLAT_FILE_INVLOADER_DATA_

对于feedTypes的列表:Click Here

相关问题