This Transbank Ruby Sample Code shows the logic required to create a shopping cart with an arbitrary number of items. This application also shows how to remove items, and to update the item quantity counter.
Food-sharing mobile photo app Foodspotting had an API since day one. Of course, every mobile app has an API, at least if it needs to store or retrieve non-trivial data. Most of those interfaces stay hidden away, private APIs with only that single, internal audience. Foodspotting, on the other hand, signed Zagat as an early partner and now also has OpenTable, among others, using its Foodspotting API. The company is not exactly making it widely available for any developer, though the documentation is public, planting it in a vast grey area that's becoming increasingly common.