How to implement a plugin featuring foursquare like check-in

I would use an AJAX call + modal dialog.

And for the API, just create a plugin, and follow the steps on this page to create your own custom ajax action.