如何使用亚马逊商城网络服务 (Amazon MWS) 更新产品价格 API

How to update prices of products with Amazon Marketplace Web Service (Amazon MWS) API

只是想知道更新亚马逊商城商店的产品价格是多么容易(或者可能是困难)。

经过一番搜索,我找到了关于 "Amazon Marketplace Web Service (Amazon MWS)" 的文档。我还检查了 API 文档和一个客户端实现,但我无法(或盲目、愚蠢等)找到任何关于为特定产品设置价格的文档。

或者我需要另一个 API?

编辑:感谢@ScottG 和@Keyur,我找到了'missing link' Feedshttp://docs.developer.amazonservices.com/en_US/feeds/Feeds_SubmitFeed.html# 对于 PHP,src\MarketplaceWebService\Samples\SubmitFeedSample.php 下的 PHP-Client library 中有一个很好的示例。 请参阅@Keyur 对 _POST_PRODUCT_PRICING_DATA_ FeedType 示例的回答。

产品使用 Feeds 发送到亚马逊。我们使用第三方为我们处理我们的,但您可以使用 Feed API 和 pricing FeedType. There are templates you can download to help you out. You can then use one of the client libraries 自行将此 Feed 发送到亚马逊。

您需要将以下 Feed 发送到亚马逊 mws feed api,您通过循环遍历每个 SKU 的元素在一个请求中发送 15 个不同 SKU 的价格 Feed

$feed = <<< EOD
<?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>$merchant_token</MerchantIdentifier>
</Header>
<MessageType>Price</MessageType>
<Message>
  <MessageID>$i</MessageID>
  <Price>
    <SKU>$sku</SKU>
    <StandardPrice currency="$currency">$new_price</StandardPrice>
  </Price>
</Message>
</AmazonEnvelope>
EOD;

$feedHandle = @fopen('php://temp', 'rw+');
fwrite($feedHandle, $feed);
rewind($feedHandle);

$parameters = array(
    'Merchant' => $MERCHANT_ID,
    'MarketplaceIdList' => $marketplaceIdArray,
    'FeedType' => '_POST_PRODUCT_PRICING_DATA_',
    'FeedContent' => $feedHandle,
    'PurgeAndReplace' => false, //Leave this PurgeAndReplace to false so that it want replace whole product in amazon inventory
    'ContentMd5' => base64_encode(md5(stream_get_contents($feedHandle), true))
);

$request = new MarketplaceWebService_Model_SubmitFeedRequest($parameters);
$return_feed = invokeSubmitFeed($service, $request);
fclose($feedHandle);