Need membership form mod to control contact creation
Have you experimented with the api explorer? 

As far as the API  is concerned on the wp demo site you will find a great explorer at http://wpmaster.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fapi%2Fexplorer#explorer.
The URL will be similar for your own site.

Remember, the eplorer is "live" so you should experiment on the demo site or on your test site, not your live site.

As far as the rest is concerned, I am not a delevoper so I can't comment on whether what you want to do might be achievable or not, but it sounds rather like you intend to hack core and that is not recommended. An extension is the preferred approach.