Why is ItemLookup not returning any price information even when requesting all 3 offer groups?

前端 未结 1 510
自闭症患者
自闭症患者 2021-02-14 02:44

I am using the Product Advertising API to do an ItemLookup on a valid ASIN, requesting all three flavors of offer groups, and I am not getting back any price information. Yet w

1条回答
  •  半阙折子戏
    2021-02-14 03:21

    Edit:

    An item returned by the Amazon Product API can represent either a single variation item (a single size and/or a single color) or a variation parent. When a single variation item is returned, you just have to use the same approach as you initially did and you'll be able to fetch the price.

    A parent variation item (your case), however, is not associated with any offer (price), because it is an abstraction of a product and acts as a container for the existing product variations (different sizes, colors).

    In this case, every variation contained within the variation parent has its own price and you can simply iterate through the set of variations and fetch the price you need.

    Adding the Variations response group to your search/look up request is crucial, so don't omit it.

    The request body:

    
       
       
           
               xxxxxxxxxxxxxxxxxxx
               xxxxxxxx
               
                   ASIN
                   All
                   B008M4TB9C
                   Variations
               
               xxxxxxxx
               2012-12-13T23:49:27Z
           
       
    
    

    The response body.

    A price for a single variation can be found under:

    Item->Variations->Item->Offer->OfferListing->Price.

    
        
           
             
               
                 
    05c3ecdd-60ae-4a87-8bcb-70f80a5f5d5b 0.1092920000000000 True ASIN Deprecated B008M4TB9C Variations All B008M4TB9C B008M4TB9C 49500 USD $495.00 49500 USD $495.00 ... B007HQYIBW B008M4TB9C ... ... .... Color Black Size 6 B(M) US Amazon.com New xxxxxxxxxx 49500 USD $495.00 Usually ships in 24 hours now 0 0 1 ...

    0 讨论(0)
提交回复
热议问题