我想在AWS上显示我网站上的Coupouns,优惠和优惠 例如
我试过Amazon Docs我在Php [Codeigniter]工作的事情,它也没有在AWS的暂存器上工作
http://webservices.amazon.in/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key ID]&
AssociateTag=[Associate ID]&
Operation=ItemLookup&
ItemId=B000AQSMPO&
IdType=ASIN&
ResponseGroup=Offers,PromotionSummary&
Version=2013-08-01
&Timestamp=[YYYY-MM-DDThh:mm:ssZ]
&Signature=[Request Signature]
我想从这项休息服务中得到什么
<Promotions>
<Promotion>
<Summary>
<PromotionId>A2QIQTNOFYRK5N</PromotionId>
<Category>BuyAmountXGetAmountOffX</Category>
<EligibilityRequirementDescription>Save $25.00 when you spend $125.00 or more on Kitchen & Housewares or Bed & Bath products offered by Amazon.com. Enter code AUGSAVER at checkout.</EligibilityRequirementDescription>
<BenefitDescription>Save $25.00 when you spend $125.00 or more on Kitchen & Housewares or Bed & Bath products offered by Amazon.com. Enter code AUGSAVER at checkout.</BenefitDescription>
<TermsAndConditions>.......</TermsAndConditions>
</Summary>
</Promotion>
</Promotions>
除了促销摘要
,我得到了所有内容我使用PHP CUrl获得回复
$request_url = 'http://'.$endpoint.$uri.'?'.$canonical_query_string.'&Signature='.rawurlencode($signature);
//return $request_url;
// I prefer using CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$xml_response = curl_exec($ch);
答案 0 :(得分:0)
我尝试get product promotions时遇到了同样的问题。打扰了我两天后,一个念头浮现在我的脑海:产品促销信息没有显示,可能是因为它没有任何促销信息。 然后我在Amazon Promos Codes下检查了amazon associates。我单击了“当前促销代码”下方的链接,并在亚马逊产品页面上获得了ASIN:“ B00LV5NY3I”。
因此,我在scratchpad下运行此任务:
https://webservices.amazon.com/onca/xml?
AWSAccessKeyId=[Your Access Key]&
AssociateTag=[Your Associate Tag]&
IdType=ASIN&
ItemId=B00LV5NY3I&
Operation=ItemLookup&
ResponseGroup=Offers,PromotionSummary&
Service=AWSECommerceService&
Timestamp=[YYYY-MM-DDThh:mm:ssZ]&
Signature=[Request Signature]
然后,我在响应中得到了PromotionSummary:
<Promotions>
<Promotion>
<Summary>
<PromotionId>ATVP6WYIMZVUO</PromotionId>
<Category>BuyQuantityXGetPercentOffX</Category>
<EligibilityRequirementDescription>
Save 15% with this coupon. Enter code 4FCECM15 at checkout.
</EligibilityRequirementDescription>
<BenefitDescription>
Save 15% with this coupon. Enter code 4FCECM15 at checkout.
</BenefitDescription>
<TermsAndConditions>
<strong>To receive the Best Value discount:</strong> <ol><li>Add all products described in the promotion to your Shopping Cart in one of two ways:</li> <ul><li>Via the “Add both to Cart” button in the promotion description, OR</li> <li>Via the “Add to Shopping Cart” button on each respective product information page.</li> </ul> <li>The amount of the Best Value discount will be reflected on the final order checkout page and will be allocated proportionally to all promotion items in the Shopping Cart, including the Best Value item itself. For example, if the promotion offers $5 off one item worth $10 when you purchase two qualifying items worth $20 each, the $5 will be divided proportionately between the three items, so that the Best Value item will appear with a $1 discount, and each of the two other qualifying items will appear with a $2 discount.</li> </ol><strong>Terms and Conditions:</strong> <ul> <li>The promotion is valid for a limited time only. Amazon reserves the right to cancel it at any time.</li> <li>If you do not purchase the qualifying and Best Value items added to your Shopping Cart when the promotion is in effect, the discount will not apply.</li> <li>The promotion applies only to qualifying items displaying the offer message on their product information pages.</li> <li>The promotion applies only to products sold by the seller indicated in the offer message. It does not apply to the same products sold by other sellers. For example, if the promotion applies to cookware offered by Amazon.com, the same cookware offered by other sellers on the Amazon.com website (e.g. Macy’s, etc.) do not qualify.</li> <li>Unless the promotion indicates otherwise, it applies to the lowest priced qualifying item and may not be combined with other offers.</li> <li>All qualifying and Best Value items must be purchased in one order and shipped to a single address.</li> <li>If you return any of the promotion items, we will subtract your Best Value discount from your return credit.</li> <li>Shipping and handling charges apply to all products, including Best Value items.</li> <li>Add-on Items require a minimum purchase. See amazon.com/addon for details.</li> <li>This promotion may not be combined with other offers, including promotional certificates.</li> <li>Does not apply to orders placed with 1-Click.</li> <li>Offer good while supplies last.</li> <li>Void where prohibited.</li> <li>If you remove any of the promotion items from your Shopping Cart or violate any of the Terms and Conditions, the promotion will be invalid, and the discount will not apply.</li> </ul>
</TermsAndConditions>
</Summary>
</Promotion>
...
</Promotions>
已确认:如果您的促销请求遵循programming guide,但是响应中不包含任何促销,那是因为返回的报价没有任何促销,您需要尝试另一个关键字ItemId,SearchIndex ,BrowseNode或下一页(每个请求仅返回10个项目)。