How make a new API which uses remote web service

This post provides some guidance, check it out.