Add to Cart Form
The Add to Cart form enables you to add any number of items to a customer's shopping cart and send the customer to the Amazon retail web site.
Note | |
---|---|
There is no direct way for a customer to get back to your site after getting sent to the Amazon site. To improve a customer's experience on your site, you may want to note this on your site or provide a way to get back to your site (using a new window, for example). |
Although the parameters are optional, but you must specify at least one of the following parameters: ASIN, ExchangeId (along with the SellerId and ASIN), or OfferListingId.
To add more than one item to the customer's cart
-
Append each set of parameters with a period, then a unique identifier, which establishes a relationship between the parameters (for example, "ASIN.1=
[ASIN]
&Quantity.1=1&ASIN.2=[Another ASIN]&Quantity.2=12").
The Add to Cart form works with all locales. Send the Add to Cart form data to one of the following URLs:
-
http://www.amazon.com/gp/aws/cart/add.html
-
http://www.amazon.co.jp/gp/aws/cart/add.html
-
http://www.amazon.co.uk/gp/aws/cart/add.html
-
http://www.amazon.de/gp/aws/cart/add.html
-
http://www.amazon.fr/gp/aws/cart/add.html
-
http://www.amazon.ca/gp/aws/cart/add.html
The following table describes the input parameters for the Add to Cart form.
Parameter | Description | Required? |
---|---|---|
ASIN.x | Specifies one or more product ASINs to add, where x is a unique identifier. | Optional |
ExchangeId.x | Specifies one or more products using the exchange ID, where x is a unique identifier. Exchange IDs are available for every item offered by a third-party seller. When using ExchangeId, you must also specify a matching SellerId and ASIN. | Optional |
OfferListingId.x | An alternative way to specify one or more product offer listings from third-party sellers, where x is a unique identifier. | Optional |
Quantity.x | Specifies the amount of a certain product to add to the cart, where x matches the unique identifier for an ASIN, OfferListingId, or ExchangeId parameter. | Required |
SellerId.x | Use the SellerId parameter to ensure that the customer purchases the product from a particular seller, where x matches the unique identifier for an ASIN, OfferListingId, or ExchangeId parameter. | Optional |
AWSAccessKeyId | Your Access Key ID Here. You may want to specify this as a hidden parameter. | Required |
AssociateTag | Your associate tag. You may want to specify this as a hidden parameter. | Optional |
Example HTML for the Add to Cart Form
<form method="GET" action="http://www.amazon.com/gp/aws/cart/add.html"> <input type="hidden" name="AWSAccessKeyId" value="Access Key ID" /><br/> <input type="hidden" name="AssociateTag" value="Associate Tag" /><br/> <p>One Product<br/> ASIN:<input type="text" name="ASIN.1"/><br/> OfferListingId:<input type="text" name="OfferListingId.1"/><br/> Quantity:<input type="text" name="Quantity.1"/><br/> ExchangeId:<input type="text" name="ExchangeId.1"/><br/> SellerId:<input type="text" name="SellerId.1"/><br/> <p>Another Product<br/> ASIN:<input type="text" name="ASIN.2"/><br/> OfferListingId:<input type="text" name="OfferListingId.2"/><br/> Quantity:<input type="text" name="Quantity.2"/><br/> ExchangeId:<input type="text" name="ExchangeId.2"/><br/> SellerId:<input type="text" name="SellerId.2"/><br/> </p> <input type="submit" name="add" value="add" /> </form>