help:how to use aws api receive http://www.amazon.com/gp/offer-listing list

Discussion in 'Amazon' started by kafeier, Feb 19, 2011.

  1. #1
    kafeier, Feb 19, 2011 IP
  2. freshdevelopment

    freshdevelopment Notable Member

    Messages:
    1,303
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    240
    #2
    The API does return all the offers. The easiest way is to take a look at the documentation and work it out. If you have an application working already, this should be an easy addition.
     
    freshdevelopment, Feb 21, 2011 IP
  3. kafeier

    kafeier Active Member

    Messages:
    166
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    i know, but i dont know which one to use parameter, can you tell me?
    thanks
     
    kafeier, Feb 22, 2011 IP
  4. Aff_Fan

    Aff_Fan Member

    Messages:
    147
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #4
    The following request illustrates the XML response elements returned by OfferSummary

    http://ecs.amazonaws.com/onca/xml?
    Service=AWSECommerceService&
    AWSAccessKeyId=[AWS Access Key ID]&
    Operation=ItemLookup&
    ItemId=B000A3UB2O&
    ResponseGroup=OfferSummary&
    Version=2010-11-01
    &Timestamp=[YYYY-MM-DDThh:mm:ssZ]
    &Signature=[Request Signature]

    The following request illustrates the XML response elements returned by Offers.

    http://ecs.amazonaws.com/onca/xml?
    Service=AWSECommerceService&
    AWSAccessKeyId=1VEXAMPLEDS6W82&
    Operation=ItemSearch&
    Condition=All&
    SearchIndex=Books&
    Title=Harry%20Potter&
    ResponseGroup=Offers&
    Version=2010-11-01
    &Timestamp=[YYYY-MM-DDThh:mm:ssZ]
    &Signature=[Request Signature]
     
    Aff_Fan, Feb 22, 2011 IP
  5. kafeier

    kafeier Active Member

    Messages:
    166
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #5
    Thanks, but this two request dont show all Offers.

    test:
    http://ecs.amazonaws.com/onca/xml?A...=NYJcHo2jci1MBGYdNYuJvKK7rrLUo211ieXlmNWIuDI=

    http://ecs.amazonaws.com/onca/xml?A...=jS+AWzOGeqMdXbk9ZVtlyhFt+h4wHWGRK4Ez+z3KG24=
     
    kafeier, Feb 23, 2011 IP
  6. Aff_Fan

    Aff_Fan Member

    Messages:
    147
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #6
    Yes, you need to add a pagination to request: &OfferPage = $Page, where $Page - offer page.
    For example: Total Offers = 78. You need to create 8 pages to show all offers.
     
    Aff_Fan, Feb 23, 2011 IP
  7. kafeier

    kafeier Active Member

    Messages:
    166
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #7
    Aff_Fan, Can you give an example?
    asin=B0042TYYI4
    Thanks.
     
    kafeier, Feb 24, 2011 IP
  8. Aff_Fan

    Aff_Fan Member

    Messages:
    147
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #8
    Aff_Fan, Feb 24, 2011 IP
  9. kafeier

    kafeier Active Member

    Messages:
    166
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #9
    kafeier, Feb 24, 2011 IP
  10. Aff_Fan

    Aff_Fan Member

    Messages:
    147
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #10
    Operation = ItemLookup
    MerchantId = All
    ResponseGroup = Offers, PromotionSummary
    ItemId = $Item
    OfferPage = $Page

    where $Item - amazon ASIN, $Page - offer page

    Also you can add an item condition (New, Used, Collectible, Refurbished)

    Condition = New
     
    Aff_Fan, Feb 24, 2011 IP
  11. kafeier

    kafeier Active Member

    Messages:
    166
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #11
    Thanks Aff fan
     
    kafeier, Mar 3, 2011 IP
  12. Aff_Fan

    Aff_Fan Member

    Messages:
    147
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #12
    Glad to help. Share your script development results.
     
    Aff_Fan, Mar 3, 2011 IP
  13. blogsite

    blogsite Peon

    Messages:
    81
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    How can I create a signature please ?
     
    blogsite, Mar 7, 2011 IP
  14. Aff_Fan

    Aff_Fan Member

    Messages:
    147
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #14
    Download my free amazon plugin for joomla and learn the code. It's simple)

    http://makemoneyscripts.com/item-info-plugin.html

    if ($Default_Locale=="2") {$region = "ca";}
    if ($Default_Locale=="3") {$region = "co.uk";}
    if ($Default_Locale=="4") {$region = "fr";}
    if ($Default_Locale=="5") {$region = "de";}
    if ($Default_Locale=="6") {$region = "jp";}

    $params2["AssociateTag"] = $Associate_ID;
    $params2["Operation"] = "ItemLookup";
    $params2["ResponseGroup"] = "Medium";
    $params2["ItemId"] = $r;
    $method = "GET";
    $host = "ecs.amazonaws.".$region;
    $uri = "/onca/xml";
    $params2["Service"] = "AWSECommerceService";
    $params2["AWSAccessKeyId"] = $Public_Key;
    $params2["Timestamp"] = gmdate("Y-m-d\TH:i:s\Z");
    $params2["Version"] = "2010-09-01";
    ksort($params2);
    $canonicalized_query = array();
    foreach ($params2 as $param2=>$value)
    {
    $param2 = str_replace("%7E", "~", rawurlencode($param2));
    $value = str_replace("%7E", "~", rawurlencode($value));
    $canonicalized_query[] = $param2."=".$value;
    }
    $canonicalized_query = implode("&", $canonicalized_query);
    $string_to_sign = $method."\n".$host."\n".$uri."\n".$canonicalized_query;
    $signature = base64_encode(hash_hmac("sha256", $string_to_sign, $Secret_Key, True));
    $signature = str_replace("%7E", "~", rawurlencode($signature));
    $request = "http://".$host.$uri."?".$canonicalized_query."&Signature=".$signature;
    $store = @file_get_contents($request);

    $xml = new SimpleXMLElement($store);
     
    Aff_Fan, Mar 7, 2011 IP
  15. blogsite

    blogsite Peon

    Messages:
    81
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Thank you, after getting the xml link of amazon's products what I have to do for showing them in my website?
     
    blogsite, Mar 9, 2011 IP