Api calling

This should be moved to a service object