How to prevent duplicate entries into db table when storing API data

Maybe this documentation will help you get on track.