Preparing the api calls