Amazon Product Advertising API Developer's Manual page 183

Api version 2011-08-01
Table of Contents

Advertisement

Product Advertising API Developer Guide
Because the contents of a cart can change for different reasons, such as item availability, you should not
keep a copy of a cart locally. Instead, use the other cart operations to modify the cart contents. For
example, to retrieve contents of the cart, which are represented by CartItemIds , use
Available products are added as cart items. Unavailable items, for example, items out of stock, discontinued,
or future releases, are added as SaveForLaterItems. No error is generated. The Amazon database
changes regularly. You may find a product with an offer listing ID but by the time the item is added to the
cart the product is no longer available. The checkout page in the Order Pipeline clearly lists items that
are available and those that are SaveForLaterItems.
It is impossible to create an empty shopping cart. You have to add at least one item to a shopping cart
using a single CartCreate request. You can add specific quantities (up to 999) of each item.
CartCreate can be used only once in the life cycle of a cart. To modify the contents of the cart, use one
of the other cart operations.
Carts cannot be deleted. They expire automatically after being unused for 7 days. The lifespan of a cart
restarts, however, every time a cart is modified. In this way, a cart can last for more than 7 days. If, for
example, on day 6, the customer modifies a cart, the 7 day countdown starts over.
Specifying the Items
In one CartCreate request, you can add up to ten items; the quantity of each item is set separately, as
follows:
Item.1.OfferListingId=[Offer Listing ID]
Item.1.Quantity=3
Item.2.OfferListingId=[Offer Listing ID]
Item.2.Quantity=1
This code adds two items identified by their OfferListingIds and the quantity of each item is set to 3 and
1, respectively.
You can use any combination of ASIN s or OfferListingId s in a single request to specify the items to
add to a cart.You can only use one type of item identifier to add an item to a cart.You cannot, for example,
use an ASIN and an OfferListingId in the same request to add the same item to a cart.
For more information the formatting used to add items to a cart, see
Availability
All locales.
Request Parameters
Name
ASIN
CartCreate
Description
An alphanumeric token that uniquely identifies an item.
Using OfferListingId is preferred instead of ASIN when
adding items to a cart.
Valid Values: ASIN
Constraint: Required if OfferListingId is not used
API Version 2011-08-01
176
CartGet (p.
CartAdd (p.
168).
Required
Conditional
181).

Advertisement

Table of Contents
loading

Table of Contents