adding basic record saving to the API