Items You Cannot Buy
Product Advertising API provides several ways to determine if an item can be purchased, for example,
ItemSearch
has an Availability parameter, which specifies whether an item is available for
purchase. The best way, however, to determine whether or not an item can really be
purchased is by using one of the following response groups in a request:
Note | |
---|---|
Large is a parent of the Offers response group. |
All of the search operations listed, except BrowseNodeLookup
, can
use these response groups. These response groups return an OfferListingId element for
each item that can be purchased. Items that do not have an OfferListingId cannot be
purchased.
The following response snippet shows that an item can be purchased because the
response contains an OfferListingId
.
<Item> ... <Offer> ... <OfferListing> <OfferListingId>g7CWSnBZmVESKy%2BCNS</OfferListingId> <ExchangeId>Y01Y4038850Y8583882</ExchangeId> <Price> <Amount>625</Amount> <CurrencyCode>USD</CurrencyCode> <FormattedPrice>$6.25</FormattedPrice> </Price> <Availability>Usually ships in 1-2 business days </Availability> </OfferListing> </Offer> </Item>
This response shows how the OfferListingId
element is a child
of the Item element.
The Availability element in the preceding example is not a reliable means of determining whether or not an item is truly available for purchase. Its message concerns how quickly an item can ship when it is in stock. A value returned for Availability does not guarantee that the item is in stock.
Tip | |
---|---|
The next chapter talks about adding items to a customer's shopping cart.
While it is possible to add an item to a cart using an ASIN, the preferred means of
adding an item is by specifying an |