this a demonstration on how to integrate api's for getting a particular record, getting all the records, put, and post, you can check out the implimentation from here: API Integration (All HTTP methods) using URLSession - SwiftUI 2.0
Please do support my channel by subscribing and liking the video