Pankaj
Pankaj

Reputation: 1

How to get product image by Amazon Inventory Management ( AIM ) APIs

How to get product image by Amazon Inventory Management ( AIM ) APIs

Upvotes: 0

Views: 9649

Answers (3)

user635090
user635090

Reputation: 1401

You will not be able to get product images using the Amazon Inventory Management API. You will need to use the Amazon Product Advertising API to get product features such as images, dimensions, publisher, sales rank etc...

If you are trying to get the product image for, say, every product in a merchant's inventory, you should:

  1. Get a list of all items in a merchant's inventory
  2. For each item in that list, request the ItemLookup Operation (See doc: http://docs.amazonwebservices.com/AWSECommerceService/2010-11-01/DG/ItemLookup.html) by passing the ASIN (unique identifier) of the item as the ItemId, and setting the ResponseGroup to "Images".

Your request should look like:

http://ecs.amazonaws.com/onca/xml?
    AWSAccessKeyId=[AWS Access Key ID]&
    Operation=ItemLookup&
    ItemId=[Your-ASIN]&
    ResponseGroup=Images&
    Timestamp=[YYYY-MM-DDThh:mm:ssZ]&
    Signature=[Request Signature]

The response will look like:

    <Item>
      <ASIN>[Your-ASIN]</ASIN>
      <SmallImage>
        <URL>http://ecx.images-amazon.com/images/I/....jpg</URL>
        <Height Units="pixels">75</Height>
        <Width Units="pixels">58</Width>
      </SmallImage>
      <MediumImage>
        <URL>http://ecx.images-amazon.com/images/I/....jpg</URL>
        <Height Units="pixels">160</Height>
        <Width Units="pixels">124</Width>
      </MediumImage>
      <LargeImage>
        <URL>http://ecx.images-amazon.com/images/I/....jpg</URL>
        <Height Units="pixels">500</Height>
        <Width Units="pixels">389</Width>
      </LargeImage>
    </Item>

You can easily parse the response to get the URL of the image you want to use.

A few notes:

  • If you want to get the product image for a different list of products (say, all products in orders that need to be fulfilled), just change step 1 accordingly.
  • If you need more details about the item, set the ResponseGroup parameter with "Medium" or "Large" when invoking the ItemLookup operation. The Amazon Product Advertising doc link given above has all the details.
  • You can also get the product image directly by constructing its URL using the product ASIN. A good reference for building the URL can be found in http://aaugh.com/imageabuse.html. This could work as a quick, temporary hack, but understand that Amazon may block or obfuscate these URL at any time.

Upvotes: 3

maxko87
maxko87

Reputation: 2940

Total disclosure here, I’m Max and I’m the technical co-founder for Zinc (zinc.io). Our API produces a JSON response for both pricing and the product details page. Here’s a typical response for the details of an ASIN: https://www.dropbox.com/s/peccdc1m2j34e0d/B018QPI98A.json?dl=0

Upvotes: 0

user3883259
user3883259

Reputation: 25

You can use the Amazon to Article Info Interface at http://lon.gr/ata/ It generates a XML-File containing the Image URL and other Article information based on the ASIN.

Upvotes: 0

Related Questions