Product Advertising API Developer Guide
If the customer, however, wants to remove only some of the items in their cart, use CartModify and set
the Quantity and CartItemId parameters appropriately, for example:
http://webservices.amazon.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key
Operation=CartModify&
CartId=[cart
ID]&
Item.1.CartItemId=U1I8M9790QFDO7&
Item.1.Quantity=15&
Item.2.CartItemId=U3K5GRHEXU6FHK&
Item.2.Quantity=18
&Timestamp=[YYYY-MM-DDThh:mm:ssZ]
&Signature=[Request Signature]
This request sets the quantity of the item specified by the CartItemId to 0 thereby removing it from the
cart.
Retrieving the Contents of a Cart
You should not maintain a local copy of the remote shopping cart. Instead, use CartGet to retrieve the
items in a shopping cart.
Retrieving the items in a cart
• Use the cart's HMAC and CartId values in a CartGet request.
http://webservices.amazon.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key
AssociateTag=ws&
Operation=CartGet&
CartId=002-2041347-9034467&
HMAC=[HMAC]
&Timestamp=[YYYY-MM-DDThh:mm:ssZ]
&Signature=[Request Signature]
By default, CartGet uses the Cart response group. This response group provides a lot of information
about items, including, for example, their price, quantity, and the seller ID of the seller selling the item,
as shown in the following response snippet.
<PurchaseURL>https://www.amazon.com/gp/cart/aws-merge.html?cart-id=002-9918938-
1696046%26associate-id=ws%26hmac=b0ogzvivVYLXjSZ9WwoBRFesFYU=%26AWSAccessKey
Id=[AWS Access Key
ID]</PurchaseURL>
<CartItems>
<SubTotal>
<Amount>1994</Amount>
<CurrencyCode>USD</CurrencyCode>
<FormattedPrice>$19.94</FormattedPrice>
</SubTotal>
<CartItem>
Remote Shopping Cart Tasks
ID]&
ID]&
API Version 2011-08-01
145
Need help?
Do you have a question about the Product Advertising API and is the answer not in the manual?
Questions and answers