| http://developer.ebay.com/DevZone/XML/docs/WebHelp/eBayExpress-Shopping_Carts_and_eBay_Express_Items.html | |
| Specialty and International Sites > eBay Express > Shopping Carts and eBay Express Items | |
Shopping Carts and eBay Express Items
Important: As of September 2008, US eBay Express was shut down. UK and Germany eBay Express were shutdown in April 2008. All eBay Express-specific API calls (e.g., GetSearchResultsExpress and GetCart) were deprecated as of release 579. Please refer to the API Release Notes for more information.
The eBay API enables you to create and update the contents of a shopping cart that can contain eBay Express items. The API calls for shopping carts are SetCart and GetCart. For details on how to determine whether an item is an eBay Express item, see Retrieving Items Listed on Express. There are some cases in which certain eBay Express items no longer appear on eBay Express, and if they are no longer on eBay Express, they can no longer be added to a cart. See Specify a Fixed Price for Express and eBay for details.
How might your site make use of such a cart? That is up to your creativity. Consider some scenarios:
- A user comes to your site and, without identifying himself, searches for items (which your application limits to eBay Express items). He adds various items to his cart. Later, he follows your link to eBay Express checkout and there signs in with his eBay ID and completes checkout. He then returns to your site to do additional shopping.
- A user comes to your site and adds items to her cart. She wants to leave the computer (and let's say the session will end) but not lose the details about what she has added to the cart. Your application prompts her for information that you can associate with her, and when she later returns and identifies herself, you retrieve the cart you stored for her, and she continues shopping and eventually goes through checkout on eBay.
To create a new cart, call SetCart without the CartID tag and with the details of the items to be added to the cart. To continue with an existing cart, call SetCart with the cart ID for that cart. The response of SetCart includes the CartID (which is a new ID if this is a new cart or is the same ID if you provided a cart ID). Preserve this ID for subsequent calls to either SetCart or GetCart for that cart.
The SetCart action of
Addenables you to add a specified quantity of an item to the cart. The response includes a ReferenceID corresponding to each item added to the cart. You need this ID when usingDeleteorUpdate.The SetCart action of
Deleteenables you to remove a specified item from the cart. (You must also provide the corresponding ReferenceID for that particular item.)The SetCart action of
Updateenables you to change the quantity associated with an item you previously added to the cart. (You must also provide the corresponding ReferenceID for that particular item.)The response of GetCart is identical to the response of SetCart. Most of the time, you will just use SetCart to change the contents of the cart and, in so doing, receive complete information on the state of the cart, information that you can and should use in subsequent calls to SetCart for that cart. GetCart is provided so that you can obtain information for a specific cart ID, for example, for a user who has returned after a few hours to continue shopping.
GetCart and SetCart accept ShippingAddress for the purpose of calculating shipping costs for a specified address (if the specified postal code is valid for the specified country). ShippingAddress is irrelevant for those items in the cart for which only flat rate shipping is offered.
OrderDetail is only returned by GetCart and SetCart if checkout has been completed on eBay Express.
| Specialty and International Sites > eBay Express > Shopping Carts and eBay Express Items | |
| http://developer.ebay.com/DevZone/XML/docs/WebHelp/eBayExpress-Shopping_Carts_and_eBay_Express_Items.html | |
| © 2004–2009 eBay Inc. All rights reserved. | Version 611 |