First api call functionality