Product Advertising API
Developer Guide (API Version 2011-08-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

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 ID]& AssociateTag=[ID]&
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.