【发布时间】:2013-04-16 15:45:30
【问题描述】:
我熟悉亚马逊 MWS,过去使用过报告、Feed 和产品 API,现在我想上传 TSV 订单文件,以便在我的亚马逊卖家中心账户中运送所有这些订单。请谁能告诉我我应该使用哪种提要类型以及我必须提交的提要的结构是什么。 提前谢谢你。
【问题讨论】:
标签: php amazon-web-services amazon amazon-mws
我熟悉亚马逊 MWS,过去使用过报告、Feed 和产品 API,现在我想上传 TSV 订单文件,以便在我的亚马逊卖家中心账户中运送所有这些订单。请谁能告诉我我应该使用哪种提要类型以及我必须提交的提要的结构是什么。 提前谢谢你。
【问题讨论】:
标签: php amazon-web-services amazon amazon-mws
对于平面文件提交,您的请求的 FeedType 将是 _POST_FLAT_FILE_FULFILLMENT_DATA_。
您可以在本文档中找到所有 FeedType 值:MWS Developer Guide (Version 2009-01-01) (Page 93)
【讨论】:
在此处添加我添加到客户端库中的代码,使其比上面的评论更具可读性:
//MWSFeedsClient.php
/**
* Submits the given flat file shipping feed and returns a feed submission id
*
* @param string Path to the flat file shipping feed
* @return string Feed submission id
*/
public function confirmShipmentFlatFile($feedFilePath)
{
$feedHandle = @fopen($feedFilePath,"r");
//Computing the MD5 hash
$contentMD5Header = base64_encode(md5(stream_get_contents($feedHandle), true));
rewind($feedHandle);
//Submit the Order Fulfillment feed
return $this->submitFeed(MarketplaceWebService_Model_FeedType::POST_FLAT_FILE_FULFILLMENT_DATA, $feedHandle, $contentMD5Header);
}
【讨论】: