Have a look at what is going on here:
[url removed, login to view]
This product page is displaying multiple products and using API add-to-cart
I need to set up the store and products correctly and write some Liquid etc. but if you can start deconstructing the JS would be cool..