简体   繁体   中英

Online price Amazon API

I am new to Amazon API and I am using vacuum gem. I am trying to search products with ASIN product type to get attributes like Price, inStock and all item attributes , But I just receive Manufacturer,ProductGroup,Title attributes,

How can I set up my search attributes?

My code:

req = Vacuum.new
req.configure(
    aws_access_key_id:     '...',
    aws_secret_access_key: '...',
    associate_tag:         'tag'
)
req.associate_tag = 'foobar'
@res = req.item_lookup(query: { 'IdType' => 'ASIN', 'ItemId' => '...'})

My response:

{"ItemAttributes"=>{"Manufacturer"=>"...", "ProductGroup"=>"...", "Title"=>"..."}}

You will need to ensure you are requesting using the "large" ResponseGroup from the Amazon Product API, this will return almost every property associated to that ASIN.

Using your example it will look like this:

item_lookup(query: { 'IdType' => 'ASIN', 'ItemId' => '...', 'ItemSearch.Shared.ResponseGroup' => 'Large'})

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM