Update api call function