api integration code skeleton