Be careful when you specify an
AssociateTag
in the
CartCreate
request. Errors are not returned for
incorrect values.
Using Values Returned by CartCreate in Other Cart Operations
The following XML is a snippet of the response to the
CartCreate
request.
<CartId>002 2197248 2529608</CartId>
<HMAC>/WrekkZAPx782xttLFbZqviNUOA=</HMAC>
<URLEncodedHMAC>%2FWrekkZAPx782xttLFbZqviNUOA%3D</URLEncodedHMAC>
<PurchaseURL>https://www.amazon.com/gp/cart/aws merge.html?cart id=002 2197248
2529608%26associate id=ws%26hmac=/WrekkZAPx782xttLFbZqviNUOA=%26AWSAccessKey
Id=
[AWS Access Key ID]
</PurchaseURL>
<SubTotal>
<Amount>2998</Amount>
<CurrencyCode>USD</CurrencyCode>
<FormattedPrice>$29.98</FormattedPrice>
</SubTotal>
<CartItems>
<SubTotal>
<Amount>2998</Amount>
<CurrencyCode>USD</CurrencyCode>
<FormattedPrice>$29.98</FormattedPrice>
</SubTotal>
<CartItem>
<CartItemId>UV3W10T4V7PCZ</CartItemId>
<ASIN>B000062TU1</ASIN>
<Quantity>2</Quantity>
<Title>Harry Potter and the Sorcerer's Stone (Full Screen Edition) (Harry
Potter 1)</Title>
<ProductGroup>DVD</ProductGroup>
<Price>
<Amount>1499</Amount>
<CurrencyCode>USD</CurrencyCode>
<FormattedPrice>$14.99</FormattedPrice>
</Price>
<ItemTotal>
<Amount>2998</Amount>
<CurrencyCode>USD</CurrencyCode>
<FormattedPrice>$29.98</FormattedPrice>
</ItemTotal>
</CartItem>
</CartItems>
Many of the item attributes in the response are used in future cart requests. Those item attributes are
explained in the following table.
Description
Attribute
An alphanumeric token that uniquely identifies a remote shopping cart. This value must
accompany every cart operation associated with the newly created cart.
CartId
Hash Message Authentication Code. This is an encrypted alphanumeric token used
to authenticate requests. A URL-encoded version of this value must accompany every
cart operation associated with the newly created cart. The alternative is to include,
instead, the URLEncodedHMAC value.
HMAC
API Version 2011-08-01
141
Product Advertising API Developer Guide
Remote Shopping Cart Tasks