douju2599 2016-05-02 10:38
浏览 70

未获得产品广告Api AWS的促销摘要

I want to display Coupouns, offers and deals on my website from AWS
for example

Promotion Summary

What i have tried from Amazon Docs I'm working in Php[Codeigniter] its also not working on scratchpad of 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]

What i wanted from this Rest Service

<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>

I get everything except Promotion Summary

I'm using PHP CUrl to get response

$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);
  • 写回答

1条回答 默认 最新

  • dongre9937 2018-08-06 09:33
    关注

    I had the same problem when i tried to get product promotions. After bothering me 2 days, an idea flashed into my mind: the product promotion infos don't show, maybe because it does not have any promotions. Then i checked Amazon Promos Codes under amazon associates. I clicked a link below "Current Promotion Codes" and get a ASIN: "B00LV5NY3I" on the amazon product page.

    So, i run this quest under 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]
    

    Then, i got PromotionSummary in the response:

    <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>
    

    This was confirmed:if your promotion request is following the programming guide, but the response doesn't contain any promotions, that's because the returned offers does not have any promotions, you need try another keyword, ItemId, SearchIndex, BrowseNode or next page(There are just 10 items returned each request).

    评论

报告相同问题?

悬赏问题

  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥20 测距传感器数据手册i2c