Product Advertising API Developer Guide
•
Retrieving the Contents of a Cart (p. 145)
Product Advertising API operations give you complete control of the items in a remote shopping cart. The
tasks you can implement using Product Advertising API cart operations are described in the following
sections.
Creating a Remote Shopping Cart
A remote shopping cart must be created the first time a customer decides to add an item to a shopping
cart. Once the cart is created, it is reused and modified appropriately until it expires. Only one local cart
can be created and only one cart per customer per vendor should be created.
Typically, an HTML button labeled, for example, Add to Cart, implements a CartCreate request, which
includes:
• At least one item to add to the cart.
You cannot create an empty cart.
• An AssociateTag .
Including the AssociateTag value gives the Associate credit for the customer's purchase.
Example Creating a Cart
The following request creates a cart that will be merged with the customer's cart when the customer uses
PurchaseURL .
http://webservices.amazon.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key
Operation=CartCreate&
Item.1.OfferListingId=B000062TU1&
Item.1.Quantity=2
&Timestamp=[YYYY-MM-DDThh:mm:ssZ]
&Signature=[Request Signature]
In this example, two of the same item (Quantity=2) whose ASIN is B000062TU1 are added to the newly
created (Operation= CartCreate ) shopping cart. The Associate specified will receive a referral fee if the
customer purchases the item.
In the lifespan of a shopping cart, CartCreate can be used only once. If you call CartCreate a second
time, you create a new shopping cart. We recommend that you only create one cart per customer.
Specifying the Items in the CartCreate Request
In one CartCreate request, you can add up to ten different items to the cart. The quantity of each item
can be between 1 and 50. That means in one CartCreate request, you could add up to five-hundred
items (10 items * 50 quantity).
Items are specified in parameter pairs, as follows:
Item.N.ItemIdType=[Item identifier]
Item.N.Quantity=[Number of Item.N items]
N is a positive integer. The N value associates the ItemId with the quantity of those items that should be
added to the cart, for example:
Remote Shopping Cart Tasks
ID]& AssociateTag=[ID]&
API Version 2011-08-01
139
Need help?
Do you have a question about the Product Advertising API and is the answer not in the manual?
Questions and answers