Api service & closure functions