posting api data into db