Updated api call ajax